Redhat Openstack Cloud

LAB 1: Installing Openstack (Single node) using Packstack

Redhat Openstack Cloud

LAB 1: Installing Openstack (Single node) using Packstack

Installing Openstack on CentOS with Packstack

Setup Linux environment

# Create a user called 'stackuser' and allow super user privileges to it.
useradd stackuser                                           
visudo
	stackuser	ALL=(ALL)	NOPASSWD:  ALL        

# Login with 'stackuser' and manage services.          
su  -  stackuser                                        
sudo systemctl disable  --now firewalld                        
sudo systemctl disable  --now NetworkManager                    
sudo systemctl enable  --now network                         

Setup static IP

# Know your network card name.
ifconfig | less
ens160  Link encap:Ethernet HWaddr 00:E0:81:C6:D5:35
        RX packets:21107 errors:0 dropped:0 overruns:0 frame:0
        TX packets:11464 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000 RX bytes:2243790 (2.1 MiB)
        TX bytes:883788 (863.0 KiB)

lo      Link encap:Local Loopback
        inet addr:127.0.0.1 Mask:255.0.0.0
        inet6 addr: ::1/128 Scope:Host
        UP LOOPBACK RUNNING MTU:16436 Metric:1
        RX packets:23309 errors:0 dropped:0 overruns:0 frame:0
        X packets:23309 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0 RX bytes:7275573 (6.9 MiB)
        TX bytes:7275573 (6.9 MiB)

# Configure a static IP persistently.
sudo vi  /etc/sysconfig/network-scripts/ifcfg-ens160
  TYPE=ens160
  BOOTPROTO=static
  NAME=ens160
  DEVICE=ens160
  ONBOOT=yes
  IPADDR="10.10.10.1"        # Change this IP address to IP address of your desire
  PREFIX="24"
  GATEWAY="10.10.10.254"      # Change this Gateway address to Gateway address of your desire
  NM_CONTROLLED=no

# Restart network service.
sudo systemctl restart network

# Set hostname of the server.
sudo hostnamectl  set-hostname  node1
sudo hostname  node1
sudo echo "10.10.10.1       node1"  >>  /etc/hosts

# Check configured IP.
ifconfig ens160
ens160  Link encap:Ethernet HWaddr 00:E0:81:C6:D5:35
        inet addr:10.10.10.1 Bcast:10.10.10.255 Mask:255.255.255.0
        inet6 addr: fe80::2e0:81ff:fec6:d535/64 Scope:Link
        UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
        RX packets:21107 errors:0 dropped:0 overruns:0 frame:0
        TX packets:11464 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000 RX bytes:2243790 (2.1 MiB)
        TX bytes:883788 (863.0 KiB)

Download Packstack for Openstack train version on CentOS using yum

# Download and Enable YUM repository for Openstack-train.
sudo yum install -y centos-release-openstack-train
sudo yum-config-manager --enable openstack-train
sudo yum update -y

# Download and Install Packstack.
sudo yum install -y openstack-packstack

# Install Openstack-train using Packstack.
sudo packstack  --allinone

Additional information:

Welcome to the Packstack setup utilityThe installation log file is available at: /var/tmp/packstack/20200502-004510-oUvzLC/openstack-setup.log
Packstack changed given value  to required value /root/.ssh/id_rsa.pubInstalling:
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.10.10.1_controller.pp
10.10.10.1_controller.pp:                       [ DONE ]
Applying 10.10.10.1_network.pp
10.10.10.1_network.pp:                          [ DONE ]
Applying 10.10.10.1_compute.pp
10.10.10.1_compute.pp:                          [ DONE ]
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]

**** Installation completed successfully ******

Additional information:
* A new answerfile was created in: /root/packstack-answers-20200502-004512.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* Warning: NetworkManager is active on 10.10.10.1. OpenStack networking currently does not work on systems that have the Network Manager service enabled.
* File /root/keystonerc_admin has been created on OpenStack client host 10.10.10.1. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://10.10.10.1/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* The installation log file is available at: /var/tmp/packstack/20180502-004510-oUvzLC/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20180502-004510-oUvzLC/manifests

Verify

# Get the admin password from 'keystonerc_admin' file.
cat  ~/keystonerc_admin
Output :
export OS_USERNAME=admin
export OS_TENANT_NAME=admin
export OS_PASSWORD=cf98ff4cb9974b13
export OS_AUTH_URL=<http://10.10.10.1:35357/v2.0/>
export PS1='[\u@\h \W(keystone_admin)]$ '
Sign-in with admin user on horizon dashboard using "http://10.10.10.1/dashboard" from a client machine.
Your Openstack Cloud is ready for use.