<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1194005000700189&amp;ev=PageView&amp;noscript=1">

From Vizuri's Experts

Open Hybrid Cloud with OpenShift Origin and Windows Azure

As part of my "PaaS Anywhere" talk at this year's Red Hat Summit, I deployed OpenShift Origin and Enterprise into multiple Cloud Providers - including RackspaceDigital Ocean, & Amazon Web Services.

The OpenShift oo-install tool is one of the simplest ways to do the installation. Let's walk through the details of deploying OpenShift on Windows Azure. We'll just deploy a single server that performs the Broker and Node functions, but the oo-install tool makes it pretty easy to install a single broker with multiple nodes on different servers.

General Microsoft Azure Setup

First, if you haven't already create an account over at Windows Azure.

Once you have an account, we're going to create a new Compute Virtual Machine instance.


We'll select the OpenLogic Centos image as the base image for our install.


A Standard A3 instance size will work for the demo purposes. We'll also use a password to login, but ideally a certificate should be used to increase overall security. 


For the Cloud Service, we'll want a to make sure to add SSH, HTTP, HTTPS, and DNS(both UDP & TCP) as available ports. 


Finally, we'll install the Azure agent so that we can monitor the CPU and other resource statistics.


This will start the provisioning process. Once this is complete, we will be able to login via the login information we created during the Virtual Machine configuration steps.

View our OpenShift
Expert Consulting Services Here

Preparing for Installing OpenShift Origin

From a terminal, login to the newly created CentOS Virtual Machine at Windows Azure and accept the new RSA Keyprint:

$ ssh openshift@vizuripaas.cloudapp.net
The authenticity of host &#39;vizuripaas.cloudapp.net (; can&#39;t be established.
RSA key fingerprint is 18:0c:b7:00:6e:62:ab:64:cb:2c:7d:dc:3c:ea:a8:3d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added &#39;vizuripaas.cloudapp.net,; (RSA) to the list of known hosts.
openshift@vizuripaas.cloudapp.net&#39;s password:

Once we're logged in, the first step will be to update the packages:

$ sudo su
# yum -y update

Next, we need to configure and verify the hostname information so that it is resolvable and correct:

# hostname vizuripaas.cloudapp.net
# cat /etc/sysconfig/network

Let's install some basic repositories that we'll need to support the install of OpenShift Origin:

# pushd /etc/yum.repos.d
# wget http://people.redhat.com/bkabrda/scl_ruby193.repo
# popd 
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Finally, let's install some basic packages that we'll need for running the OpenShift oo-install tool:

yum -y install ruby unzip screen ruby193-ruby puppet ansible facter augeas bind httpd-tools

Download the OpenShift PaaS Anywhere
Slide Deck Here

Installing OpenShift Origin with OO-Install

The oo-install process can take a long time, so we are going to run it in a screen session so that we can disconnect and let the process continue. We'll also have to enable ruby193. These can be done as follows:

# screen
# scl enable ruby193 bash
# sh &lt;(curl -s https://install.openshift.com/)

The last line will download the oo-install tool. The output will look like the following:

Checking for necessary tools...
...looks good.
Downloading oo-install package...
Extracting oo-install to temporary directory...
Starting oo-install...
OpenShift Installer (Build 20140326-1931)
Welcome to OpenShift.
This installer will guide you through a basic system deployment, based
on one of the scenarios below.
Select from the following installation scenarios.
You can also type &#39;?&#39; for Help or &#39;q&#39; to Quit:
1. Install OpenShift Origin
2. Add a Node to an OpenShift Origin deployment
3. Generate a Puppet Configuration File
Type a selection and press &lt;return&gt;:

To begin the install, we're going to select option 1. Entering 1 will produce the following output:

It looks like you are running oo-install for the first time on a new system. The installer will guide you through the process of defining your OpenShift deployment.

Since we are doing a new install, we won't have a running broker. Enter 'n' at this line:

First things first: do you already have a running Broker? (y/n/q) n
Okay. We will gather information to install a Broker in a moment. Before we do that, we need to collect some information about your OpenShift DNS configuration.

Enter your domain information. For this example, we are using cloudapp.net.

What domain do you want to use for applications that are hosted by this OpenShift deployment? |example.com| cloudapp.net

It's easier if the BIND DNS component has DNS information for the hosts that we will use as OpenShift Brokers and Nodes. While you can use different domains for your applications and the hosts that will be hosting those applications, for this example we are going to use the same Domain.

Do you want to register DNS entries for your OpenShift hosts with the same OpenShift DNS service that will be managing DNS records for the hosted applications? (y/n/q) y
What domain do you want to use for the OpenShift hosts? cloudapp.net
You have specified the same domain for your applications and your OpenShift components. Do you wish to keep these settings? (y/n/q) y
That&#39;s all of the DNS information that we need right now. Next, we need to gather information about the hosts in your OpenShift deployment.

Next we're going configure the Broker FQDN Information:

Broker Configuration
Okay. I&#39;m going to need you to tell me about the host where you want to install the Broker.
Hostname (the FQDN that other OpenShift hosts will use to connect to the host that you are describing): vizuripaas.cloudapp.net
Hostname / IP address for SSH access to vizuripaas.cloudapp.net from the host where you are running oo-install. You can say &#39;localhost&#39; if you are running oo-install from the system that you are describing: |vizuripaas.cloudapp.net| localhost

Next we'll configure the IP Information for our broker. We'll use the default assigned Azure IP Address:

Detected IP address at interface eth0 for this host.
Do you want Nodes to use this IP information to reach this host?
(y/n/q/?) y
Normally, the BIND DNS server that is installed on this Broker will be reachable from other OpenShift components using the Broker&#39;s configured IP address (
If that will work in your deployment, press &lt;enter&gt; to accept the default value. Otherwise, provide an alternate IP address that will enable other OpenShift components to reach the BIND DNS service on the Broker: ||
That&#39;s everything we need to know right now for the Broker. Moving on to the next role.    

