{"id":6056,"date":"2021-11-17T14:51:58","date_gmt":"2021-11-17T13:51:58","guid":{"rendered":"https:\/\/nil.uniza.sk\/?p=6056"},"modified":"2021-11-17T14:52:00","modified_gmt":"2021-11-17T13:52:00","slug":"single-node-and-multi-node-installation-of-openstack-using-the-packstack-utility","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/single-node-and-multi-node-installation-of-openstack-using-the-packstack-utility\/","title":{"rendered":"Single-node and multi-node installation of OpenStack using the PackStack utility"},"content":{"rendered":"<p><strong>Hardware requirements<\/strong><\/p>\n\n\n\n<p>The OpenStack cloud enviroment will run at top of the operating system CentOS 7.9. Also it is necessary to provide at least 16GB of RAM.<\/p>\n\n\n\n<p><strong>Installation<\/strong> <strong>for single-node<\/strong> <strong>deployment<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"158.193.153.10 hostname.example.com\" &gt;&gt; \/etc\/hosts\nsystemctl stop firewalld NetworkManager\nsystemctl disable firewalld NetworkManager\nsetenforce 0\nyum update\n\nvi \/etc\/selinux\/config \n# Change state to \u201edisabled\u201c.\n\nshutdown -r now\nyum install centos-release-openstack-train\nyum upgrade\nyum install -y openstack-packstack\npackstack --allinone --os-neutron-l2-agent=openvswitch --os-neutron-ml2-mechanism-drivers=openvswitch --os-neutron-ml2-tenant-network-types=vxlan --os-neutron-ml2-type-drivers=vxlan,flat --provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ovs-bridge-interfaces=br-ex:ens192\n# Switch --os-neutron-ovs-bridge-interfaces=br-ex:ens192 determines physical interface that will be connected to virtual bridge OVS interface<\/code><\/pre>\n\n\n\n<p><strong>Installation for multi-node deployment<\/strong><\/p>\n\n\n\n<p>On host (compute node) we can repeat the same steps until command &#8222;shutdown -r now&#8220;. Next we will generate &#8222;answer file&#8220; using the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>packstack --gen-answer-file=\/root\/answer.txt<\/code><\/pre>\n\n\n\n<p>In that file we will modify value for parameter CONFIG_COMPUTE_HOSTS to an IP address of host we want to install OS on.<\/p>\n\n\n\n<p>Also we have to modify value for parameter CONFIG_NEUTRON_OVN_TUNNEL where we specify the interface through which the communication will take place. In addition It is recommended to define CIDR subnets in CONFIG_NEUTRON_OVN_TUNNEL_SUBNETS section.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Note:<\/p><p>It is possible to enter ovs_tunnel instead of ovn_tunnel. The difference is not clear yet but it caused the installation end with an error. <\/p><\/blockquote>\n\n\n\n<p> When we have already installed some of hosts, we need to specify them in EXCLUDE_SERVERS section and therefore we can run the installation using the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>packstack --answer-file=\/path\/to\/answer\/file\/ <\/code><\/pre>\n\n\n\n<p><strong>User manual<\/strong><\/p>\n\n\n\n<p>There are two options how to configure OpenStack cloud enviroment. One of them is by using a CLI, the other one is by using OpenStack web GUI. To login into web GUI, we need to obtain a password for an admin account by using the command in root directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat keystonerc_admin<\/code><\/pre>\n\n\n\n<p><strong>Adding a new network<\/strong> <strong>and a router with floating IP<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># creating a new network\nopenstack network create external_network --external  --provider-network-type flat --provider-physical-network extnet --share\r\n\n# creating a subnet for the netork\r\nopenstack subnet create ext-sub --subnet-range 10.10.10.0\/24 --gateway 10.10.10.1 --no-dhcp --allocation-pool start=10.10.10.36,end=10.10.10.37 --network external_network\r\n\r\n# creating of a router\nopenstack router create router1\n\n# assigning of the external gateway to the router\r\nopenstack router set router1 --external-gateway external_network --enable-snat\r\n\r\n# allocation of a floating IP for the certain project\r\nopenstack floating ip create external_network --project admin\r\n<\/code><\/pre>\n\n\n\n<p><strong>How to import new image<\/strong><\/p>\n\n\n\n<p>Recording to official documentation it is possible to import images in various formats ( raw, qcow2, vmdk etc.) For us worked the most format <em>qcow2<\/em>, other formats caused different issues during deployment of instance. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img alt=\"\" decoding=\"async\" width=\"945\" height=\"748\" src=\"https:\/\/nil.uniza.sk\/wp-content\/uploads\/2021\/11\/image.png\" class=\"wp-image-6057\" srcset=\"https:\/\/nil.uniza.sk\/wp-content\/uploads\/2021\/11\/image.png 945w, https:\/\/nil.uniza.sk\/wp-content\/uploads\/2021\/11\/image-300x237.png 300w, https:\/\/nil.uniza.sk\/wp-content\/uploads\/2021\/11\/image-768x608.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/figure>","protected":false},"excerpt":{"rendered":"<p>Hardware requirements The OpenStack cloud enviroment will run at top of the operating system CentOS 7.9. Also it is necessary to provide at least 16GB of RAM. Installation for single-node deployment Installation for multi-node deployment On host (compute node) we can repeat the same steps until command &#8222;shutdown -r now&#8220;. Next we will generate &#8222;answer&#8230;<\/p>","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[685],"tags":[],"class_list":["post-6056","post","type-post","status-publish","format-standard","hentry","category-linux_-_howto-en"],"taxonomy_info":{"category":[{"value":685,"label":"Linux - HOWTO"}]},"featured_image_src_large":false,"author_info":{"display_name":"Martin Scasny","author_link":"https:\/\/nil.uniza.sk\/en\/author\/martin-scasny\/"},"comment_info":2,"category_info":[{"term_id":685,"name":"Linux - HOWTO","slug":"linux_-_howto-en","term_group":0,"term_taxonomy_id":683,"taxonomy":"category","description":"","parent":0,"count":71,"filter":"raw","cat_ID":685,"category_count":71,"category_description":"","cat_name":"Linux - HOWTO","category_nicename":"linux_-_howto-en","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/6056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=6056"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/6056\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=6056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=6056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=6056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}