Application Deployment on OpenStack via OneOps

Sep 22, 2016 · 8 min read
Image for post
Image for post

is a multi-cloud and open-source orchestration platform for that has the following major advantages:

  • DevOps orchestration: integrate popular open-source or free DevOps tools and orchestrate them on a nice web UI.
  • Model-driven application template: once a template is created, re-use and deploy the “best practice” unlimited times.
  • Cloud Agnostic: support deployment on major public and private clouds
  • Operation excellence:auto-pilot the application - scales, repairs and even replaces unhealthy instances. Also fully integrate with the monitoring and alerting functions on the web UI.
  • Promote DevOps culture: bring developers, QA and Operations together, leading to an acceleration of the product delivery and a reduction on operation cost.

is an open-source software cloud computing platform, which is primarily used for deploying an infrastructure as a service (IaaS) solution like Amazon Web Service (AWS) and has became the de-facto standard to build the private clouds in the industry.

OneOps could deploy and manage application on major public cloud providers, private clouds such as OpenStack, or even bare metal (). In this article, we will see how to deploy a simple database application () on OpenStack via OneOps.

Since this article will serve as the POC (“proof-of-concept”) or demonstration purposes, I will use 100% “free-of-charge”, public available and compatible solutions.

  • as OpenStack provider, because it is the easiest and free way to try out OpenStack.
  • OneOps (All-in-one vagrant), the only requirement is to download and .

There are already many articles about setting up OpenStack on and I found one is the very neat and concise.

