Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 164

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 167

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 170

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 173

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 176

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 178

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 180

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 202

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 206

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 224

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 225

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 227

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 321

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 321

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 321

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/includes/class.layout.php on line 321

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/admin/class.options.metapanel.php on line 56

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/admin/class.options.metapanel.php on line 56

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/admin/class.options.metapanel.php on line 56

Warning: Creating default object from empty value in /home/kraman/krishnaraman.net/public/wp-content/themes/platform/admin/class.options.metapanel.php on line 49
OpenShift Origin on OpenStack | Krishna Raman

Note: OpenShift Origin has recently moved to use Ruby 1.9 and Fedora 17. Following instructions on this post will no longer lead to a working Origin image. I am working on a new set of instructions of the latest release of Origin.

I have seen a growing interest in setting OpenShift Origin on OpenStack machines. This post will walk you through the basic setup of building and running OpenShift Origin on OpenStack.

Setting up OpenStack

The first step to get started is setting up OpenStack on a Fedora 17 machine. The folks over at Fedora have already put together an excellent how-to to get you started. After the installation is completed, you should have a OpenStack dashboard available at http://localhost/dashboard

A few things to note about the process:

I started from a Fedora 17 net-install disk and chose “Software development” which gave me a gnome-ui and basic software dev tools. It should be possible to do the intal with a minimal install as well.

I also ran into qpid-cpp-server issues where F17 reported it installed but the binaries were not present. I had to uninstall the qpid-cll-client and yum install qpid-cpp-server-0.16-1.0.16-fc17.2.x86_64. The base issue seems to be a multi-version conflict around i686 vs x86_64. This seemed to solve the problem.
Note: This does not seem to be an issue anymore.

I also found it handy to have virt-manager installed to debug the setup and build new images.

If you are running OpenStack on a physical machine, you will need to open the /etc/nova/nova.conf file and remove libvirt_type=qemu

Option 1: Building the OpenShift image using Oz

Install Oz (You may need to enable the updates-testing repository to resolve dependencies)

Create a new template file named openshift.tdl (based on f16-jeos.tdl provided by Fedora)

Invoke oz-image to cerate the image:

If you are using kvm/qemu, the disk will be stored in /var/lib/libvirt/images/. We will use qemu-img to create a qcow2 compressed image.

Finally, import the image into glace.

At this point, the OpenShift Origin disk image should be available for you to launch on OpenStack.

Option 2: Building the OpenShift image manually

Using virt-manager, start a new Fedora 16 guest (net-inst iso) and log into it using virt-manager.

Create a new user to perform the OpenShift Origin build steps and add the user to the wheel group so that you can use sudo.

Switch to the build user and follow the steps from my post about build a multi-node OpenShift setup. You will only need to build the broker machine and skip the “ss-setup-broker” step.

At the end of the setup, you will have a qemu VM with the OpenShift Origin packages installed. Next we need to set up the grub and ssk-key scripts.

Edit the /etc/default/grub and remove “rhgb” and “quiet”. The final default file should look like

Run grub2-mkconfig to re-generate the Grub config.

Installing a script to setup root ssh keys.

Make sure network and ssh will start

To keep the final image size to a minimum, we need to make sure that all the empty space on the filesystem is zero’d out. I use zerofree to do this.

We will need to switch to single user mode and then remount the filesystem as read-only before we can run zerofree.

If you are using kvm/qemu, the disk will be stored in /var/lib/libvirt/images/. We will use qemu-img to create a qcow2 compressed image.

Finally, import the image into glace.

At this point, the OpenShift Origin disk image should be available for you to launch on OpenStack.

Final configuration

Once the origin machine is up and running, ssh into the machine as root and run ss-setup-broker to complete the setup process for a broker machine.

 

5 Responses to OpenShift Origin on OpenStack

  1. George Chen says:

    i execute “sudo openstack-db –service nova –init”,but mysql is not installed successfully,the errors as follows:

    Error: Package: mysql-server-5.5.25a-1.fc17.i686 (updates)
    Requires: mysql-libs(x86-32) = 5.5.25a-1.fc17
    Installed: mysql-libs-5.5.27-1.fc17.i686 (@updates-testing)
    mysql-libs(x86-32) = 5.5.27-1.fc17
    Available: mysql-libs-5.5.23-1.fc17.i686 (fedora)
    mysql-libs(x86-32) = 5.5.23-1.fc17
    Available: mysql-libs-5.5.25a-1.fc17.i686 (updates)
    mysql-libs(x86-32) = 5.5.25a-1.fc17
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest
    mysqld is not running. Would you like to start it now? (y/n): y
    Failed to issue method call: Unit mysqld.service failed to load: No such file or directory. See system logs and 'systemctl status mysqld.service' for details.
    error reading information on service mysqld: No such file or directory
    Since this is a fresh installation of MySQL, please set a password for the 'root' mysql user.
    Enter new password for 'root' mysql user:
    Enter new password again:
    /bin/openstack-db: line 196: mysql: command not found
    Failed to set password for 'root' MySQL user.

    • kraman says:

      Hi George, I’m not an expert as far as the OpenStack installation goes but it looks like you ran into a broken MySql RPM onFedora 17.
      I would recommend jumping on #fedora IRC channel on free node and asking for help.

  2. ravishankar says:

    i have followed the instructions of build your own paas openshift and completed the openshift locally.

    Now how can i deploy a wordpress app

    and how to deploy this openshift on openstack

    • kraman says:

      Hi Ravishankar. I will posting updated instructions to work with F17 soon. The current codebase runs only on Ruby 1.9 so it wont work as-is using the instructions posted above.
      I would also recommend jumping on IRC #openshift-dev on freenode if you need help with getting wordpress up.

  3. Decaflow says:

    Where can we find instructions for Openshift on Openstack for fedora 17 and 18?
    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">