{"id":4788,"date":"2014-06-13T17:25:00","date_gmt":"2014-06-13T15:25:00","guid":{"rendered":"http:\/\/blog.zhaw.ch\/icclab\/?p=4788"},"modified":"2014-06-13T17:25:37","modified_gmt":"2014-06-13T15:25:37","slug":"openshift-on-openstack-round-one","status":"publish","type":"post","link":"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/","title":{"rendered":"OpenShift on OpenStack: Round One"},"content":{"rendered":"<p>In the <a href=\"http:\/\/blog.zhaw.ch\/icclab\/getting-started-with-openshift-and-openstack\/\">our last article<\/a> on <a href=\"http:\/\/www.openstack.org\">OpenStack<\/a> and <a href=\"https:\/\/www.openshift.com\/\">OpenShift<\/a> we showed how you could setup these two large systems quickly and fast but on your local system. Now what if you wanted to use OpenStack to provide OpenShift capabilities to a set of users?<\/p>\n<p>Well why not use the cloud?! So the idea in this post is to use OpenStack as a provider of a computation and storage (essentially a VM), quickly provision the VM and then through a quick set of commands have the VM ready to serve an OpenShift service. This is something that is done in the <a title=\"Mobile Cloud Networking\" href=\"http:\/\/blog.zhaw.ch\/icclab\/mobile-cloud-networking-2\/\">Mobile Cloud Networking project<\/a>, where we use OpenShift as a means to provide a service orchestration capability for all types of services, including ones like EPC (evolved packet core) and IMS (IP Multimedia Subsystem).<\/p>\n<p>So let&#8217;s get started!<\/p>\n<p>First we need a VM and so you&#8217;ll need a friendly IaaS provider. Luckily, the ICCLab operates OpenStack and so for this exercise we&#8217;ll create a VM&#8230;<\/p>\n<pre><code>$ source $my_openstack_credentials\r\n$ nova boot --flavor m1.large --image centos-6.5 --key-name my_key ops_aio\r\n<\/code><\/pre>\n<p>Once done you should assign a floating IP to this VM. Now that the VM is accessible, we&#8217;ll set things up for our puppet run. There is some pre-step (all could be puppetised) that need to be done, once having SSH&#8217;ed into the newly created host:<\/p>\n<pre><code>$ sudo -i\r\n\r\n$ hostname ops.cloudcomplab.ch\r\n\r\n$ rpm -ivh http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm \r\n\r\n$ echo \"[openshift-origin-deps]\r\nname=OpenShift Origin Dependencies - EL6\r\nbaseurl=http:\/\/mirror.openshift.com\/pub\/origin-server\/release\/3\/rhel-6\/dependencies\/x86_64\/\r\ngpgcheck=0\" &amp;&gt; \/etc\/yum.repos.d\/openshift-origin-deps.repo\r\n\r\n$ yum -y update --exclude kernel*\r\n$ yum -y install libcgroup dbus puppet wget\r\n\r\n$ sed -i 's\/enforcing\/permissive\/g' \/etc\/selinux\/config\r\n$ setenforce 0\r\n\r\n$ wget https:\/\/dl.dropboxusercontent.com\/u\/165239\/mcn_cc.tar.gz\r\n$ tar xvf mcn_cc.tar.gz\r\n$ rm -f mcn_cc.tar.gz\r\n\r\n$ puppet apply --verbose --modulepath '\/root\/mcn_cc\/modules' --manifestdir \/root\/mcn_cc\/manifests --detailed-exitcodes \/root\/mcn_cc\/manifests\/site.pp\r\n<\/code><\/pre>\n<p>Once the run has completed you will be able to access the OpenShift service at $FL_IP. At this point you would be able to create various runtime containers (e.g. Python, ruby etc) but in order for this to completely work, you will need some control over DNS settings. Access details can be found in the puppet manifest. To create new users run this:<\/p>\n<pre>oo-register-user -l admin -p adminpass --username me --userpass mypass<\/pre>\n<p>The last and final step that you might want to do is to setup a wildcard DNS entry. You only need do this if you want to serve users from a domain name (e.g. acme.com) that you have control over. The entry for bind would look like this:<\/p>\n<pre> *.openshift\u00a0\u00a0\u00a0\u00a0\u00a0 IN\u00a0\u00a0\u00a0\u00a0\u00a0 A\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1.23.33.46<\/pre>\n<p>By having this you will be able to access your applications under the domain, for example http:\/\/mywebapp-theuser.openshift.acme.com<\/p>\n<p>Next up we&#8217;ll look at modifying this setup so a number of VMs are used to provide parts of the overall OpenShift system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the our last article on OpenStack and OpenShift we showed how you could setup these two large systems quickly and fast but on your local system. Now what if you wanted to use OpenStack to provide OpenShift capabilities to a set of users? Well why not use the cloud?! So the idea in this [&hellip;]<\/p>\n","protected":false},"author":72,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[],"features":[],"class_list":["post-4788","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>OpenShift on OpenStack: Round One - Service Engineering (ICCLab &amp; SPLab)<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OpenShift on OpenStack: Round One\" \/>\n<meta property=\"og:description\" content=\"In the our last article on OpenStack and OpenShift we showed how you could setup these two large systems quickly and fast but on your local system. Now what if you wanted to use OpenStack to provide OpenShift capabilities to a set of users? Well why not use the cloud?! So the idea in this [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/\" \/>\n<meta property=\"og:site_name\" content=\"Service Engineering (ICCLab &amp; SPLab)\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-13T15:25:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-06-13T15:25:37+00:00\" \/>\n<meta name=\"author\" content=\"Andy Edmonds\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andy Edmonds\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/\"},\"author\":{\"name\":\"Andy Edmonds\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684\"},\"headline\":\"OpenShift on OpenStack: Round One\",\"datePublished\":\"2014-06-13T15:25:00+00:00\",\"dateModified\":\"2014-06-13T15:25:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/\"},\"wordCount\":381,\"commentCount\":1,\"articleSection\":[\"*.*\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/\",\"name\":\"OpenShift on OpenStack: Round One - Service Engineering (ICCLab &amp; SPLab)\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#website\"},\"datePublished\":\"2014-06-13T15:25:00+00:00\",\"dateModified\":\"2014-06-13T15:25:37+00:00\",\"author\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\/\/blog.zhaw.ch\/icclab\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OpenShift on OpenStack: Round One\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#website\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/\",\"name\":\"Service Engineering (ICCLab &amp; SPLab)\",\"description\":\"A Blog of the ZHAW Zurich University of Applied Sciences\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.zhaw.ch\/icclab\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684\",\"name\":\"Andy Edmonds\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g\",\"caption\":\"Andy Edmonds\"},\"sameAs\":[\"http:\/\/andy.edmonds.be\"],\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/author\/edmo\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"OpenShift on OpenStack: Round One - Service Engineering (ICCLab &amp; SPLab)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/","og_locale":"en_US","og_type":"article","og_title":"OpenShift on OpenStack: Round One","og_description":"In the our last article on OpenStack and OpenShift we showed how you could setup these two large systems quickly and fast but on your local system. Now what if you wanted to use OpenStack to provide OpenShift capabilities to a set of users? Well why not use the cloud?! So the idea in this [&hellip;]","og_url":"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/","og_site_name":"Service Engineering (ICCLab &amp; SPLab)","article_published_time":"2014-06-13T15:25:00+00:00","article_modified_time":"2014-06-13T15:25:37+00:00","author":"Andy Edmonds","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andy Edmonds","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/#article","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/"},"author":{"name":"Andy Edmonds","@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684"},"headline":"OpenShift on OpenStack: Round One","datePublished":"2014-06-13T15:25:00+00:00","dateModified":"2014-06-13T15:25:37+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/"},"wordCount":381,"commentCount":1,"articleSection":["*.*"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/","url":"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/","name":"OpenShift on OpenStack: Round One - Service Engineering (ICCLab &amp; SPLab)","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/#website"},"datePublished":"2014-06-13T15:25:00+00:00","dateModified":"2014-06-13T15:25:37+00:00","author":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684"},"breadcrumb":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.zhaw.ch\/icclab\/openshift-on-openstack-round-one\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/blog.zhaw.ch\/icclab\/"},{"@type":"ListItem","position":2,"name":"OpenShift on OpenStack: Round One"}]},{"@type":"WebSite","@id":"https:\/\/blog.zhaw.ch\/icclab\/#website","url":"https:\/\/blog.zhaw.ch\/icclab\/","name":"Service Engineering (ICCLab &amp; SPLab)","description":"A Blog of the ZHAW Zurich University of Applied Sciences","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.zhaw.ch\/icclab\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684","name":"Andy Edmonds","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g","caption":"Andy Edmonds"},"sameAs":["http:\/\/andy.edmonds.be"],"url":"https:\/\/blog.zhaw.ch\/icclab\/author\/edmo\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/4788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/users\/72"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/comments?post=4788"}],"version-history":[{"count":6,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/4788\/revisions"}],"predecessor-version":[{"id":5180,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/4788\/revisions\/5180"}],"wp:attachment":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/media?parent=4788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/categories?post=4788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/tags?post=4788"},{"taxonomy":"features","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/features?post=4788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}