Only 2 items may worth to notice:

  • do fill in DNS ( for private network, otherwise OpenStack VM could not resolve all domain names.
  • Allocate a Floating IP (but do not need to associate with a compute instance at this point)

provides steps of installing OneOps, same as following,

git clone  
cd setup/vagrant-centos7
vagrant up

vagrant up will create a minimum installation of OneOps on a local virtual machine. Next we may want to SSH into the virtual machine and tail the OneOps deployment log in terminal. The purpose of doing that is: in case there are some error during the application deployment, we will know what happened.

vagrant ssh 
sudo -s
cd /opt/oneops/inductor
inductor tail

Open your local web browser and go to sign up a new user and create an “organization”.

Image for post
Image for post
Add a new organization

Then create a new cloud.

Image for post
Image for post
Create a new cloud

Make sure to choose “vagrant” from the “location” drop-down list. After that we will start to add some required services in the new cloud.

Image for post
Image for post
Add a service to the cloud

Compute Service

Compute service provides the fundamental block for computation, such as CPU, memory, local storage, networking…. As we plan to use OpenStack (provided by ) to be our computing backbone, choose “nova (public/oneops)” under “compute” category. See example picture as below.

Image for post
Image for post
Choose “nova” as compute service

Then configure several parameters as following:

API Endpoint: This value should come from . Login , go to “Compute” -> “Access & Security” -> “API Access”, find the value of “Identity”, copy & paste then append it with “/tokens”. So the API Endpoint will look like “

Image for post
Image for post
Get API Endpoint from

Tenant/Username: these values are your username. E.g. facebook10156829676395043

Image for post
Image for post
Get Tenant/Username

Password: This can be got from your account settings. “Settings” -> “API Password” -> “Request API password”. After the password is shown, you may be automatically logged out and have to login again.

Image for post
Image for post
Get API Password from

The overall “authentication” section will look like:

Image for post
Image for post
“Autentication” section

Next we will move on to the “Placement” section, we only need to specify the following two items:

  • Region: “nova”
  • Public Network Type: Choose “Floating”

The “Placement” section may resemble:

Image for post
Image for post
“Placement” Section

In the “Mappings” section, look for “Image Map”. In this demo we will use “centos-7.0” and fill in the Image ID for “centos-7.0”. The Image ID could be found on the after your login: “Compute” -> “Images”. Find “CentOS7” then click.

Image for post
Image for post
Get CentOS 7 Image ID

Copy the value of ID from and paste into the OneOps:

Image for post
Image for post
Input the image ID into OneOps

In “Operating System” section,

  • OS Type: choose “CentOS 7.0”. Note at the time of writing this article, OneOps may only support Ubuntu 14.04 and CentOS 7.0.
  • Initial Username: “centos”. If using Ubuntu 14.04, this value should be “ubuntu”.

Overall, it will resemble as follows:

Image for post
Image for post

Till now we are done with the compute service. Save the configuration and let’s add DNS and GDNS service.

DNS Service

DNS Service is very useful for most applications deployed via OneOps because (1) a FQDN will be created based on the DNS service, which will uniquely identify one application among all applications managed by OneOps, (2) FQDN could effectively serve as a consistent “entry point” (DNS load balancing) to the application, no matter how many instances are added, removed or replaced behind the FQDN. Users just need to connect to FQDN and the requests will be routed to the working instances. A good example of FQDN is “”.

To add DNS service to OneOps, we need to first find (1) a domain name, and (2) a DNS provider.

Domain Name: There are many website providing free domain name. You could choose what you prefer, but here I will choose and the following steps are based on it:

After creating a new domain (e.g., click “Manage Domain” -> ”Management Tools” -> “Nameservers” -> “Use custom nameservers (enter below)”. Enter two name servers for this domain. Here we will use Rackspace Name Servers as follows and I will explain why.


Save the above new name servers. For example,

Image for post
Image for post
Use custom name servers

Now we have registered a new free domain name and set up name servers for it. Next we will find a DNS provider.

DNS Provider: Rackspace provides free DNS for each account (), so we just need to register a Rackspace account, if we do not have one.

After logging into Rackspace account, Choose “Networking” -> “Cloud DNS” -> “Create Domain”. The Domain Name will be the one that just has been created (e.g. Two name server will be automatically added: (1) (2), after the domain is created in Rackspace.

Please see the following for an example:

Image for post
Image for post
Add a DNS provider in Rackspace

Now Let’s move back to OneOps: create a DNS service powered by “rackspace-dns”, then specify the following parameters:

  • Username: this is the username of Rackspace login
  • API Key: this is from “Account Settings” page of Rackspace
  • Zone: for now, this could be any string (e.g. For production use cases, it will be carefully configured.
  • Cloud DNS ID: fill in some string, but this is not important for now.

GDNS Service

Add the GDNS service (again “rackspace-dns”) with same above configurations. Please note that GDNS may be config differently than DNS when using in production.

Mirror Service

Some open-source applications on OneOps need to download the binary from some public mirror (e.g. ). Mirror service is to organize various “download” links into one central place. Now, we could add a default Mirror service without any customization.

Deploy Application on OpenStack via OneOps

Here we choose MySQL as the application to deploy. After creating a MySQL design, there are several configuration updates need to be made in the “Design” phase:

  1. compute: “require public IP” should be enabled
  2. database: type in your preferred MySQL login password
  3. user: click the “+” button and add a new user instance: (1) the login name of your local workstation as “Username”, (2) copy & paste the SSH public key (e.g. .ssh/ of your local login name to “Authorized Keys”. Therefore you could directly SSH into the OpenStack VM from your local machine, after the deployment completes.

Commit the design and create a “single” environment, then deploy. The deployment plan may resemble as following,

Image for post
Image for post
MySQL deployment plan

After the deployment, open a local terminal and SSH to the OpenStack VM “ssh your_local_login@float_ip”. Login the mysql client “mysql -u myuser”, then start to type some MySQL commands (e.g. show databases;).

[root@mysql-87316–1–90827 test-user]# mysql -u myuser 
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.5.49 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.mysql> show databases;
+ — — — — — — — — — — +
| Database |
+ — — — — — — — — — — +
| information_schema |
| test |
+ — — — — — — — — — — +
2 rows in set (0.01 sec)

Now we have deployed a MySQL instance on OpenStack via OneOps.

What Next?

MySQL deployment could be done with more production-driven practices, e.g. clustering, high availability, monitoring. Meanwhile I hope to introduce other interesting application templates to help audiences recognize the huge values of OneOps . Please stay tuned!

Walmart Global Tech Blog

We’re powering the next great retail disruption.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store