Now we have enough information to configure our Broker hosts. Next we're going to our Node which will be used to host OpenShift applications. Since this is a new install, we don't have an existing Node to add.

Node Configuration
Do you already have a running Node? (y/n/q) n
Okay. I&#39;m going to need you to tell me about the host where you want to install the Node.
You have already desribed the following host system(s):
* vizuripaas.cloudapp.net (Broker)

We'll also keep this simple and add the Node role to the same server as our Broker. Ideally, we will want these roles on separate nodes, but this will simplify our example exercise here.

Do you want to assign the Node role to vizuripaas.cloudapp.net?
(y/n/q/?) y
Okay. Adding the Node role to vizuripaas.cloudapp.net.
That&#39;s everything we need to know right now for the Node.

Now that we've entered both the Broker and Node configurations, we'll want to verify it before moving on to the installation repository information.

Here are the details of your current deployment.
Note: ActiveMQ, MongoDB and named will all be installed on the Broker.
For more flexibility, rerun the installer in advanced mode (-a).
DNS Settings
  * App Domain: cloudapp.net
  * Register OpenShift components with OpenShift DNS? Yes
  * Component Domain: cloudapp.net
Role Assignments
| Broker | vizuripaas.cloudapp.net |
| Node   | vizuripaas.cloudapp.net |
Host Information
| Host           | vizuripaas.cloudapp.net |
| Roles          | Broker, Node                 |
| SSH Host       | localhost                    |
| User           | root                         |
| IP Addr        |               |
| BIND DNS Addr  |               |
| IP Interface   | eth0                         |
| Install Status | new                          |
Do you want to change the deployment info? (y/n/q/?) n

This will bring up the Subscription configuration information that we'll need to enter in order to download the OpenShift Origin software packages.
Here is the subscription configuration that the installer will use for this deployment. +----------------------------------------------------------------------------------------+ | Setting | Value |
+----------------------------------------------------------------------------------------+ | type | yum | | repos_base | https://mirror.openshift.com/pub/origin-server/release/3/fedora-19 | | jboss_repo_base | - | | jenkins_repo_base | http://pkg.jenkins-ci.org/redhat | | os_repo | - | | os_optional_repo | - | +-------------------+--------------------------------------------------------------------+

Do you want to make any changes to the subscription info in the
configuration file? (y/n/q/?)  y

Since we're using CentOS 6.5, we'll want to use the RHEL-6 repository. If you were installing OpenShift Enterprise, you could use RHN or Subscription Manager to do it. We're going to be installing Origin and will use the publicly available Yum repository. Information on how to do this is shown below:

Do you want to make any changes to the subscription info in the

configuration file? (y/n/q/?) y

What type of subscription should be used? (none, yum) |yum|
The base URL for the OpenShift repositories? (Use &#39;-&#39; to leave unset)
|https://mirror.openshift.com/pub/origin-server/release/3/fedora-19| https://mirror.openshift.com/pub/origin-server/release/3/rhel-6
The base URL for a JBoss repository? (Use &#39;-&#39; to leave unset) |-|
The base URL for a Jenkins repository? (Use &#39;-&#39; to leave unset)
The URL of a yum repository for the operating system? (Use &#39;-&#39; to
leave unset) |-|
The URL for an &quot;Optional&quot; repository for the operating system? (Use
&#39;-&#39; to leave unset) |-|
Here is the subscription configuration that the installer will use for
this deployment.
| Setting           | Value                                                           |
| type              | yum                                                             |
| repos_base        | https://mirror.openshift.com/pub/origin-server/release/3/rhel-6 |
| jboss_repo_base   | -                                                               |
| jenkins_repo_base | http://pkg.jenkins-ci.org/redhat                                |
| os_repo           | -                                                               |
| os_optional_repo  | -                                                               |
Do you want to go back and modify your subscription info settings in
the configuration file? (y/n/q/?) n

Now we're almost ready to begin. Once last validation check:

Do you want to go back and modify your subscription info settings in
the configuration file? (y/n/q/?) n
Do you want to set any temporary subscription settings for this
installation only? (y/n/q/?) n
Preflight check: verifying system and resource availability.
Checking vizuripaas.cloudapp.net:
* Target host is running non-Fedora, non-RHEL
* Located getenforce
* SELinux is running in enforcing mode
* Located yumprovider
* Located puppet
* Located augtool
* Located dnssec-keygen
* Located htpasswd
* Located scl
* The ruby193 software collection is installed.
* epel repository is present and enabled

At this point the installation is taking place. If you followed the steps above and used 'screen', we can detach the session and come back. It will take at least 15 minutes to install and configure all the packages. To detach, enter CTRL-A + D in the session window. To reattach, enter 'screen -r'.

Once OpenShift Origin is installed, you will be able to browse to it in a browser as shown in the example below. The default user is 'demo' and the password will be 'changeme' :


That's it. You now have OpenShift Origin running within Windows Azure. To install OpenShift into other cloud providers, follow the same steps above with the only difference being how you provision a VM Instance, as that will be specific to your provider. For more on the OpenShift oo-install tool, simply follow the web site link. If you're interested in learning more about how you can deploy your PaaS solution anywhere and begin your open hybrid cloud journey, check out the PaaS Anywhere presentation.

View Slides

Isaac Christoffersen

Isaac Christoffersen has over 15 years of experience in system integration and software solutions development for non-profit, commercial, and government clients. He is a technology innovator and community-leader with a unique blend of business acumen and technology skills.