Try Mirantis OpenStack for K8s

Get your hands dirty with Mirantis OpenStack without buying any hardware

With Mirantis OpenStack for Kubernetes, an operator can deploy, observe, and lifecycle-manage full-featured, multi-tenant bare-metal private clouds at any scale: in datacenters, in collocations, or at the network edge — wherever one needs to host virtual machines.

In a full-scale enterprise deployment, Mirantis OpenStack runs on Kubernetes, deployed on powerful bare-metal servers, and managed by Mirantis Container Cloud. In addition, a production MOS deployment would be integrated with enterprise directory, centralized logging monitoring and alerting (Mirantis StackLight), notifications and ticketing, and other IT facilities to accelerate operations. Sadly, this makes it difficult to evaluate Mirantis OpenStack without significant resources and time investment.

Until now! Since most developers and organizations have access to an AWS account, this tutorial guides you through the deployment of a special flavor of Mirantis OpenStack for Kubernetes in an Amazon Web Services (EC2) region. You can use our TryMOS version to get hands-on experience of Mirantis OpenStack on Kubernetes, without spending more than about $300/month in AWS fees.

Introduction

This minimal demo, called TryMOS, lets you experience the simplicity of managing the lifecycle of a Mirantis OpenStack for Kubernetes deployment, and explore user-facing services and capabilities provided by OpenStack itself. TryMOS achieves true portability by cutting down to a bare minimum the number of components required to deploy and run containerized OpenStack.

What You’re Deploying

You’ll be deploying an all-in-one Mirantis OpenStack for K8s virtual machine image (AMI) on a single Amazon Web Services (EC2) with a minimum of 16 CPUs and 30 GB RAM. (In most regions, this is equivalent to a c4.4xlarge instance). This single instance will run containerized OpenStack, Ceph, and the underlying Kubernetes.

At a minimum, the instance will require 35 GB of root storage and 20 GB of additional volume storage. Once you launch the VM, you will need to login into the Linux command line and execute the built-in bootstrap script which will automatically spawn a one-node Kubernetes cluster based on Mirantis Kubernetes Engine and deploy Mirantis OpenStack on top of it.

Once the bootstrap is complete, you will be able to access the following OpenStack services, using a web browser or OpenStack client command-line interface:

  • Identity (Keystone)
  • Compute (Nova)
  • Images (Glance)
  • Block Storage (Cinder)
  • Networking (Neutron), with Open vSwitch backend
  • Orchestration (Heat)
  • Web UI (Horizon)
  • Object Storage (Ceph RADOS Gateway)

You’ll also be able to access:

  • A tiny containerized Ceph cluster
  • The lifecycle management API for Mirantis OpenStack and containerized Ceph
  • The Mirantis Kubernetes Engine GUI and command line for the underlying Kubernetes cluster

Important Note

Who should (and shouldn’t) undertake this project: This tutorial assumes familiarity with the Linux command line and associated tools, with Amazon Web Services, networking fundamentals, virtualization and cloud technology in general, OpenStack, and with Kubernetes command-line tools in particular. Non-engineers: As a convenient alternative to “DIY,” non-engineers are strongly encouraged to speak with a Mirantis Account Executive, who will arrange a remote demonstration at your convenience. Mirantis’ Services organization stands ready to assist with proof-of-concept deployments and to provide assistance in deploying Mirantis products for use by customers.

Prerequisites

  • Administrative access to an AWS account with a reasonable allowance of resources available.

Important Note

The authoritative reference for designing, deploying, and operating a production Mirantis OpenStack for K8s cluster can be found in the Mirantis Documentation Portal. You may find it useful to read through the provided guides before trying the simplified version.

Step 1. Get TryMOS Image for Amazon EC2

Sign up, using the form below, providing your contact information, AWS Account ID, and the name of the region (e.g., us-east-2) in which you wish to deploy TryMOS, so that we can share the TryMOS image with you.

Please note that it may take us some time to process your request. You will receive an email from our team once the image becomes available to you. The message will also contain detailed step-by-step instructions on how to launch the TryMOS, as well as the most exciting demonstration scenarios.

Step 2. Launch the EC2 instance for TryMOS

Once your request has been approved and the TryMOS has been shared with your AWS account, you will receive a confirmation email, which will include the ID of the image.

In the Amazon EC2 UI, navigate to Service > Images > AMIs, and look up the TryMOS image by the provided ID in the list of “Public images”, as shown on the screenshot below:

list of public images screenshot from ec2

Make sure to compare the image ID with the one from the email. Also please pay attention to the AWS region you are currently logged in to, it needs to be the one you provided in the form. In case you are not able to find the image, please don’t hesitate to reach out to us via trymos@mirantis.com.

Select the image, use “Actions > Launch” to bring up the instance launch wizard. Select a c4.4xlarge (16 CPUs and 30 GB RAM) or a larger flavor.

Proceed to the “Add Storage” tab and make sure the instance there will be at least 20 GB EBS volume attached to the instance.

Proceed to the “Configure Security Group” tab and add predefined “SSH” and “HTTPS” security groups.

Click the “Review and Launch” button, review the configuration of your future instance. Proceed with “Launch”, making sure there is a new or existing keypair configured.

Wait for the instance to appear in the EC2 console “Instances > Instances” list. To proceed with the next step the instance needs to get into the “Running” state with all the status checks passed.

Use the instance’s Public IP seen in the console to log in via SSH. Make sure to use the “root” account and the correct key, the private part of the keypair specified at launch.

