Dear friends, in this tutorial we will see OpenStack Queens deployment using packstack on single VM. Packstack is a command-line utility tools that rapidly deploys OpenStack. Packstack deployments are intended only for POC-type testing environments and are not suitable for production.
- Update /etc/hosts file
We need to be configured /etc/hosts file according to our hostname and IP like below:-
cat /etc/hosts 10.203.134.35 helmet helmet.localdomain
- Set hostname
hostnamectl set-hostname helmet
- Configure proxy for download packages
We need to be add proxy details to download packages. We can add proxy details in .bashrc file. Like below:-
vi ~/.bashrc (add below lines) export http_proxy=http://proxy-IP:port export https_proxy=https://proxy-IP:port export no_proxy=localhost,helmet,127.0.0.0/8,10.203.134.35,10.203.134.0/25 source ~/.bashrc
- Update your centos VM using yum
yum update -y
yum install -y centos-release-openstack-queens
yum install yum-utils -y
yum-config-manager --enable openstack-queens
yum update –y
- Stop native firewall and network-manager v
systemctl disable firewalld
systemctl stop firewalld
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network
- Now we need to be change our management port settings. Like below:-
[[email protected] ~]# ifconfig
ens160: flags=4163 mtu 1500
inet 10.203.134.35 netmask 255.255.255.128 broadcast 10.203.134.127
inet6 fe80::250:56ff:fe87:391c prefixlen 64 scopeid 0x20
ether 00:50:56:87:39:1c txqueuelen 1000 (Ethernet)
RX packets 119353 bytes 172989797 (164.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71971 bytes 6050675 (5.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 9905 bytes 4049636 (3.8 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 9905 bytes 4049636 (3.8 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- Edit this file /etc/sysconfig/network-scripts/ifcfg-ens160 and add this line NM_CONTROLLED=no and save the file . Like below:-
# cat /etc/sysconfig/network-scripts/ifcfg-ens160
- Reboot your VM
Now we need to be reboot our VM to reflect these all the changes.
Now we can install packstack utility tool using yum.
yum install -y openstack-packstack
yum install -y screen
Packstack answer file (installation config file)
•CONFIG_PROVISION_DEMO=y => CONFIG_PROVISION_DEMO=n
Now we need to change below parameters in answer.txt file
We can disable the Demo project configuration like below:-
CONFIG_PROVISION_DEMO=y => CONFIG_PROVISION_DEMO=n
We can add the heat component in the installation like below:-
CONFIG_HEAT_INSTALL=n => CONFIG_HEAT_INSTALL=y
We need to be run this setup in screen utility to avoid any disconnection the installation. The below command will start a screen session which is independent of your console.
screen –S mypackstack_installation
Now start the packstack command with the modified answer.txt file.
packstack --answer-file=/root/answer.txt >
Now our OpenStack Queens installation will be started. This will take more time to complete. You can now detach from the screen session and back to your console using below steps:-
ctrl+a and press d
To reattach to that screen session we can use below step.
screen -r mypackstack_installation
Now we will see successfully installation. Like below:-
Welcome to the Packstack setup utility The installation log file is available at: /var/tmp/packstack/20180620-140309-GPwXNU/openstack-setup.log Packstack changed given value to required value /root/.ssh/id_rsa.pu Installing: Clean Up [ DONE ] Discovering ip protocol version [ DONE ] Setting up ssh keys [ DONE ] Preparing servers [ DONE ] Pre installing Puppet and discovering hosts' details [ DONE ] Preparing pre-install entries [ DONE ] Setting up CACERT [ DONE ] Preparing AMQP entries [ DONE ] Preparing MariaDB entries [ DONE ] Fixing Keystone LDAP config parameters to be undef if empty[ DONE ] Preparing Keystone entries [ DONE ] Preparing Glance entries [ DONE ] Checking if the Cinder server has a cinder-volumes vg[ DONE ] Preparing Cinder entries [ DONE ] Preparing Nova API entries [ DONE ] Creating ssh keys for Nova migration [ DONE ] Gathering ssh host keys for Nova migration [ DONE ] Preparing Nova Compute entries [ DONE ] Preparing Nova Scheduler entries [ DONE ] Preparing Nova VNC Proxy entries [ DONE ] Preparing OpenStack Network-related Nova entries [ DONE ] Preparing Nova Common entries [ DONE ] Preparing Neutron LBaaS Agent entries [ DONE ] Preparing Neutron API entries [ DONE ] Preparing Neutron L3 entries [ DONE ] Preparing Neutron L2 Agent entries [ DONE ] Preparing Neutron DHCP Agent entries [ DONE ] Preparing Neutron Metering Agent entries [ DONE ] Checking if NetworkManager is enabled and running [ DONE ] Preparing OpenStack Client entries [ DONE ] Preparing Horizon entries [ DONE ] Preparing Swift builder entries [ DONE ] Preparing Swift proxy entries [ DONE ] Preparing Swift storage entries [ DONE ] Preparing Gnocchi entries [ DONE ] Preparing Redis entries [ DONE ] Preparing Ceilometer entries [ DONE ] Preparing Aodh entries [ DONE ] Preparing Puppet manifests [ DONE ] Copying Puppet modules and manifests [ DONE ] Applying 10.203.134.35_controller.pp 10.203.134.35_controller.pp: [ DONE ] Applying 10.203.134.35_network.pp 10.203.134.35_network.pp: [ DONE ] Applying 10.203.134.35_compute.pp 10.203.134.35_compute.pp: [ DONE ] Applying Puppet manifests [ DONE ] Finalizing [ DONE ] **** Installation completed successfully ****** Additional information: *A new answerfile was created in: /root/packstack-answers-20180620-140310.txt *Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components *File /root/keystonerc_admin has been created on OpenStack client host 10.203.134.35. To use the command line tools you need to source the file. *To access the OpenStack Dashboard browse to http://10.203.134.35/dashboard . *Please, find your login credentials stored in the keystonerc_admin in your home directory. *Because of the kernel update the host 10.203.134.35 requires reboot. *The installation log file is available at: /var/tmp/packstack/20180620-140309-GPwXNU/openstack-setup.log *The generated manifests are available at: /var/tmp/packstack/20180620-140309-GPwXNU/manifests
Access openstack via command line
To access the openstack cli, you need to authentication details of the user. By default packstack will create a source file with the generated authentication details at /root/keystonerc_admin •You need to source it to gain access over openstack.
Verify Openstack installation
You can verify the running openstack process like below.
[[email protected] ~(keystone_admin)]# systemctl list-unit-files | grep openstack
Access openstack via browser (horizon)
Now we can access our openstak dashboard using our IP like below:-
That’s all we have successfully installed OpenStack Queens using packstack.