{"id":322,"date":"2015-11-26T07:26:18","date_gmt":"2015-11-26T07:26:18","guid":{"rendered":"http:\/\/tuxlabs.com\/?p=322"},"modified":"2016-03-01T23:02:47","modified_gmt":"2016-03-01T23:02:47","slug":"installing-openstack-kilo-on-centos-7","status":"publish","type":"post","link":"https:\/\/tuxlabs.com\/?p=322","title":{"rendered":"Installing Openstack Kilo on Centos 7"},"content":{"rendered":"<p><a href=\"http:\/\/tuxlabs.com\/wp-content\/uploads\/2015\/11\/openstack-kilo-logo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-327 alignleft\" src=\"http:\/\/tuxlabs.com\/wp-content\/uploads\/2015\/11\/openstack-kilo-logo.png\" alt=\"openstack-kilo-logo\" width=\"220\" height=\"88\" \/><\/a><br \/>\nIn a previous article I wrote about <a href=\"http:\/\/tuxlabs.com\/?p=82\">how to install Openstack Icehouse on CentOS 6.5<\/a> in great detail. In this article, I am going to keep verbosity to a minimum and just give you the commands ! I am hoping this will be refreshing for my audience. If you are curious however, about the what, when and why please read my <a href=\"http:\/\/tuxlabs.com\/?p=82\">previous article<\/a>.<\/p>\n<h3>Pre-requisites<\/h3>\n<ol>\n<li>You need a machine with x86_64 architecture with at least 4 GB of memory &amp; 2 NIC&#8217;s.<\/li>\n<li>On this machine you need to install CentOS 7 as a minimal install<\/li>\n<li>You should create a user with admin privileges (i.e. wheel, in my case &#8216;tuxninja&#8217; was created)<\/li>\n<li>Disable SELinux\n<ol>\n<li>vi \/etc\/sysconfig\/selinux<\/li>\n<li>SELINUX=disabled<\/li>\n<li>save changes<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h3>Jumping Right In<\/h3>\n<p>Here are the commands you need to run.<\/p>\n<ol>\n<li>sudo yum update -y<\/li>\n<li>sudo yum install -y\u00a0https:\/\/repos.fedorapeople.org\/repos\/openstack\/openstack-kilo\/rdo-release-kilo-1.noarch.rpm<\/li>\n<li>sudo\u00a0yum\u00a0install\u00a0epel-release<\/li>\n<li>sudo\u00a0yum\u00a0install\u00a0-y\u00a0openstack-packstack<\/li>\n<\/ol>\n<p>Now at this point if you ran &#8216;packstack&#8217; you would run into a bug with this message<\/p>\n<pre class=\"nums:false lang:default decode:true \">ERROR : Error appeared during Puppet run: 192.168.1.10_prescript.pp\r\nError: Could not find data item CONFIG_USE_SUBNETS in any Hiera data file and no default supplied at \/var\/tmp\/packstack\/053c9a3614de4404b906141268c08f0a\/manifests\/192.168.1.10_prescript.pp:2 on node diamond.tuxlabs.com<\/pre>\n<p>The workaround for this bug is as follows<\/p>\n<ol>\n<li>sudo rpm -e puppet<\/li>\n<li>sudo rpm\u00a0rpm -e hiera<\/li>\n<li>curl -O https:\/\/yum.puppetlabs.com\/el\/7\/products\/x86_64\/hiera-1.3.4-1.el7.noarch.rpm<\/li>\n<li>sudo\u00a0rpm -ivh hiera-1.3.4-1.el7.noarch.rpm<\/li>\n<li>vi \/etc\/yum.repos.d\/epel.repo\n<ol>\n<li>At the bottom of the\u00a0[epel] section, after the gpgkey add a newline with:\u00a0exclude=hiera*<\/li>\n<li>Save the file<\/li>\n<\/ol>\n<\/li>\n<li>sud0\u00a0yum install -y puppet-3.6.2-3.el7.noarch<\/li>\n<li>reboot<\/li>\n<li>sudo rm \/etc\/puppet\/hiera.yaml<\/li>\n<li>sudo packstack &#8211;allinone<\/li>\n<\/ol>\n<p>This should successfully install. Godspeed.<\/p>\n<h2>Networking<\/h2>\n<p>Now that Openstack is setup, we still have to setup our network with private &amp; public routed networks, so we can turn this into a real multi-node setup and ssh to our hosts and let them reach the internet etc. To do this, much like my previous post you need to modify your \/etc\/sysconfig\/network-scripts\/ files to reflect this.<\/p>\n<pre class=\"nums:false lang:default decode:true\">[tuxninja@diamond network-scripts]$ cat ifcfg-enp4s0f0\r\nNAME=\"enp4s0f0\"\r\nUUID=\"e0c3929c-1f9b-44d1-9c59-6c8872f603bd\"\r\nDEVICE=\"enp4s0f0\"\r\nTYPE=\"OVSPort\"\r\nNM_CONTROLLED=\"no\"\r\nDEVICETYPE=\"ovs\"\r\nOVS_BRIDGE=\"br-ex\"\r\nBOOTPROTO=\"none\"\r\nONBOOT=\"yes\"\r\n[tuxninja@diamond network-scripts]$ cat ifcfg-enp4s0f1\r\nNAME=enp4s0f1\r\nUUID=ed50b4b6-2c29-4307-bbb0-f3c923f6552a\r\nDEVICE=enp4s0f1\r\nONBOOT=yes\r\nNM_CONTROLLED=no\r\nBOOTPROTO=none\r\nNETWORK=10.0.0.0\r\nIPADDR=10.0.0.1\r\nNETMASK=255.255.255.0\r\n[tuxninja@diamond network-scripts]$ cat ifcfg-br-ex\r\nDEVICE=br-ex\r\nDEVICETYPE=ovs\r\nTYPE=OVSBridge\r\nBOOTPROTO=static\r\nIPADDR=192.168.1.10\r\nNETMASK=255.255.255.0\r\nGATEWAY=192.168.1.1\r\nDNS1=8.8.8.8\r\nDNS2=8.8.4.4\r\nDNS3=192.168.1.1\r\nONBOOT=yes\r\n[tuxninja@diamond network-scripts]$<\/pre>\n<p><strong>Note:<\/strong> I deleted all the IPV6 crap, I think it messes some stuff up. When your done making the changes with your favorite editor, restart networking : sudo \/etc\/init.d\/network restart or sudo systemctl restart network<\/p>\n<p>Next go into in the Horizon Dashboard GUI and delete the demo project. See my previous article for details on how.<\/p>\n<h3>Back On the All-In-One Node Console<\/h3>\n<pre class=\"nums:false lang:default decode:true\">[root@diamond ~]# source keystonerc_admin \r\n[root@diamond ~(keystone_admin)]# neutron router-create router1\r\n[root@diamond ~(keystone_admin)]# neutron net-create private\r\n[root@diamond ~(keystone_admin)]# neutron subnet-create private 10.0.0.0\/24 --name private_subnet\r\n[root@diamond ~(keystone_admin)]# neutron router-interface-add router1 private_subnet\r\n[root@diamond ~(keystone_admin)]# neutron net-create public --router:external\r\n[root@diamond ~(keystone_admin)]# neutron subnet-create public 192.168.1.0\/24 --name public_subnet --enable_dhcp=False --allocation-pool start=192.168.1.51,end=192.168.1.99 --gateway=192.168.1.1\r\n[root@diamond ~(keystone_admin)]# neutron router-gateway-set router1 public<\/pre>\n<p>Next &#8216;reboot&#8217; or restart all openstack services :<\/p>\n<pre class=\"nums:false lang:default decode:true \">for service in `openstack-service list`; do openstack-service restart $service; done<\/pre>\n<p><strong>Note:<\/strong> it appears the &#8211;full-restart flag is gone, used to work !<\/p>\n<p>When logging into your dashboard located at http:\/\/192.168.1.10\/dashboard at some point you might hit a bug that prevent you from logging into the Horizon dashboard see :\u00a0<a href=\"https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=1218894\">https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=1218894<\/a>\u00a0&#8230; the work-around for this is to clear your browser cookies.<\/p>\n<h3>You&#8217;re Done<\/h3>\n<p>That&#8217;s it. Next steps would be to create a project &amp; new admin user, re-create the required network mappings in openstack using the above commands (modify the names to make them unique) and create your ssh key, import it, download some images, import them using glance, and create some VM&#8217;s. Also I like to delete the demo project (you can also prevent this from being created with a flag on the packstack command). Make sure you delete all default security rules and add back ICMP, TCP, and UDP allow ingress \/ egress rules for 0.0.0.0 aka any\/any, again you can <a href=\"http:\/\/tuxlabs.com\/?p=82\">see my article on CentOS 6.5<\/a> with more specifics on how to do this. Additionally, I have an article on <a href=\"http:\/\/tuxlabs.com\/?p=151\">how to add additional compute nodes<\/a> as well.<\/p>\n<p>As always I can be reached for assistance @ tuxninja [at] tuxlabs.com<\/p>\n<p>Happying Stacking !<\/p>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/tuxlabs.com\/?p=322\" rel=\"bookmark\" title=\"Permalink to Installing Openstack Kilo on Centos 7\"><p>In a previous article I wrote about how to install Openstack Icehouse on CentOS 6.5 in great detail. In this article, I am going to keep verbosity to a minimum and just give you the commands ! I am hoping this will be refreshing for my audience. If you are curious however, about the what, [&hellip;]<\/p>\n<\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118,130,1,28,12],"tags":[15,119,124,121,13,123,122,125,16,53,29,120],"class_list":{"0":"post-322","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-centos","7":"category-cloud","8":"category-howtos","9":"category-openstack-howtos","10":"category-systems-administration","11":"tag-centos","12":"tag-centos7","13":"tag-hiera","14":"tag-kilo","15":"tag-openstack","16":"tag-openvswitch","17":"tag-ovs","18":"tag-ovsbridge","19":"tag-packstack","20":"tag-puppet","21":"tag-rdo","22":"tag-redhat","23":"h-entry","24":"hentry"},"_links":{"self":[{"href":"https:\/\/tuxlabs.com\/index.php?rest_route=\/wp\/v2\/posts\/322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tuxlabs.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tuxlabs.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tuxlabs.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tuxlabs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=322"}],"version-history":[{"count":13,"href":"https:\/\/tuxlabs.com\/index.php?rest_route=\/wp\/v2\/posts\/322\/revisions"}],"predecessor-version":[{"id":337,"href":"https:\/\/tuxlabs.com\/index.php?rest_route=\/wp\/v2\/posts\/322\/revisions\/337"}],"wp:attachment":[{"href":"https:\/\/tuxlabs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tuxlabs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tuxlabs.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}