{"id":147,"date":"2016-09-08T20:06:40","date_gmt":"2016-09-08T20:06:40","guid":{"rendered":"http:\/\/cephswift.com\/?page_id=147"},"modified":"2017-05-17T00:17:05","modified_gmt":"2017-05-17T00:17:05","slug":"redhat-openstack-platform-setup-note","status":"publish","type":"page","link":"https:\/\/cephswift.com\/index.php\/redhat-openstack-platform-setup-note\/","title":{"rendered":"Redhat OpenStack Platform OpenStack 7,8,9 (Kilo, Liberty, Mitaka) setup note"},"content":{"rendered":"<p>@File Create by Benjamin Lu, the cloud architect at Cephswift, if anyone has questions regarding the doc, please send mail to benlu369@yahoo.com.<br \/>\n@The Red Hat build doc is based on &#8220;Red Hat Enterprise Linux OpenStack Platform 7,8,9 Director Installation and Usage&#8221;.<\/p>\n<p>Notes on Red Hat OpenStack Platform 7 build-up:<\/p>\n<p>1. Build-up Red Hat OpenStack Undercloud :<br \/>\n1.1 Setup Undercloud ( on a pre-installed RHEL7 server)<br \/>\n[root@director ~]# useradd stack<br \/>\n[root@director ~]# passwd stack # specify a password<br \/>\n[root@director ~]# echo &#8220;stack ALL=(root) NOPASSWD:ALL&#8221; | tee -a \/etc\/sudoers.d\/stack<br \/>\n[root@director ~]# chmod 0440 \/etc\/sudoers.d\/stack<br \/>\n[root@director ~]# su &#8211; stack<br \/>\n$ mkdir ~\/images<br \/>\n$ mkdir ~\/templates<\/p>\n<p>$ hostname # Checks the base hostname<br \/>\n$ hostname -f # Checks the long hostname (FQDN) ### use this command to setup host name for undercloud installator<br \/>\n## example to setup host name for undercloud installator:<br \/>\n$ sudo hostnamectl set-hostname manager.example.com #### we may use &lt; OSP7_director.cephswift.com&gt; here as:<br \/>\n$ sudo hostnamectl set-hostname OSP7_director.cephswif.com<br \/>\n$ sudo hostnamectl set-hostname &#8211;transient manager.example.com #### we may use &lt; OSP7_director.cephswift.com&gt; here as:<br \/>\n$ sudo hostnamectl set-hostname &#8211;transient OSP7_director1.cephswift.com<\/p>\n<p>1.2 Registering the setup with Red Hat Subscription Manager, to have a full repo pkg access to download, install, update your OS, openstack software for your setup:<\/p>\n<p>$ sudo subscription-manager register userid=, password= $ sudo subscription-mamnger list &#8211;availble &#8211;all<br \/>\n$ sudo subscription-manager repos &#8211;disable=*<br \/>\n$ sudo subscription-manager repos \\<br \/>\n&#8211;enable=rhel-7-server-rpms \\<br \/>\n&#8211;enable=rhel-7-server-optional-rpms \\<br \/>\n&#8211;enable=rhel-7-server-extras- rpms \\<br \/>\n&#8211;enable=rhel-7-server-openstack-7.0-rpms \\<br \/>\n&#8211;enable=rhel-7- server-openstack-7.0-director-rpms<br \/>\n$ sudo yum install yum-plugin-priorities<\/p>\n<p>$ sudo yum install yum-utils<br \/>\n$ sudo yum-config-manager &#8211;enable reponame &#8212; setopt=&#8221;reponame.priority=1&#8243;<\/p>\n<p>$ sudo yum update -y<br \/>\n$ reboot<\/p>\n<p>1.3 Installing the Direct or Packages<br \/>\n[stack@director ~]$ sudo yum install -y python-rdomanager-oscplugin<\/p>\n<p>1.4. Configuring &amp; Install Director ( In undercloud)<br \/>\n$ cp \/usr\/share\/instack-undercloud\/undercloud.conf.sample ~\/undercloud.conf<br \/>\n$ vi ~\/undercloud.conf ### to setup all IPs you are planning for your openstack environment, refer Red Hat doc for details.<br \/>\n$ openstack undercloud install ### this will install everything for undercloud for your configuration along with repos you registerted, it talk sometime.<br \/>\n$ source ~\/stackrc ### go your undercloud Env<\/p>\n<p>2. Build-up Red Hat OpenStack Overcloud :<\/p>\n<p>2.1 Get images for Overcloud nodes:<br \/>\n$ cd ~\/images<br \/>\nwget URL:<br \/>\nObtain these images from the Red Hat Enterprise Linux OpenStack Platform downloads page on the Red Hat Customer Portal at https:\/\/access.redhat.com\/downloads\/content\/191\/ver=7\/rhel&#8212;<br \/>\n7\/7\/x86_64\/product-downloads. This location on the Customer Portal contains the images in TAR. Customer login is needed to on Redhat Site.<br \/>\narchives.<br \/>\n$ for tarfile in *.tar; do tar -xf $tarfile; done;<\/p>\n<p>2.2 Upload image from download into director in underclod:<br \/>\n$ openstack overcloud image upload &#8211;image-path \/home\/stack\/images\/<\/p>\n<p>2.3 Verify image list and PXE, httpboot<\/p>\n<p>$ openstack image list<br \/>\n$ ls \/httpboot -l<\/p>\n<p>2.4 setup nameserver and Neutron Subnet<br \/>\n$ neutron subnet-list<br \/>\n$ neutron subnet-update [subnet-uuid] &#8211;dns-nameserver [nameserver-ip]<br \/>\n$ neutron subnet-show [subnet-uuid] ### verify<\/p>\n<p>2.5 Planning Overcloud ### check details on Redhat Docs according your Env<\/p>\n<p>2.6 Check default Direct Plants for Heat templates collections:<br \/>\n$ openstack management plan list<\/p>\n<p>$ openstack management plan show [UUID]<br \/>\nThis collection is stored in \/usr\/share\/openstack-tripleo-heat-templates.<\/p>\n<p>[stack@osp7-director ~]$ ls -l \/usr\/share\/openstack-tripleo-heat-templates<br \/>\ntotal 296<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 2434 Jun 4 2015 all-nodes-config.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 808 Oct 1 07:30 all-nodes-validation.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1968 Jun 4 2015 base.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 583 Oct 1 07:30 bootstrap-config.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1731 Oct 1 07:30 ceph-cluster-config.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 618 Oct 1 07:30 ceph-storage-post.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 4914 Oct 1 07:30 ceph-storage.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 626 Oct 1 07:30 cinder-storage-post.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 7432 Oct 1 07:30 cinder-storage.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 614 Oct 1 07:30 compute-post.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 19901 Oct 1 07:30 compute.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 615 Oct 1 07:30 controller-post.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 42811 Oct 1 07:30 controller.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1004 Jun 4 2015 debian-mirror.yaml<br \/>\ndrwxr-xr-x. 2 root root 4096 Dec 3 14:53 environments<br \/>\ndrwxr-xr-x. 6 root root 69 Dec 3 14:53 extraconfig<br \/>\ndrwxr-xr-x. 2 root root 92 Dec 3 14:53 firstboot<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 4362 Jun 4 2015 nagios3.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1980 Oct 1 07:30 net-config-bond.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1779 Oct 1 07:30 net-config-bridge.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1128 Oct 1 07:30 net-config-noop.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 2462 Oct 1 07:30 net-config-static-bridge.yaml<br \/>\ndrwxr-xr-x. 4 root root 4096 Dec 3 14:53 network<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 5566 Oct 1 07:30 overcloud-resource-registry-puppet.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 4577 Oct 1 07:30 overcloud-resource-registry.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 58973 Oct 1 07:30 overcloud-without-mergepy.yaml<br \/>\ndrwxr-xr-x. 5 root root 4096 Dec 3 14:53 puppet<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 999 Jun 4 2015 swift-devices-and-proxy-config.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 619 Oct 1 07:30 swift-storage-post.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 6639 Oct 1 07:30 swift-storage.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 979 Jun 4 2015 undercloud-bm-nova-config.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1303 Jun 4 2015 undercloud-bm-nova-deploy.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 13389 Oct 1 07:30 undercloud-source.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1381 Jun 4 2015 undercloud-vlan-port.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1078 Jun 4 2015 undercloud-vm-ironic-config.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1575 Jun 4 2015 undercloud-vm-ironic-deploy.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1161 Jun 4 2015 undercloud-vm-nova-config.yaml<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 1847 Jun 4 2015 undercloud-vm-nova-deploy.yaml<br \/>\ndrwxr-xr-x. 2 root root 25 Dec 3 14:53 validation-scripts<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 363 Oct 1 07:30 vip-config.yaml<\/p>\n<p>3 Installing the Overcloud:<br \/>\n3.1 Registering Nodes for the Basic Overcloud<\/p>\n<p>Create a node definition template. This file (instackenv.json )<br \/>\nvi \/home\/stack\/instackenv.json ### see details on redhat docs<\/p>\n<p>$ openstack baremetal import &#8211;json ~\/instackenv.json ### import it into the director.<br \/>\n$ openstack baremetal configure boot ### Assign the kernel and ramdisk images to all nodes:<br \/>\n$ opestack baremetal list ### use Cli to verify nodes has been registered for Openstack installation<\/p>\n<p>3.2 Inspecting the Hardware of Nodes<br \/>\n$ openstack baremetal introspection bulk start<br \/>\n$ sudo journalctl -l -u openstack-ironic-discoverd -u openstack-ironic- discoverd-dnsmasq -u openstack-ironic-conductor -f<br \/>\n$ ironic node-set-maintenance [NODE UUID] true<br \/>\n$ openstack baremetal introspection start [NODE UUID]<br \/>\n$ ironic node-set-maintenance [NODE UUID] false<\/p>\n<p>3.3 Manually Tagging the Nodes<\/p>\n<p>$ ironic node-update 58c3d07e-24f2-48a7-bbb6-6843f0e8ee13 add properties\/capabilities=&#8217;profile:compute,boot_option:local&#8217;<br \/>\n$ ironic node-update 1a4e30da-b6dc-499d-ba87-0bd8a3819bc0 add properties\/capabilities=&#8217;profile:control,boot_option:local&#8217;<br \/>\nThe addition of the profile:compute and profile:control options tag the two nodes into each respective profiles.<\/p>\n<p>3.4 Creating Flavors for the Basic Scenario<br \/>\n$ openstack flavor create &#8211;id auto &#8211;ram 6144 &#8211;disk 40 &#8211;vcpus 4 control<br \/>\n$ openstack flavor create &#8211;id auto &#8211;ram 6144 &#8211;disk 40 &#8211;vcpus 4 compute<\/p>\n<p>$ openstack flavor set &#8211;property &#8220;cpu_arch&#8221;=&#8221;x86_64&#8221; &#8211;property &#8220;capabilities:boot_option&#8221;=&#8221;local&#8221; &#8211;property &#8220;capabilities:profile&#8221;=&#8221;compute&#8221; compute<br \/>\n$ openstack flavor set &#8211;property &#8220;cpu_arch&#8221;=&#8221;x86_64&#8221; &#8211;property &#8220;capabilities:boot_option&#8221;=&#8221;local&#8221; &#8211;property &#8220;capabilities:profile&#8221;=&#8221;control&#8221; control<br \/>\n$ openstack flavor create &#8211;id auto &#8211;ram 4096 &#8211;disk 40 &#8211;vcpus 1 baremetal<\/p>\n<p>3.5 Configuring NFS Storage<br \/>\n$ cp \/usr\/share\/openstack-tripleo-heat-templates\/environments\/storage- environment.yaml<\/p>\n<p>3.6 Isolating the External Network ### see Red Hat docs for details<\/p>\n<p>3.7 Creating Custom Interface Templates<br \/>\n$ cp -r \/usr\/share\/openstack-tripleo-heat- templates\/network\/config\/single-nic-vlans ~\/templates\/nic-configs<\/p>\n<p>3.8 Creating a Basic Overcloud Network Environment Template<br \/>\nvi \/home\/stack\/templ ates\/netwo rk-envi ro nment. yaml<\/p>\n<p>3.9 Creating the Basic Overcloud<br \/>\n$ openstack overcloud deploy &#8211;templates -e \/usr\/share\/openstack-tripleo- heat-templates\/environments\/network-isolation.yaml -e \/home\/stack\/templates\/network-environment.yaml -e \\<br \/>\n\/home\/stack\/templates\/storage-environment.yaml &#8211;control-flavor control &#8211; -compute-flavor compute &#8211;ntp-server pool.ntp.org &#8211;neutron-network-type vxlan &#8211;neutron-tunnel-types vxlan<\/p>\n<p>Example:<br \/>\n$ openstack overcloud deploy &#8211;templates -e \/usr\/share\/openstack-tripleo-heat-templates\/environments\/network-isolation.yaml -e \/home\/stack\/templates\/network-environment.yaml -e \/home\/stack\/templates\/haproxy\/post_haproxy.yaml &#8211;control-scale 3 &#8211;compute-scale 11 &#8211;control-flavor control &#8211;compute-flavor compute &#8211;ntp-<\/p>\n<p>$ openstack help overcloud deploy ### for full list of options about deploy<\/p>\n<p>$ source ~\/stackrc ### Initializes the stack ussrs to use the Cli commands<\/p>\n<p>$ heat stack-list &#8211;show-nested<\/p>\n<p>3.10 Accessing the Basic Overcloud :<\/p>\n<p>The director generates a file to configure and authenticate interactions with your Overcloud from the Undercloud.<br \/>\nThe director saves this file, overcloudrc, in your stack user&#8217;s home directory.<\/p>\n<p>Run the following command to use this file:<br \/>\n$ source ~\/overcloudrc<\/p>\n<p>This loads the necessary environment variables to interact with your Overcloud from the director host&#8217;s CLI.<br \/>\nTo return to interacting with the director&#8217;s host, run the following command:<br \/>\n$ source ~\/stackrc<\/p>\n","protected":false},"excerpt":{"rendered":"<p>@File Create by Benjamin Lu, the cloud architect at Cephswift, if anyone has questions regarding the doc, please send mail to benlu369@yahoo.com. @The Red Hat build doc is based on &#8220;Red Hat Enterprise Linux OpenStack Platform 7,8,9 Director Installation and Usage&#8221;. Notes on Red Hat OpenStack Platform 7 build-up: 1. Build-up Red Hat OpenStack Undercloud [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages\/147"}],"collection":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/comments?post=147"}],"version-history":[{"count":7,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages\/147\/revisions"}],"predecessor-version":[{"id":164,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages\/147\/revisions\/164"}],"wp:attachment":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/media?parent=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}