Miles to go 2.0 …

Arun Gupta is a technology enthusiast, avid runner, author of a best-selling book, globe trotter, a community guy, Java Champion, JavaOne Rockstar, JUG Leader, Minecraft Modder, Devoxx4Kids-er, and a Red Hatter.

Cloud in a Box: OpenShift Online in VirtualBox (Tech Tip #46)

OpenShift-logo

OpenShift is Red Hat’s PaaS platform and comes in three flavors:

  • Origin is the Community PaaS offering. You can explore the community-driven open source upstream of OpenShift. Join the community.
  • Online is the Public PaaS offering. Host your applications in the public cloud with automated provisioning, management, and scaling of applications. Sign up for free.
  • Enterprise is the Private PaaS offering. Leverage PaaS in your own data centers and private cloud. Request evaluation.

This Tech Tip will show how you can setup a Virtual VM running with OpenShift Online. Instructions at openshift.github.io/documentation/oo_deployment_guide_vm.html are pretty self explanatory. Here are the exact ones that I followed on Mavericks:

  1. Download VM:
    curl -O https://mirror.openshift.com/pub/origin-server/release/4/images/openshift-origin.tgz
  2. Unpack VM files
    tar xzvf ~/Downloads/openshift-origin.tgz 
    x OpenShift Origin v4/
    x OpenShift Origin v4/OpenShift Origin v4.nvram
    x OpenShift Origin v4/OpenShift Origin v4.vbox
    x OpenShift Origin v4/OpenShift Origin v4.vmsd
    x OpenShift Origin v4/OpenShift Origin v4.vmx
    x OpenShift Origin v4/OpenShift Origin v4.vmxf
    x OpenShift Origin v4/._origin-vm.vmdk
    x OpenShift Origin v4/origin-vm.vmdk
  3. Follow the instructions to create a VirtualBox instance. Create a new hard drive using the unzipped origin-vm.vmdk file.

    IMPORTANT: Instead of 4.2.4 to add bridged networking, setup a host-only network using 4.2.5.

  4. Boot the VM to see the output as:

    openshift-online-techtip46

    Type “5” to exit to the command prompt.

  5. VM comes pre-configured with Avahi DNS service and so now you can access OpenShift console at broker.openshift.local and seen as:

    openshift-origin-console-techtip46

    The username/password are “demo”/”changeme”.

  6. Create an SSH tunnel into the VM as:
    ssh -f root@broker.openshift.local -L 8080:localhost:8080 -N

    Password is “changeme”. OpenShift admin console is now accessible at localhost:8080/admin-console and looks like:

    openshift-console-techtip46

    More details about Admin Console are well documented.

Many thanks to Harrison for guiding me through creating this process!

Ask your OpenShift questions at stackoverflow or follow them at @openshift.

Enjoy!

 

Be Sociable, Share!

Tags:

2 Responses to “Cloud in a Box: OpenShift Online in VirtualBox (Tech Tip #46)”

  1. experimancer says:

    Thanks for this updated guide in which bridged network adapter is not setup at all, but only the ho vvst-only network. Now, my understanding is that the OpenShift CM can not connect to outside internet making quickstart and other external cartridge installation impossible. It also says so in the linked 4.2.5. guide. So, I’m a bit puzzeled whether the VirtualBox is suitable virtualization engine for OpenShift Online..

    Could you elaborate on this?

    Cheers,
    -OpenITeX => experimancer of all #open tech ;)

  2. N. Harrison Ripps says:

    experimancer – couple of comments on that:

    1. Just to clarify – the OpenShift VM actually runs a version of OpenShift Origin, which is the community version of OpenShift. Meanwhile, OpenShift Online is our commercially hosted version, which runs at openshift.com.

    2. The VM ships with a network adapter configuration that seems to work fine in VirtualBox in most situations. However, as noted in the VM Deployment Guide, we hit some cases where VirtualBox did not handle the networking correctly when we were connected to a VPN. This is why we provide an alternative network configuration; it is not ideal but enables users to get some sense of how OpenShift Origin works even in those conditions.

    That said, VirtualBox is only one deployment option for the VM. As you can see in the VM Deployment Guide, we also support KVM and VMWare.

    Hope this helps!

Leave a Reply

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


3 + = six

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