ssh  -i ./ -l root

Step 3. Start TryMOS

As the root user, execute the TryMOS installation script

sudo /usr/share/trymos/launch.sh

It is going to take the script a while, around 20 minutes, to download and install all the prerequisites. Once the installation is complete, the following message will appear in the console.

####################################################
#################### TryMOS ########################
####################################################
############### Components Versions ################
OS:                       Ubuntu 18.04.2 LTS
OpenStack Controller:     0.3.31
Ceph Controller:          1.0.0-mcp-177
OpenStack Version:        ussuri
############# UCP access information ###############
UCP Admin Username:       admin
UCP Admin Password:       xxxxxxxxxxxxx
########### OpenStack access information ###########
OpenStack Admin Username: admin
OpenStack Admin Password: xxxxxxxxxxxxx
####################################################

Please make sure to write down the provided access credentials.

Done! Now you have got your personal Mirantis OpenStack for K8s running and ready to play with it.

Step 4. Play with Mirantis OpenStack

Any management operation that you can think of, in Mirantis OpenStack for K8s world can be performed using just the `kubectl` tool.

Important Note

By default, the TryMOS launch script creates `kubectl` configuration files in the directories that are only accessible by the root user. Please make sure that all the commands below get executed as root.

Alternatively, you can copy the /root/.kube directory to your user’s home, adjusting the permissions.

Let’s start with checking that the underlay K8s cluster is working normally and is accessible.

kubectl cluster-info
 
Kubernetes master is running at https://172.31.29.xxx:6443
CoreDNS is running at https://172.31.29.xxx:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

Ok, so the OpenStack cluster is up and running. Now we get into real action and spawn a tiny OpenStack VM just to give MOS itself the first try. As described in the documentation the easiest way to do this is to execute an OpenStack CLI command from inside of one of the K8s pod comprising Mirantis OpenStack for K8s cluster. We will be reusing the `keystone-client`pod, since it already includes a pre-configured administrative CLI.

Let’s start with getting the name of the `keystone-client` container and save it in a shell variable, this will save us some typing.

export cli_pod=$(kubectl -n openstack get pod -l application=keystone,component=client -ojsonpath='{.items[*].metadata.name}')
kubectl -n openstack exec $cli_pod -- openstack server create --flavor m1.tiny --image Cirros-5.1 my-test-server
+-------------------------------------+---------------------------------------------------+
| Field                               | Value                                             |
+-------------------------------------+---------------------------------------------------+
| OS-DCF:diskConfig                   | MANUAL                                            |
| OS-EXT-AZ:availability_zone         | nova                                              |
| OS-EXT-SRV-ATTR:host                | None                                              |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None                                              |
| OS-EXT-SRV-ATTR:instance_name       |                                                   |
| OS-EXT-STS:power_state              | NOSTATE                                           |
| OS-EXT-STS:task_state               | scheduling                                        |
| OS-EXT-STS:vm_state                 | building                                          |
| OS-SRV-USG:launched_at              | None                                              |
| OS-SRV-USG:terminated_at            | None                                              |
| accessIPv4                          |                                                   |
| accessIPv6                          |                                                   |
| addresses                           |                                                   |
| adminPass                           | QqvnR2wGytaq                                      |
| config_drive                        |                                                   |
| created                             | 2021-06-11T15:38:46Z                              |
| flavor                              | m1.tiny (7fd26f3c-4583-4b80-b29a-27422d0b17f3)    |
| hostId                              |                                                   |
| id                                  | 4c8f9ee3-3143-49a4-961b-85d283cc1852              |
| image                               | Cirros-5.1 (8fa5630c-7839-412e-9486-642ee5927300) |
| key_name                            | None                                              |
| name                                | my-test-server                                    |
| progress                            | 0                                                 |
| project_id                          | 4634f807aca048a893fad70f31eccb26                  |
| properties                          |                                                   |
| security_groups                     | name='default'                                    |
| status                              | BUILD                                             |
| updated                             | 2021-06-11T15:38:46Z                              |
| user_id                             | f7b05b7144684683a9be98f3b3a6ef53                  |
| volumes_attached                    |                                                   |
+-------------------------------------+---------------------------------------------------+

After a while check the status of the VM

kubectl -n openstack exec $cli_pod -- openstack server list
+--------------------------------------+-------------+--------+----------+------------+---------+
| ID                                   | Name        | Status | Networks | Image      | Flavor  |
+--------------------------------------+-------------+--------+----------+------------+---------+
| 4c8f9ee3-3143-49a4-961b-85d283cc1852 | test-server | ACTIVE |          | Cirros-5.1 | m1.tiny |
+--------------------------------------+-------------+--------+----------+------------+---------+

Voila! Our first OpenStack VM is now up and running!

Next Steps

Please refer to the Operations guide and Mirantis OpenStack for K8s documentation in general for more examples of the workflows that you can test with TryMOS.

Important Note

Please keep in mind that TryMOS is just a miniaturized replica of the “big” Mirantis OpenStack for K8s and is not suitable for performance, resilience or any other kind of non-function testing.

Also TryMOS is designed to be short-lived. Once you get back to your AWS instance after a day or two, it might appear non-responsive. If that happens just recreate your instance following the instructions above.

Of course, what you have seen is just a fraction of what Mirantis OpenStack for K8s can do in practice, and at scale. To learn more, please contact your Mirantis representative.

Having Trouble?

Please don’t hesitate to contact us via the trymos@mirantis.com. We will do our best to help you move forward.