{"id":2532,"date":"2014-05-20T06:41:12","date_gmt":"2014-05-20T06:41:12","guid":{"rendered":"http:\/\/blog.cloudthat.com\/?p=2532"},"modified":"2024-06-25T11:14:26","modified_gmt":"2024-06-25T11:14:26","slug":"multi-node-openstack-icehouse-installation-on-aws-using-rdo","status":"publish","type":"blog","link":"https:\/\/www.cloudthat.com\/resources\/blog\/multi-node-openstack-icehouse-installation-on-aws-using-rdo","title":{"rendered":"Multi-Node OpenStack Icehouse installation on AWS using RDO"},"content":{"rendered":"<p>In my\u00a0<a href=\"https:\/\/blog.cloudthat.com\/try-openstack-icehouse-with-rdo\/\" target=\"_blank\" rel=\"noopener\">previous blog<\/a>, I wrote about my experience installing a single-node OpenStack Icehouse on a desktop\/laptop using RDO. In this blog I will be demonstrating how to set up a simple Multi-Node OpenStack installation on AWS (Amazon Web Services). This is ideal in situations where we do not have access to hardware for setting up a multi-node installation or simply don&#8217;t have the time to setup machines for the same.<\/p>\n<p>Since I intend to just demonstrate the possibility of running OpenStack on AWS, I will keep the architecture simple. I would also like to state that such setups should be used purely for trying out OpenStack and not for production.<\/p>\n<p>My architecture will contain\u00a01 Controller Node &amp; 2 Compute Nodes. I will also try to keep the costs as low as possible. So I will use the smallest EC2 instance that will do the job. Unfortunately we cannot use\u00a0<em>t1.micro<\/em>\u00a0instances which are eligible for\u00a0<em>free tier<\/em>\u00a0since the memory in them is very low. (I did try though and it failed with &#8220;not enough memory&#8221; error message).<\/p>\n<p>AWS Services:<\/p>\n<ul>\n<li><strong>Compute (EC2)<\/strong>\u00a0&#8211; 3 X General Purpose\u00a0<em>m1.small<\/em>\u00a0instances, EBS backed<\/li>\n<li><strong>Networking<\/strong>\u00a0&#8211; Default Private and Public IP\u00a0assignment by AWS. In case you wish to assign IPs that won&#8217;t change after a reboot, assign Elastic IPs.<\/li>\n<li><strong>Storage (EBS)<\/strong>\u00a0&#8211; 20 GB root volumes on each instance. No additional storage.<\/li>\n<li><strong>Amazon Machine Image (AMI)<\/strong>\u00a0&#8211;\u00a0Red Hat Enterprise Linux 6.5 (PV) 64 bit<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>Step 1: Pre-installation tasks<\/h2>\n<p>Well, before we can install OpenStack we have to get the EC2 instances running.<\/p>\n<p>Click\u00a0<strong><em>Launch Instances<\/em><\/strong>\u00a0in EC2 Dashboard.<\/p>\n<p>&nbsp;<\/p>\n<p>Select an\u00a0<em><strong>Amazon Machine Image (AMI)<\/strong><\/em><\/p>\n<p>I choose Red Hat Enterprise Linux 6.5 (PV) 64 bit for the purpose of this demonstration. You can also choose the\u00a0<em>Red Hat Enterprise Linux 6.5 (HVM)<\/em>, however the available instance types may be change.<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid black;\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture.png\" alt=\"Capture\" width=\"752\" height=\"72\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Next I choose the Instance Type,\u00a0<em>General purpose m1.small<\/em>.<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture0.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid black;\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture0.png\" alt=\"Capture0\" width=\"754\" height=\"181\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The next step is to\u00a0<em><strong>configure the instances<\/strong><\/em>. Here there are 3 important things you need to ensure is set correctly.<\/p>\n<ol>\n<li>Number of instances as per the architecture &#8211; 3 in my case<\/li>\n<li>The desired VPC is selected in the Network section (Create a new one if needed, for openstack)<\/li>\n<li>A check next to Automatically assign a Public IP address to your instances<\/li>\n<\/ol>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture11.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid black;\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture11.png\" alt=\"Capture1\" width=\"674\" height=\"390\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Next is the storage, the default is 10 GB. I changed the it to 20 GB. I did not add any additional storage since I was just testing.<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture21.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid black;\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture21-1024x317.png\" alt=\"Capture2\" width=\"752\" height=\"232\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Finally in the\u00a0<em><strong>Security Groups<\/strong><\/em>\u00a0configuration section, choose an existing security group or create a new one that has at least SSH (Source IP restricted) and HTTP \/ HTTPS traffic enabled (from any source). I have created a new Security group called OpenStack and I have enabled all traffic on all protocols from everywhere. This a test environment and at this point it does not matter.<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture3.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid black;\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture3.png\" alt=\"Capture3\" width=\"752\" height=\"238\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Review and click on\u00a0<em><strong>Launch<\/strong>\u00a0<\/em>to fire up the instances. When you click on Launch it will ask to either create or choose an existing\u00a0<em><strong>Key Pair<\/strong><\/em>. If creating a new one, it let&#8217;s you enter a name and downloads the\u00a0<em>Private Key<\/em>\u00a0for you. Store it safe as this is very important.<\/p>\n<p>I already had one created, so I choose that and acknowledged that I have the\u00a0<em>Private Key<\/em>.<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/keypair.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid black;\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/keypair.png\" alt=\"keypair\" width=\"696\" height=\"382\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Click\u00a0<em><strong>Launch Instances<\/strong><\/em>, sit back and relax. Let AWS fire up the instances for you and get it running.<\/p>\n<p>&nbsp;<\/p>\n<p>Before moving on to the next step, make a note of the Public IPs assigned to all the 3 instances. They will be required to SSH in and later at the end access the OpenStack dashboard. It is also recommended to name the EC2 instances as Controller Node, Compute Node etc. This will help in easier identification of the IP addresses later.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 24px; font-weight: bold; line-height: 36px;\">Step 2: OpenStack Installation<\/span><\/p>\n<p>Connect to all the 3 instances using Public IP of the EC2 instance and the private key. The default user to login to AWS EC2 instance is &#8216;<strong>ec2-user<\/strong>&#8220;. Note that root login is disabled in EC2 instances and all the commands will be performed using ec2-user. So, using <em><strong>sudo<\/strong><\/em>is required.\u00a0Once SSH&#8217;d, run the below commands on\u00a0<em><strong>all 3 instances<\/strong><\/em>.<\/p>\n<p>Update the packages.<\/p>\n<pre>sudo yum update -y<\/pre>\n<p>Set SELinux to permissive mode. This is again done for a smooth installation just for the purposes of this demonstration.<\/p>\n<pre>sudo setenforce permissive<\/pre>\n<p>&nbsp;<\/p>\n<p>Run the next set of commands\u00a0<em><strong>only on the EC2 instance that will function as the Controller Node<\/strong><\/em>.<\/p>\n<p>Download &amp; install the RDO installer rpm package.<\/p>\n<pre>sudo yum install https:\/\/rdo.fedorapeople.org\/rdo-release.rpm\u00a0-y<\/pre>\n<p>Install packstack.<\/p>\n<pre>sudo yum install openstack-packstack -y<\/pre>\n<p>The next command will create the Public-Private RSA key.<\/p>\n<pre>sudo ssh-keygen<\/pre>\n<p>Print the newly created Public RSA key on the screen.<\/p>\n<pre>sudo cat \/root\/.ssh\/id_rsa.pub<\/pre>\n<p>Copy the public key printed on the screen. It looks something like this.<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/id_rsa.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/id_rsa.png\" alt=\"id_rsa\" width=\"647\" height=\"115\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Perform the next set of steps\u00a0<em><strong>on all 3 EC2 instances<\/strong><\/em>.<\/p>\n<pre>sudo vi \/root\/.ssh\/authorized_keys<\/pre>\n<p>Add the copied public key into the authorized_keys file. I would like to emphasize here that it needs to be added or appended to the file and not replaced. So you should have two keys in there. One for EC2 key pair and other for the root account of the Controller Node. It should look something like this below:<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/ak1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/ak1.png\" alt=\"ak1\" width=\"646\" height=\"227\" \/><\/a><\/p>\n<p>We also need to copy the same public key into\u00a0<em>authorized_keys<\/em>\u00a0file under the ec2-user account.<\/p>\n<pre>sudo vi ~\/.ssh\/authorized_keys<\/pre>\n<p>Again ensure you are adding\/appending the key to the file. Finally it should have two keys in there.<\/p>\n<p>We are copying the RSA public key to authorized_keys file for both root and ec2-user to ensure smooth installation of OpenStack. Lack of this public key in either one of them will throw an error similar to the one below:<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2565\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture10.png\" alt=\"Capture10\" width=\"485\" height=\"22\" \/><\/a><\/p>\n<p>Check you are able to ssh into the other EC2 instances from any one of them using both <em>ec2-user and root<\/em> account.<\/p>\n<pre>sudo ssh ec2-user@&lt;private ip&gt;<\/pre>\n<pre>sudo ssh root@&lt;private ip&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>Perform the below steps <em><strong>on the EC2 instance which is the Controller Node<\/strong><\/em>.<\/p>\n<pre>sudo\u00a0packstack --gen-answer-file=answer-file.txt<\/pre>\n<p>Edit the answer file to change the IP address of the NOVA_COMPUTE_HOSTS<\/p>\n<pre>sudo vi answer-file-5172014.txt<\/pre>\n<p>Locate \u00a0CONFIG_NOVA_COMPUTE_HOSTS and replace it with the Private IP address of the other two EC2 instances (which will server as Compute Nodes). It should look something like in the screenshot below.<\/p>\n<pre>CONFIG_NOVA_COMPUTE_HOSTS=&lt;Private IP of Compute Node1&gt;,&lt;Private IP of Compute Node2&gt;<\/pre>\n<p>NOTE: There are many other customizations that can be done through the answer file like specifying passwords, choosing which OpenStack components to install and where etc, but we won&#8217;t deep dive into that here.<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2566\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Capture5.png\" alt=\"Capture5\" width=\"640\" height=\"66\" \/><\/a><\/p>\n<p>Finally start the OpenStack installation.<\/p>\n<pre>sudo packstack --answer-file=answer-file.txt<\/pre>\n<p>&nbsp;<\/p>\n<p>Again time to relax, grab a coffee and watch\u00a0<em><strong>packstack<\/strong>\u00a0<\/em>do the magic.<\/p>\n<p>&nbsp;<\/p>\n<h2>Step 3: Post Installation<\/h2>\n<p>Once the installation is completed it will print some additional information like IP address of the Horizon dashboard, location of log files etc. It will look something like this:<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Completed.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Completed.png\" alt=\"Completed\" width=\"646\" height=\"259\" \/><\/a><\/p>\n<p>If there is a mention about rebooting the instance, please do so.<\/p>\n<p>Perform the below steps <em><strong>on the Controller Node<\/strong><\/em>.<\/p>\n<pre>sudo vi \/etc\/openstack-dashboard\/local_settings<\/pre>\n<p>Change &#8220;ALLOWED_HOSTS&#8221; to reflect<\/p>\n<pre>ALLOWED_HOSTS = [ ' * ' ]<\/pre>\n<p>Restart httpd service to reflect the changes done above.<\/p>\n<pre>sudo httpd restart<\/pre>\n<p>&nbsp;<\/p>\n<p>It&#8217;s time now to finally access the Horizon dashboard and this is where the <em><strong>tricky part<\/strong><\/em> is. Although the installation completion report stated that the IP address of the Horizon dashboard was the Private IP, <em><strong>we can only access it from outside (the VPC) using the Public IP of the Controller Node EC2 instance<\/strong><\/em>.<\/p>\n<p>On the EC2 instances dashboard, click on the instance that is the Controller Node and make a note of the Public IP. Something like below:<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/PublicIP.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid black;\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/PublicIP.png\" alt=\"PublicIP\" width=\"785\" height=\"167\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Open a browser, type the Public IP address &amp; GO.<\/p>\n<p>The default login is \u201c<strong>admin<\/strong>\u201d and in order to get the password for the first time login, open a terminal and run the commands below as root:<\/p>\n<pre><strong>cat ~\/keystonerc_admin<\/strong><\/pre>\n<p>This will printout the keystone credential details for admin user, note down the password.<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/OSI-Password.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 1px solid black;\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/OSI-Password.png\" alt=\"OSI-Password\" width=\"300\" height=\"80\" \/><\/a><\/p>\n<p>Enter username and password at the Horizon Dashboard login screen and sing in.<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/OSI-Login.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/OSI-Login-266x300.png\" alt=\"OSI-Login\" width=\"266\" height=\"300\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>If you are interested in learning more about OpenStack and getting some hands-on, we offer Red Hat OpenStack Administration (CL210) course. If you are interested, click\u00a0<a href=\"https:\/\/cloudthat.in\/course\/red-hat-openstack-administration-cl210\/\">here<\/a>\u00a0for more details and to fill out the form. And we will get back to you.<\/p>\n<p>If you liked the post, please share and keep coming back for more articles around OpenStack.<\/p>\n","protected":false},"author":220,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"open","template":"","blog_category":[3607,3614,3615],"user_email":"sangram@cloudthat.in","published_by":"324","primary-authors":"","secondary-authors":"","acf":[],"_links":{"self":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/2532"}],"collection":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/users\/220"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/comments?post=2532"}],"version-history":[{"count":1,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/2532\/revisions"}],"predecessor-version":[{"id":46188,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/2532\/revisions\/46188"}],"wp:attachment":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/media?parent=2532"}],"wp:term":[{"taxonomy":"blog_category","embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog_category?post=2532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}