Table of Contents
In this Openstack tutorial, I will take you through the best way to use devstack for Openstack download and Openstack Deployment on RedHat/CentOS 7 using Devstack. OpenStack is a free and open-source software platform for cloud computing, mostly deployed as infrastructure-as-a-service, whereby virtual servers and other resources are made available to customers. In this openstack tutorial I will use Devstack tool but there is another way through packstack tool which you can use for openstack download and openstack deployment.
You can even use this openstack tutorial for Openstack download and setup openstack on laptop using Devstack. But before going through the steps to setup openstack on laptop you need to understand the difference between how to configure openstack in a Server and how to configure openstack in laptop. Steps on how to configure openstack can also be done through openstack packstack centos.
Openstack Installation and Configuration
Before going through Openstack Installation and configuration on your system, make sure you have all the prerequisites is in place or installation will fail. It is also possible to setup Openstack on laptop using Openstack minimal setup.
What is RDO Openstack
RDO Openstack is an openstack deployment launched by RedHat in 2013. RDO Openstack is also known as RPM Distribution of RedHat. RDO Openstack was launched for Red Hat Enterprise Linux(RHEL) and other linux distributions such as CentOS, Fedora.
Packstack vs Devstack
a)Packstack is mostly suitable for Red Hat Distribution Linux like CentOS and Fedora. It basically uses puppet modules to deploy various part of Openstack Components through ssh.
b)Devstack is a script written to create an environment with Openstack minimal setup which can be used to setup Openstack on laptop as well.
Visit Openstack Packstack CentOS for openstack installation through Packstack on CentOS 7.
Openstack Configuration Step by Step
Step 1: Prerequisites
a) Openstack minimal setup requires minimum memory of 4GB should be available in your system.
b) Make sure latest version of python and pip is installed in your system.
c) Install git using yum install git
[root@localhost ~]# yum install git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 7.9 kB 00:00:00
* base: centos.excellmedia.net
* epel: mirrors.aliyun.com
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
base | 3.6 kB 00:00:00
epel | 5.3 kB 00:00:00
extras | 2.9 kB 00:00:00
kubernetes/signature | 454 B 00:00:00
kubernetes/signature | 1.4 kB 00:00:00 !!!
puppetlabs-pc1 | 2.5 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/4): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(2/4): kubernetes/primary | 60 kB 00:00:01
(3/4): puppetlabs-pc1/x86_64/primary_db | 234 kB 00:00:01
(4/4): epel/x86_64/primary_db | 6.9 MB 00:00:02
kubernetes 433/433
Resolving Dependencies
--> Running transaction check
.................................................................
Step 2: Create an User
Devstack perform lot of changes in your system hence it does not perform installation through root user. Instead you need to create an user with sudo access to perform the installation. In our example, I have created stackuser.
[root@localhost ~]# useradd -d /home/stackuser -m stackuser [root@localhost ~]# cat /etc/passwd | grep -i stackuser stackuser:x:1000:1000::/home/stackuser:/bin/bash
Note:- You can also use create-stack-user.sh script to create an user.
Step 3: Provide sudo access to the User
You need to provide the sudo access to stackuser.
[root@localhost ~]# echo "stackuser ALL=(ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/stackuser
stackuser ALL=(ALL) NOPASSWD: ALL
Step 4: Openstack Download using Devstack
Switch user to stackuser and start the git cloning. Here we are using rocky version of Devstack. You can choose any version as per your requirement.
[root@localhost ~]# su - stackuser [stackuser@localhost ~]$ git clone https://github.com/openstack-dev/devstack.git -b stable/rocky devstack/ Cloning into 'devstack'... remote: Enumerating objects: 54, done. remote: Counting objects: 100% (54/54), done. remote: Compressing objects: 100% (54/54), done. remote: Total 44484 (delta 30), reused 17 (delta 0), pack-reused 44430 Receiving objects: 100% (44484/44484), 14.11 MiB | 3.84 MiB/s, done. Resolving deltas: 100% (30950/30950), done.
Step 5: Configure local.conf for Openstack Deployment
Once Devstack is downloaded locally in your system. Go to devstack directory and configure local.conf for openstack deployment as mentioned below.
[stackuser@localhost devstack]$ cat local.conf
[[local|localrc]]
ADMIN_PASSWORD=test@123
DATABASE_PASSWORD=\$ADMIN_PASSWORD
RABBIT_PASSWORD=\$ADMIN_PASSWORD
SERVICE_PASSWORD=\$ADMIN_PASSWORD
HOST_IP=192.168.0.104
RECLONE=yes
Step 6: OpenStack Installation and Configuration
Now perform Openstack installation and configuration by running stack.sh Script as shown below.
[stackuser@localhost devstack]$ ./stack.sh
Openstack Installation and configuration usually takes around 20-25 mins depends on your network bandwidth.
Output:-
This is your host IP address: 192.168.0.104
This is your host IPv6 address: ::1
Horizon is now available at http://192.168.0.104/dashboard
Keystone is serving at http://192.168.0.104/identity/
The default users are: admin and demo
The password: test@123
DevStack Version: rocky
OS Version: CentOS Linux Release 7.7.1908(Core)
stack.sh completed in 3000 seconds.
Step 7: Test Openstack Installation
Congratulations!! Openstack Installation and Configuration is completed now. You can go to below URL Address and provide username/passwd.
URL: http://192.168.0.104/dashboard
User: admin
Pass: test@123
Also Read: How to create IAM User and Attach Policy in AWS
Reference: OpenStack Documentation