To install OpenStack is necessary that each node have a Linux operating system Red Hat Enterprise Linux 7 or CentOS 7.
Before any operation, in every node, upgrading packages that already exist with the command :
# yum update -y
Before starting with the installation process you need to know from the outset the type of architecture that you want to use for OpenStack.
This project allows you to install OpenStack in HA mode, which means that you can have multiple nodes that have the same functionality within the infrastructure. Obviously you have to have at least one node for each function.
In this guide we will use the following structure :
The Puppet Master is the node that will be tasked to orchestrate the installation of all other nodes of its features automatically.
First you need to install git on the node :
# yum install git
After that you must clone the project directly in the root's home directory:
# cd /root/
# git clone https://github.com/Eleirbag89/prisma.git
Now modify the file /root/prisma/data/common.yaml
customizing the following values:
dns : "chainreds-lan"
ip_puppet_m : "10.0.0.1"
galera_ips : ["10.0.0.2", "10.0.0.3", "10.0.0.4"]
galera_hosts : ["galera-master", "galera-1", "galera-2"]
wildcard : "10.0.0.%"
db_root_password : "password"
haproxy_monitor_openstack : "false"
haproxy_ips : ["10.0.0.5", "10.0.0.6", "10.0.0.7"]
haproxy_hosts : ["haproxy-1", "haproxy-2", "haproxy-3"]
haproxy_priority : ["100", "101", "102"]
ip_hap_v : "192.168.7.100"
ip_hap_v_private : "10.0.0.100"
vip_interface : "eth0"
vip_interface : "eth1"
At this point we have completed the general configuration of our structure . Before proceeding make sure that the hostname of the Puppet Master is puppet
:
# sysctl kernel.hostname=puppet
After you've completed the previous stages, run this script in order to install the dependencies, copy files to their working directories and install a production-ready web server (Apache Passenger) that will run as Puppet Master:
# sh /root/prisma/scripts/centos_install.sh
At the end of the installation process we proceed with the installation of various Puppet Agent
Once configured the Puppet Master, this will be used to auto configure all nodes related to our structure.
It's necessary that each node is present Puppet Agent Configuration File and run as root :
# sudo -i
# wget https://raw.githubusercontent.com/Eleirbag89/prisma/gh-pages/scripts/agent_init.sh
A Galera node is a database MariaDB Galera. With them you can create a cluster in order to always have a high availability of data.
In a Galera Cluster we can always identify a Master node and many nodes Slave
First we need to install the Master Galera using the uppet Agent Configuration File:
# sudo -i
# sh agent_init.sh
During the installation will be required of the information that shall match those included previously in common.yaml:
-----Inizializzazione nodo di Puppet Agent-----
Inserisci l'indirizzo IP del Puppet Master:10.0.0.1
Inserisci l'Hostname del Puppet Master [default puppet]:
Inserisci l'FQDN del Puppet Master:chainreds-lan
Inserisci l'indirizzo IP di questo Nodo:10.0.0.2
Inserisci l'Hostname di questo Nodo:galera-master
Inserisci l'FQDN di questo Nodo [default chainreds-lan] :
Inserisci il nome dell'interfaccia di rete [default eth1]:
At the end of the installation it will be able to install other Galera nodes in exactly the same way.
# crontab -e
and remove @reboot /bin/bash /root/recover_cluster.sh N
line in every Galera node.
HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It also allows you to assign Virtual IPs for cluster nodes.
Then we proceed to the installation on every HA Proxy node:
# sudo -i
# sh agent_init.sh
During the installation will be required of the information that shall match those included previously in common.yaml:
-----Inizializzazione nodo di Puppet Agent-----
Inserisci l'indirizzo IP del Puppet Master:10.0.0.1
Inserisci l'Hostname del Puppet Master [default puppet]:
Inserisci l'FQDN del Puppet Master:chainreds-lan
Inserisci l'indirizzo IP di questo Nodo:10.0.0.5
Inserisci l'Hostname di questo Nodo:haproxy-1
Inserisci l'FQDN di questo Nodo [default chainreds-lan] :
Inserisci il nome dell'interfaccia di rete [default eth1]:
After installation of each HAProxy node we can verify proper operation of the Galera and HA Proxy nodes.
To do this simply open a web browser and go to http://192.168.7.100:8080
and see the Galera Cluster table. If all nodes are green means that all is well:
haproxy
password
To add a new node, you must first edit the file /etc/puppet/data/common.yaml
and /etc/puppet/data/openstack.yaml
in Puppet Master.
If the node that you want to add requires use HAProxy you must also upgrade those nodes .
After changing adequately file /etc/puppet/data/common.yaml
in Puppet Master adding IP and hostname of the new node, you can install the Service with the classic mode:
# sudo -i
# wget https://raw.githubusercontent.com/Eleirbag89/prisma/prisma2/scripts/agent_init.sh
# sh agent_init.sh
After you will have to update the information in the other nodes related to the new one. To do this, in each HAProxy and Galera node execute the following command:
# puppet agent
After changing adequately file /etc/puppet/data/common.yaml
in Puppet Master adding IP, hostname and priority of the new node, you can install the Service with the classic mode:
# sudo -i
# wget https://raw.githubusercontent.com/Eleirbag89/prisma/prisma2/scripts/agent_init.sh
# sh agent_init.sh
After you will have to update the information in the other nodes related to the new one. To do this, in each HAProxy node execute the following command:
# puppet agent