OPENSTACK installation Guide on CENTOS 7 - 64bit

OPENSTACK installation Guide on CENTOS 7 - 64bit

Step 0: Prerequisites :

Software

Red Hat Enterprise Linux (RHEL) 7 is the minimum recommended version, or the equivalent version of one of the RHEL-based Linux distributions such as CentOS, Scientific Linux, and so on. x86_64 is currently the only supported architecture.

Name the host with a fully qualified domain name rather than a short-form name to avoid DNS issues with Packstack.

Hardware

Machine with at least 4GB RAM, preferably 6GB RAM, processors with hardware virtualization extensions, and at least one network adapter.
Network

If you plan on having external network access to the server and instances, this is a good moment to properly configure your network settings. A static IP address to your network card, and disabling NetworkManager are good ideas.

#  systemctl disable firewalld
#  systemctl stop firewalld
#  systemctl disable NetworkManager
#  systemctl stop NetworkManager
#  systemctl enable network
#  systemctl start network

If you are planing on something fancier, read the document on advanced networking before proceeding.
Step 1: Software repositories

On RHEL, download and install the RDO repository RPM to set up the OpenStack repository:

#  yum install -y https://rdoproject.org/repos/rdo-release.rpm

On CentOS, the Extras repository provides the RPM that enables the OpenStack repository. Extras is enabled by default on CentOS 7, so you can simply install the RPM to set up the OpenStack repository:

#  yum install -y centos-release-openstack-mitaka

Update your current packages:

#  yum update -y

Looking for an older version? See http://rdoproject.org/repos/for the full listing.
Step 2: Install Packstack Installer

#  yum install -y openstack-packstack

Step 3: Run Packstack to install OpenStack

Packstack takes the work out of manually setting up OpenStack. For a single node OpenStack deployment, run the following command:

# Please call me once your reached this step (we need to make some modifications on the answer file)

# packstack --help|grep -i answer

# packstack --gen-answer-file=/root/answer.txt

# packstack  --answer-file=/root/answer.txt

If you encounter failures, see the Workarounds page for tips.

If you have run Packstack previously, there will be a file in your home directory named something like packstack-answers-20130722-153728.txt You will probably want to use that file again, using the --answer-file option, so that any passwords you have already set (for example, mysql) will be reused.

The installer will ask you to enter the root password for each host node you are installing on the network, to enable remote configuration of the host so it can remotely configure each node using Puppet.

Once the process is complete, you can log in to the OpenStack web interface Horizon by going to http://$YOURIP/dashboard. The user name is admin. The password can be found in the file keystonerc_admin in the /root directory of the control node.

Running an Instance

Step 1: Visit the DashboardLog in to the Openstack dashboard at http://ipaddress/dashboard- the username is "your username". The password can be found in the file keystonerc_demo in the /root/ directory of the control node.
Note: make sure you use the "demo" username here.
Step 2: Enable SSH on your default security group.
Once logged in to the OpenStack dashboard, click the "Project" tab in the left-side navigation menu, and then click "Access & Security" under the heading "Compute."


Under the "Security Groups" heading, click the "Manage Rules" button for the "default" security group. Click the "Add Rule" button, and in the resulting dialog, enter "22" in the "Port" field, and then click the "Add" button.


Step 3: Create or import a key pair.
In the left-side navigation menu, click "Access & Security" under the heading "Compute." In the main portion of the screen, click the tab labeled "Key Pairs," and choose either to "Create Key Pair" or "Import Key Pair." The "Create Key Pair" dialog will prompt you to supply a keypair name before downloading a private key to your client.


The "Import Key Pair" option will prompt you to provide a name and a public key to use with an existing private key on your client. For name, choose something to identify that key (like your username, for example) and for key, use the contents of your public key file, usually in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub on the machine from which you will be ssh-ing in.


Step 4: Add an image.
In the left-side navigation menu, click "Images" under the heading "Compute." Click the "Create Image" button, located in the upper-right portion of the screen. In the resulting dialog box, enter "Fedora22" in the "Name" field, "https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-22-20150521.x86_64.qcow2" in the "Image Location" field, choose "QCOW2" from the "Format" drop-down menu, leave the "Minimum Disk" and "Minimum Ram" fields blank, leave the "Public" box unchecked, and click the "Create Image" button.


Step 5: Launch the instance.
In the main portion of the screen, under the "Images" heading, click the "Launch Instance" button for the "Fedora22" image. In the resulting dialog, provide a name in the "Instance Name" field and select "m1.small" in the "Flavor" field.



You have to assign a network, under "Networking" tab, either click on the "+" next to "private" or drag & drop the "private" box from "Available networks" to "Selected networks". Finally, click the "Launch" button.


Step 6: Associate Floating IP
In the main portion of the screen, under the "Instances" heading, click the down arrow button under "Actions" column for your instance you just launched, followed by the "Associate Floating IP". Click on "+" next to "IP Address" and select the "public" Pool in the "Allocate Floating IP" dialog, continue by clicking "Allocate IP". Being back in the "Manage Floating IP Associations" dialog you can select the allocated IP Address and click "Associate".


The associated Floating IPs can be spotted in the "IP Address" for each instance.
Step 7: SSH to Your Instance
Using the key pair file from step 3, ssh into the running vm using its floating ip address:
$ ssh -i my_key_pair.pem fedora@floating_ip_address


Feel free to write your comments below. 

Comments