Wednesday, October 24, 2018

Install and configure OpenStack Pike with Kolla as a standalone

Install and configure OpenStack Pike with Kolla as a standalone

Course Title – Install and configure OpenStack Pike with Kolla as a standalone
PLAN

Install and configure OpenStack Pike with Kolla as a standalone

Prerequisites

Virtual Machines1 vm
CPU/RAM/DISK of VMs4 / 8GB / 40GB
Type of VM (KVM/VirtualBox)KVM
Network requirements (subnets/ips)2

STEP 1 : UPGRADE UBUNTU IMAGE
Update the the APT repository
1
$ sudo apt-get update
Upgrade your system.
1
$ sudo apt-get upgrade
STEP 2 : ADD SECOND INTERFACE
-> Click on image and run the VM
-> Click on view and go to details
-> Click on Add Hardware
-> Go to Network and check whether
Network source: configured to Bridge
MAC address:(default)
Device model: Hypervisor default
-> Click on Finish
-> Now restart network
1
$ sudo systemctl restart networking
-> Reboot virtual machine
-> check whether the interface is created
STEP 3 : CONFIGURE THE NETWORK
The first interface should have an IP and the second interface should be down
1
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:35:c7:af brd ff:ff:ff:ff:ff:ff
inet 192.168.11.219/22 brd 192.168.11.255 scope global ens3
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe35:c7af/64 scope link
valid_lft forever preferred_lft forever
3: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:85:08:37 brd ff:ff:ff:ff:ff:ff
Edit the network interfaces
1
$ sudo vim /etc/network/interfaces
Add the following lines to network config files to get IP from DHCP server
# The secondary network interface
auto ens8
iface ens8 inet static
address 192.168.11.220
netmask 255.255.252.0
gateway 192.168.11.1
dns-nameserver 192.168.11.1 8.8.8.8
Restart the network
Check second network got an ip
1
$ sudo ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:35:c7:af brd ff:ff:ff:ff:ff:ff
inet 192.168.11.219/22 brd 192.168.11.255 scope global ens3
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe35:c7af/64 scope link
valid_lft forever preferred_lft forever
3: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:85:08:37 brd ff:ff:ff:ff:ff:ff
inet 192.168.11.220/22 brd 192.168.11.255 scope global ens8
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe85:837/64 scope link
valid_lft forever preferred_lft forever
STEP 4 : INSTALL KOLLA DEPENDENCIES
1
2
3
$ sudo apt-get install python-jinja2 python-pip libssl-dev
$ sudo pip install --upgrade pip
$ sudo pip install ansible
STEP 5 : INSTALL AND CONFIGURE KOLLA-ANSIBLE
Install kolla-ansible
1
$ sudo pip install kolla-ansible==6.0.0.0rc2 
Copy the configuration files
1
$ sudo cp -r /usr/local/share/kolla-ansible/etc_examples/kolla /etc/kolla
  Edit the Kolla configuration
1
$ sudo vim /etc/kolla/globals.yml 
Modify the following values.Modify [first_nic_label] and [second_nic_label] accordingly.
   kolla_base_distro: "centos"
   kolla_install_type: "binary"
   openstack_release: "pike"
   kolla_internal_vip_address: "10.10.20.33"
   kolla_external_vip_address: "10.10.20.30"
   network_interface: "[first_nic_label]"
   neutron_external_interface: "[second_nic_label]"
   kolla_enable_tls_external: "yes"
   kolla_external_fqdn_cert: "{{ nodeconfigdirectory }}/certificates/haproxy.pem"
Generate a self-signed TLS certificate for the HAProxy external interface
1
$ sudo kolla-ansible certificates
If you are deploying a nested environment (your host is a VM), you need to enable promiscuous on your virtual network. If you don’t do this, your instances will not have external connectivity
1
$ ip link set eth1 promisc on
Generate password for the deployment.
1
$ sudo kolla-genpwd
Bootstrap the server.
1
$ sudo kolla-ansible \ -i /usr/local/share/kolla-ansible/ansible/inventory/all-in-one \ bootstrap-servers
Pull different docker images needed by kolla
1
$ sudo kolla-ansible pull
STEP 6:   DEPLOY OPENSTACK USING KOLLA 
Check the environment
1
$ sudo kolla-ansible prehecks \ -i /usr/local/share/kolla-ansible/ansible/inventory/all-in-one
Verify if the perheck was successful
1
 localhost: ok=83 changed=1 unreachable=0 failed=0
Deploy openstack
1
2
 $ sudo kolla-ansible deploy \
-i /usr/local/share/kolla-ansible/ansible/inventory/all-in-one
Verify if all the containers are up and running
1
$ sudo docker ps -a
Generate the admin-openrc.sh configuration file
1
$ sudo kolla-ansible post-deploy
Install the openstack CLI client
1
$ sudo pip install python-openstackclient
Edit the init-runonce file
1
$ sudo vim /usr/local/share/kolla-ansible/init-runonce
Modify the public network
 EXT_NET_CIDR='10.10.20.0/24'
EXT_NET_RANGE='start=10.10.20.110,end=10.10.20.254'
EXT_NET_GATEWAY='10.10.20.1'
Get the root privileges
1
$ sudo -s 
Load the environment variable needed by the OpenStack CLI
 # source /etc/kolla/admin-openrc.sh
Initialize the deployment
# cd /usr/local/share/kolla-ansible/ && ./init-runonce
STEP 7 : ACCESS THE HORIZON CONSOLE
Get the admin user password
1
$ sudo grep keystone_admin_password /etc/kolla/passwords.yml
Browse to the external virtual IP https://10.10.20.30 and login with the user “admin” and the password from the previous step

No comments:

Post a Comment