OpenStack
OpenStack is a free and open-source software platform for cloud computing.
It is deployed as infrastructure-as-a-service (IaaS)
Official Website: https://www.openstack.org/
Picture Courtesy: https://en.wikipedia.org/wiki/OpenStack
Now, we will see how to deploy OpenStack on a Virtual Machine using Devstack.
What is DevStack?
DevStack is a series of extensible scripts used to quickly bring up a complete OpenStack environment based on the latest versions of everything from git master. It is used interactively as a development environment and as the basis for much of the OpenStack project’s functional testing.
To know more, please refer to: https://docs.openstack.org/devstack/latest/
OpenStack Installation
1.
Minimum Configuration
(1) RAM
- Minimum 4GB (Recommended 5GB &
above)
(2) Hard
Disk – Minimum 30GB (Only for OpenStack)
(3) Good
Internet Connection throughout installation
2. Installation
Process for Ubuntu Desktop 18.04.2
(1) Create User (Optional But Recommended)
(1) Create User (Optional But Recommended)
Openstack should be installed in
non-root user.
Create a user with the name
stack and give this user administrator permissions:
Command-1:
sudo useradd -s /bin/bash -d /opt/stack
-m stack
Command-2:
echo "stack ALL=(ALL) NOPASSWD:
ALL"| sudo tee /etc/sudoers.d/stack
Command-3:
sudo su – stack
If you get No passwd entry for user '-' error, run:
sudo su stack
If you get No passwd entry for user '-' error, run:
sudo su stack
Your
user@user-VirtualBox should change as stack@user-VirtualBox without showing any
errors.
(2) Install
Devstack & Openstack
Command-1:
sudo apt-get install cloud-init
cloud-init is a multi distribution package (a set of python scripts and utilities) that handles early initialization of a cloud instance.
cloud-init is a multi distribution package (a set of python scripts and utilities) that handles early initialization of a cloud instance.
Command-2:
git clone https://git.openstack.org/openstack-dev/devstack
If your system doesn't have git installed, then execute:
sudo apt install git
git clone https://git.openstack.org/openstack-dev/devstack
This clones the devstack repository to the virtual machine.
If you have a good net connection, proceed to Command-3 directly.
If you have got a poor net connection or any connnectivity issues, it is advisable to download the necessary openstack components prior to installation process.
Execute Commands-2.1 set before going to Command-3
Commands-2.1 (Purely optional - only for slow net connections)
git clone https://opendev.org/openstack/requirements.git
git clone https://opendev.org/openstack/keystone.git
If your system doesn't have git installed, then execute:
sudo apt install git
git clone https://git.openstack.org/openstack-dev/devstack
This clones the devstack repository to the virtual machine.
If you have a good net connection, proceed to Command-3 directly.
If you have got a poor net connection or any connnectivity issues, it is advisable to download the necessary openstack components prior to installation process.
Execute Commands-2.1 set before going to Command-3
Commands-2.1 (Purely optional - only for slow net connections)
git clone https://opendev.org/openstack/requirements.git
git clone https://opendev.org/openstack/keystone.git
git
clone https://opendev.org/openstack/glance.git
git
clone https://opendev.org/openstack/nova.git
git clone https://opendev.org/openstack/tempest.git
git clone https://opendev.org/openstack/tempest.git
Command-3: (Get into devstack folder)
cd devstack
cd devstack
Command-4: (This is the installation command for openstack)
./stack.sh
You may come across few possible errors:
a.If the installation takes places on a hypervisor(Virtual Box):
You may get Host-IP is not resolved
Refer 4. Ways to Handle Errors (i)
When installation takes place on a host, this error does not come since it automatically detects the Host-IP address.
b. Pip Installation error - Refer 4. Ways to Handle Errors (ii)
c. VM Not Responding - Refer 4. Ways to Handle Errors (iii)
Once the error is corrected, you have to re-install openstack.
The procedure for re-installation is discussed below.
4. Ways to Handle Errors:
You may come across few possible errors:
a.If the installation takes places on a hypervisor(Virtual Box):
You may get Host-IP is not resolved
Refer 4. Ways to Handle Errors (i)
When installation takes place on a host, this error does not come since it automatically detects the Host-IP address.
b. Pip Installation error - Refer 4. Ways to Handle Errors (ii)
c. VM Not Responding - Refer 4. Ways to Handle Errors (iii)
Once the error is corrected, you have to re-install openstack.
The procedure for re-installation is discussed below.
3. Re-Installation Guidelines:
Whenever installation is halted by errors, go through the three commands before execution of installation command again.
Command-1: ./unstack.sh
Command-2: ./clean.sh
Command-3: killall –u stack
Command-3: killall –u stack
Command-4: ./stack.sh
4. Ways to Handle Errors:
(i)
Resolving Host-IP Address:
Open the file
stackrc with an editor,
vi stackrc
and find HOST_IP (around line no. 851) and set it to 127.0.0.1 as:
HOST_IP:-127.0.0.1
Click here to know How to update in vi editor
vi stackrc
and find HOST_IP (around line no. 851) and set it to 127.0.0.1 as:
HOST_IP:-127.0.0.1
Click here to know How to update in vi editor
(ii)
Pip
Installation Error:
This command will solve the error that is created during installation of pip that takes place during openstack installation.
This command will solve the error that is created during installation of pip that takes place during openstack installation.
Install upgraded
pip version for the virtual environment using administrator privileges:
In Devstack prompt, run:
sudo virtualenv /opt/stack/requirements/.venv/
If the error is related to pip installation, run as root user:
sudo apt install python-pip
(iii) VM Not Responding:
sudo virtualenv /opt/stack/requirements/.venv/
If the error is related to pip installation, run as root user:
sudo apt install python-pip
(iii) VM Not Responding:
Wait for considerable time. If VM doesn’t
recover,
This is just a few of those many errors that occur during installation. But they are experienced by most of the users. If you find any other error during installation, kindly comment the same (along with solution if you have any).
You will finally get a summary screen as below :
(a) Power off VM
(b) Increase RAM considerably
(c) Restart VM
(d) Run re-installation process
of Openstack
This is just a few of those many errors that occur during installation. But they are experienced by most of the users. If you find any other error during installation, kindly comment the same (along with solution if you have any).
5. Post-Installation:
You will finally get a summary screen as below :
Your installation is successful.
After Installation is complete, go to the host-ip address mentioned in the terminal to access dashboard. (Eg., http://127.0.0.1/dashboard)
Dashboard login page looks like:
Access the page with login credentials given by the summary screen.
Comments
Post a Comment