Highly available Identity API

Installing KeyStone On Controllers

  1. [root@controller ~]# yum install openstack-keystone httpd mod_wsgi python-openstackclient openstack-utils -y

Configure MemCached

  1. [root@controller ~]# sed -i 's/127.0.0.1/0.0.0.0/' /etc/sysconfig/memcached
  2. [root@controller ~]# cat /etc/sysconfig/memcached
  3. PORT="11211"
  4. USER="memcached"
  5. MAXCONN="1024"
  6. CACHESIZE="64"
  7. OPTIONS="-l 0.0.0.0,::1"

Start MemCached Service

  1. [root@controller ~]# systemctl enable memcached.service
  2. Created symlink from /etc/systemd/system/multi-user.target.wants/memcached.service to /usr/lib/systemd/system/memcached.service.
  3. [root@controller ~]# systemctl start memcached.service    
  4. [root@controller ~]# systemctl status memcached.service
  5. ● memcached.service - memcached daemon
  6.    Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
  7.    Active: active (running) since Sun 2017-12-17 22:07:25 EST; 1s ago
  8.  Main PID: 7500 (memcached)
  9.    CGroup: /system.slice/memcached.service
  10.            └─7500 /usr/bin/memcached -p 11211 -u memcached -m 64 -c 1024 -l 0.0.0.0,::1
  11.  
  12. Dec 17 22:07:25 controller1 systemd[1]: Started memcached daemon.
  13. Dec 17 22:07:25 controller1 systemd[1]: Starting memcached daemon...

Configure Httpd Service

  1. [root@controller ~]# cp /etc/httpd/conf/httpd.conf{,.bak}
  2. [root@controller1 ~]# echo "ServerName controller1">>/etc/httpd/conf/httpd.conf
  3. [root@controller2 ~]# echo "ServerName controller2">>/etc/httpd/conf/httpd.conf
  4. [root@controller3 ~]# echo "ServerName controller3">>/etc/httpd/conf/httpd.conf
  5. [root@controller ~]# ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d/

Configure KeyStone

  1. [root@controller ~]# cp /usr/share/keystone/wsgi-keystone.conf{,.bak}
  2. [root@controller ~]# sed -i 's/5000/4999/' /usr/share/keystone/wsgi-keystone.conf
  3. [root@controller ~]# sed -i 's/35357/35356/' /usr/share/keystone/wsgi-keystone.conf

Start Httpd Service

  1. [root@controller ~]# systemctl enable httpd.service
  2. Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
  3. [root@controller ~]# systemctl restart httpd.service
  4. [root@controller ~]# netstat -antp|egrep 'httpd'
  5. tcp6       0      0 :::80                   :::*                    LISTEN      1946/httpd          
  6. tcp6       0      0 :::35356                :::*                    LISTEN      1946/httpd          
  7. tcp6       0      0 :::4999                 :::*                    LISTEN      1946/httpd

Configure HAPorxy For KeyStone

  1. [root@controller ~]# echo '
  2. > #keystone
  3. > listen keystone_admin_cluster
  4. > bind controller:35357
  5. > #balance  source
  6. > option  tcpka
  7. > option  httpchk 
  8. > option  tcplog
  9. > server controller1 controller1:35356 check inter 2000 rise 2 fall 5
  10. > server controller2 controller2:35356 check inter 2000 rise 2 fall 5
  11. > server controller3 controller3:35356 check inter 2000 rise 2 fall 5
  12. > 
  13. > listen keystone_public_cluster
  14. > bind controller:5000
  15. > #balance  source
  16. > option  tcpka
  17. > option  httpchk 
  18. > option  tcplog
  19. > server controller1 controller1:4999 check inter 2000 rise 2 fall 5
  20. > server controller2 controller2:4999 check inter 2000 rise 2 fall 5
  21. > server controller3 controller3:4999 check inter 2000 rise 2 fall 5
  22. > '>>/etc/haproxy/haproxy.cfg
  23. [[email protected] ~]# '
  24. [root@controller ~]# systemctl restart haproxy.service
  25. [root@controller ~]# netstat -antp|egrep 'haproxy|httpd'
  26. tcp        0      0 0.0.0.0:1080            0.0.0.0:*               LISTEN      2111/haproxy        
  27. tcp        0      0 192.168.220.20:35357    0.0.0.0:*               LISTEN      2111/haproxy        
  28. tcp        0      0 192.168.220.20:5000     0.0.0.0:*               LISTEN      2111/haproxy        
  29. tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      2111/haproxy        
  30. tcp6       0      0 :::80                   :::*                    LISTEN      1946/httpd          
  31. tcp6       0      0 :::35356                :::*                    LISTEN      1946/httpd          
  32. tcp6       0      0 :::4999                 :::*                    LISTEN      1946/httpd

Configure KeyStone

  1. [root@controller1 ~]# KEYSTONE_SECRET=$(openssl rand -hex 10)
  2. [root@controller1 ~]# 
  3. [root@controller1 ~]# cp /etc/keystone/keystone.conf /etc/keystone/keystone.conf.bak
  4. [root@controller1 ~]# openstack-config --set /etc/keystone/keystone.conf DEFAULT admin_token $KEYSTONE_SECRET
  5. [root@controller1 ~]# openstack-config --set /etc/keystone/keystone.conf DEFAULT verbose true
  6. [root@controller1 ~]# openstack-config --set /etc/keystone/keystone.conf database connection mysql+pymysql://keystone:[email protected]/keystone
  7. [root@controller1 ~]# openstack-config --set /etc/keystone/keystone.conf cache backend oslo_cache.memcache_pool
  8. [root@controller1 ~]# openstack-config --set /etc/keystone/keystone.conf cache enabled true
  9. [root@controller1 ~]# openstack-config --set /etc/keystone/keystone.conf cache memcache_servers controller1:11211,controller2:11211,controller3:11211
  10. [root@controller1 ~]# openstack-config --set /etc/keystone/keystone.conf memcache servers controller1:11211,controller2:11211,controller3:11211
  11. [root@controller1 ~]# openstack-config --set /etc/keystone/keystone.conf token driver memcache
  12. [root@controller1 ~]# openstack-config --set /etc/keystone/keystone.conf token provider fernet

Synchronize Database

  1. [root@controller1 ~]# su -s /bin/sh -c "keystone-manage db_sync" keystone
  2. [root@controller1 ~]# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
  3. [root@controller1 ~]# keystone-manage credential_setup --keystone-user keystone --keystone-group keystone

Configure Other Controller Nodes

  1. [root@controller1 ~]# rsync -avzP -e 'ssh -p 22' /etc/keystone/* controller2:/etc/keystone/
  2. sending incremental file list
  3. keystone.conf
  4.       115180 100%  108.49MB/s    0:00:00 (xfer#1, to-check=10/13)
  5. keystone.conf.bak
  6.       114875 100%   54.78MB/s    0:00:00 (xfer#2, to-check=9/13)
  7. credential-keys/
  8. credential-keys/0
  9.           44 100%   21.48kB/s    0:00:00 (xfer#3, to-check=3/13)
  10. credential-keys/1
  11.           44 100%   21.48kB/s    0:00:00 (xfer#4, to-check=2/13)
  12. fernet-keys/
  13. fernet-keys/0
  14.           44 100%   21.48kB/s    0:00:00 (xfer#5, to-check=1/13)
  15. fernet-keys/1
  16.           44 100%   21.48kB/s    0:00:00 (xfer#6, to-check=0/13)
  17.  
  18. sent 2209 bytes  received 2114 bytes  2882.00 bytes/sec
  19. total size is 236741  speedup is 54.76
  20. [root@controller1 ~]# rsync -avzP -e 'ssh -p 22' /etc/keystone/* controller3:/etc/keystone/
  21. sending incremental file list
  22. keystone.conf
  23.       115180 100%  108.49MB/s    0:00:00 (xfer#1, to-check=10/13)
  24. keystone.conf.bak
  25.       114875 100%   54.78MB/s    0:00:00 (xfer#2, to-check=9/13)
  26. credential-keys/
  27. credential-keys/0
  28.           44 100%   21.48kB/s    0:00:00 (xfer#3, to-check=3/13)
  29. credential-keys/1
  30.           44 100%   21.48kB/s    0:00:00 (xfer#4, to-check=2/13)
  31. fernet-keys/
  32. fernet-keys/0
  33.           44 100%   21.48kB/s    0:00:00 (xfer#5, to-check=1/13)
  34. fernet-keys/1
  35.           44 100%   21.48kB/s    0:00:00 (xfer#6, to-check=0/13)
  36.  
  37. sent 2209 bytes  received 2114 bytes  8646.00 bytes/sec
  38. total size is 236741  speedup is 54.76

Restart Httpd Service

  1. [root@controller1 ~]# systemctl restart httpd.service
  2. [root@controller1 ~]# ssh controller2 "systemctl restart httpd.service"
  3. [root@controller1 ~]# ssh controller3 "systemctl restart httpd.service"

Create Admin Role

  1. [root@controller1 ~]# keystone-manage bootstrap --bootstrap-password admin \
  2. > --bootstrap-admin-url http://controller:35357/v3/ \
  3. > --bootstrap-internal-url http://controller:5000/v3/ \
  4. > --bootstrap-public-url http://controller:5000/v3/ \
  5. > --bootstrap-region-id RegionOne

Configure Admin Resource

  1. [root@controller1 ~]# echo "
  2. > export OS_PROJECT_DOMAIN_NAME=default
  3. > export OS_USER_DOMAIN_NAME=default 
  4. > export OS_PROJECT_NAME=admin 
  5. > export OS_USERNAME=admin
  6. > export OS_PASSWORD=admin
  7. > export OS_AUTH_URL=http://controller:35357/v3
  8. > export OS_IDENTITY_API_VERSION=3
  9. > export OS_IMAGE_API_VERSION=2
  10. > ">/root/admin-openrc
  11. [[email protected] ~]# "
  12. [root@controller1 ~]# source /root/admin-openrc
  13. [root@controller1 ~]# openstack token issue
  14. +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | Field      | Value                                                                                                                                                                                   |
  16. +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | expires    | 2017-12-15T11:24:26+0000                                                                                                                                                                |
  18. | id         | gAAAAABaM6LaRTUjdiPkk1_5ydJV38A7d8ksrrD270fHt5Rc6SZZiIqhQXD70YdFVZqzfK0wWnxqF2jpAy1yBB6Tt-_v9VGbwyGORDJ-MesmmcmychP65oL_2dY8O4N09Mb8RZZm29wkJzOjgQffiFkmmjm3H7mAjfEHqbUxS-RdNcrnFEY0sTQ |
  19. | project_id | 2291724ac1a54d65844cc5dba56f4803                                                                                                                                                        |
  20. | user_id    | c69e3e92d2e9485dabc42d845574d965                                                                                                                                                        |
  21. +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Create OpenStack Project

  1. [root@controller1 ~]# openstack project create --domain default --description "Service Project" service
  2. +-------------+----------------------------------+
  3. | Field       | Value                            |
  4. +-------------+----------------------------------+
  5. | description | Service Project                  |
  6. | domain_id   | default                          |
  7. | enabled     | True                             |
  8. | id          | 78757402f85a467995bcbd69b2183ba5 |
  9. | is_domain   | False                            |
  10. | name        | service                          |
  11. | parent_id   | default                          |
  12. +-------------+----------------------------------+
  13. [root@controller1 ~]# openstack user create --domain default --password=glance glance
  14. +---------------------+----------------------------------+
  15. | Field               | Value                            |
  16. +---------------------+----------------------------------+
  17. | domain_id           | default                          |
  18. | enabled             | True                             |
  19. | id                  | 1072761f1a714aa8ad31a8e3f32fdc94 |
  20. | name                | glance                           |
  21. | options             | {}                               |
  22. | password_expires_at | None                             |
  23. +---------------------+----------------------------------+
  24. [root@controller1 ~]# openstack role add --project service --user glance admin
  25. [root@controller1 ~]# openstack user create --domain default --password=nova nova
  26. +---------------------+----------------------------------+
  27. | Field               | Value                            |
  28. +---------------------+----------------------------------+
  29. | domain_id           | default                          |
  30. | enabled             | True                             |
  31. | id                  | 83ce33fed0fe4c1894b6448cc17c32f7 |
  32. | name                | nova                             |
  33. | options             | {}                               |
  34. | password_expires_at | None                             |
  35. +---------------------+----------------------------------+
  36. [root@controller1 ~]# openstack role add --project service --user nova admin
  37. [root@controller1 ~]# openstack user create --domain default --password=neutron neutron
  38. +---------------------+----------------------------------+
  39. | Field               | Value                            |
  40. +---------------------+----------------------------------+
  41. | domain_id           | default                          |
  42. | enabled             | True                             |
  43. | id                  | d0ed457a96824cffb030d3c57b4a8218 |
  44. | name                | neutron                          |
  45. | options             | {}                               |
  46. | password_expires_at | None                             |
  47. +---------------------+----------------------------------+
  48. [root@controller1 ~]# openstack role add --project service --user neutron admin
  49.  
  50. [root@controller1 ~]# openstack project create --domain default --description "Demo Project" demo
  51. +-------------+----------------------------------+
  52. | Field       | Value                            |
  53. +-------------+----------------------------------+
  54. | description | Demo Project                     |
  55. | domain_id   | default                          |
  56. | enabled     | True                             |
  57. | id          | 3ddffab721d24934a0cbd49def5aa615 |
  58. | is_domain   | False                            |
  59. | name        | demo                             |
  60. | parent_id   | default                          |
  61. +-------------+----------------------------------+
  62. [root@controller1 ~]# openstack user create --domain default --password=demo demo
  63. +---------------------+----------------------------------+
  64. | Field               | Value                            |
  65. +---------------------+----------------------------------+
  66. | domain_id           | default                          |
  67. | enabled             | True                             |
  68. | id                  | 7884786780534d82afa0085028d2eb9b |
  69. | name                | demo                             |
  70. | options             | {}                               |
  71. | password_expires_at | None                             |
  72. +---------------------+----------------------------------+
  73. [root@controller1 ~]# openstack role create user
  74. +-----------+----------------------------------+
  75. | Field     | Value                            |
  76. +-----------+----------------------------------+
  77. | domain_id | None                             |
  78. | id        | 0e067a05c0334234be3e19cad51cc1b5 |
  79. | name      | user                             |
  80. +-----------+----------------------------------+
  81. [root@controller1 ~]# openstack role add --project demo --user demo user

Add OpenStack Identity resource to Pacemaker

  1. [root@controller1 ~]# pcs resource create openstack-keystone systemd:openstack-keystone --clone interleave=true

Configure OpenStack Identity service

  1. # cat keystone.conf
  2.  
  3. bind_host = 10.0.0.12
  4. public_bind_host = 10.0.0.12
  5. admin_bind_host = 10.0.0.12
  6.  
  7. [catalog]
  8. driver = keystone.catalog.backends.sql.Catalog
  9. # ...
  10. [identity]
  11. driver = keystone.identity.backends.sql.Identity
  12. # ...

Configure OpenStack services to use the highly available OpenStack Identity

  1. # cat api-paste.ini
  2.  
  3. auth_host = 10.0.0.11
  4.  
  5. $ openstack endpoint create --region $KEYSTONE_REGION $service-type public http://PUBLIC_VIP:5000/v2.0
  6. $ openstack endpoint create --region $KEYSTONE_REGION $service-type admin http://10.0.0.11:35357/v2.0
  7. $ openstack endpoint create --region $KEYSTONE_REGION $service-type internal http://10.0.0.11:5000/v2.0
  8.  
  9. # cat local_settings.py
  10.  
  11. OPENSTACK_HOST = 10.0.0.11

Configure the VIP & HAProxy

Configure the VIP

  1. [root@controller1 ~]# pcs resource create vip ocf:heartbeat:IPaddr2 ip="192.168.220.20" cidr_netmask="24" op monitor interval="30s"

Installing HAProxy On Controllers

  1. [root@controller ~]# yum install haproxy httpd -y

Configuring HAProxy

  1. [root@controller1 ~]# cp /etc/haproxy/haproxy.cfg{,.bak}
  2.  
  3. [root@controller1 ~]# diff /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.bak
  4. 87,99d86
  5. < listen stats  
  6. <       bind 0.0.0.0:1080 
  7. <       mode http
  8. <       option httplog
  9. <       log 127.0.0.1 local0 err  
  10. <       maxconn 10
  11. <       stats refresh 30s
  12. <       stats uri /admin
  13. <       stats realm Haproxy\ Statistics
  14. <       stats auth admin:admin
  15. <       stats hide-version
  16. <       stats admin if TRUE
  17. < 
  18.  
  19. [root@controller1 ~]# scp /etc/haproxy/haproxy.cfg [email protected]:/etc/haproxy/haproxy.cfg
  20. [root@controller1 ~]# scp /etc/haproxy/haproxy.cfg [email protected]:/etc/haproxy/haproxy.cfg

Allow Non-Local IP Binding

  1. [root@controller ~]# echo "net.ipv4.ip_nonlocal_bind = 1" >>/etc/sysctl.conf
  2. [root@controller ~]# sysctl -p
  3. net.ipv4.ip_nonlocal_bind = 1

Add HAProxy To The Cluster

  1. [root@controller1 ~]# pcs resource create lb-haproxy systemd:haproxy --clone
  2. [root@controller1 ~]# pcs constraint order start vip then lb-haproxy-clone kind=Optional
  3. Adding vip lb-haproxy-clone (kind: Optional) (Options: first-action=start then-action=start)
  4. [root@controller1 ~]# pcs constraint colocation add lb-haproxy-clone with vip

Now, Take the Browser

http://192.168.220.20:1080/admin

username/password :

admin/admin

Add RabbitMQTo The HAProxy

  1. [root@controller1 ~]# echo '#RabbitMQ
  2. > listen RabbitMQ-Server
  3. > bind controller:5673
  4. > mode tcp
  5. > balance roundrobin
  6. > option tcpka
  7. > timeout client  3h
  8. > timeout server  3h
  9. > option          clitcpka
  10. > server controller1 controller1:5672 check inter 5s rise 2 fall 3
  11. > server controller2 controller2:5672 check inter 5s rise 2 fall 3
  12. > server controller3 controller3:5672 check inter 5s rise 2 fall 3
  13. > 
  14. > listen RabbitMQ-Web
  15. > bind controller:15673
  16. > mode tcp
  17. > balance roundrobin
  18. > option tcpka
  19. > server controller1 controller1:15672 check inter 5s rise 2 fall 3
  20. > server controller2 controller2:15672 check inter 5s rise 2 fall 3
  21. > server controller3 controller3:15672 check inter 5s rise 2 fall 3
  22. > '>>/etc/haproxy/haproxy.cfg
  23. [[email protected] ~]# 
  24. [[email protected] ~]# systemctl restart haproxy.service

Pacemaker Cluster Stack

Install Packages On Controller Nodes

  1. [root@controller ~]# yum install corosync pacemaker pcs fence-agents resource-agents -y

Set-Up the Cluster

  1. [root@controller ~]# systemctl enable pcsd
  2. [root@controller ~]# systemctl start pcsd
  3.  
  4. [root@controller ~]# echo myhaclusterpwd | passwd --stdin hacluster
  5.  
  6. [root@controller ~]# pcs cluster auth controller1 controller2 controller3  -u hacluster -p myhaclusterpwd --force
  7.  
  8. [root@controller1 ~]# pcs cluster setup --force --name my-cluster controller1 controller2 controller3
  9. Destroying cluster on nodes: controller1, controller2, controller3...
  10. controller1: Stopping Cluster (pacemaker)...
  11. controller2: Stopping Cluster (pacemaker)...
  12. controller3: Stopping Cluster (pacemaker)...
  13. controller3: Successfully destroyed cluster
  14. controller1: Successfully destroyed cluster
  15. controller2: Successfully destroyed cluster
  16.  
  17. Sending 'pacemaker_remote authkey' to 'controller1', 'controller2', 'controller3'
  18. controller1: successful distribution of the file 'pacemaker_remote authkey'
  19. controller3: successful distribution of the file 'pacemaker_remote authkey'
  20. controller3: successful distribution of the file 'pacemaker_remote authkey'
  21. controller2: successful distribution of the file 'pacemaker_remote authkey'
  22. Sending cluster config files to the nodes...
  23. controller1: Succeeded
  24. controller2: Succeeded
  25. controller3: Succeeded
  26.  
  27. Synchronizing pcsd certificates on nodes controller1, controller2, controller3...
  28. controller3: Success
  29. controller2: Success
  30. controller1: Success
  31. Restarting pcsd on the nodes in order to reload the certificates...
  32.  
  33. controller3: Success
  34. controller2: Success
  35. controller1: Success
  36. [root@controller1 ~]# pcs cluster start --all
  37. controller1: Starting Cluster...
  38. controller2: Starting Cluster...
  39. controller3: Starting Cluster...
  40. [root@controller1 ~]# pcs cluster enable --all
  41. controller1: Cluster Enabled
  42. controller2: Cluster Enabled
  43. controller3: Cluster Enabled
  44. [root@controller1 ~]# pcs cluster status
  45. Cluster Status:
  46.  Stack: unknown
  47.  Current DC: NONE
  48.  Last updated: Fri Dec 15 00:21:36 2017
  49.  Last change: Fri Dec 15 00:21:24 2017 by hacluster via crmd on controller1
  50.  3 nodes configured
  51.  0 resources configured
  52. PCSD Status:
  53.   controller3: Online
  54.   controller2: Online
  55.   controller1: Online

Start Corosync On Controllers

  1. [root@controller ~]# systemctl start corosync
  2.  
  3. [root@controller1 ~]# corosync-cfgtool -s
  4. Printing ring status.
  5. Local node ID 1
  6. RING ID 0
  7.         id      = 192.168.220.21
  8.         status  = ring 0 active with no faults
  9. [root@controller2 ~]# corosync-cfgtool -s
  10. Printing ring status.
  11. Local node ID 2
  12. RING ID 0
  13.         id      = 192.168.220.22
  14.         status  = ring 0 active with no faults
  15. [root@controller3 ~]# corosync-cfgtool -s
  16. Printing ring status.
  17. Local node ID 3
  18. RING ID 0
  19.         id      = 192.168.220.23
  20.         status  = ring 0 active with no faults
  21.  
  22. [root@controller ~]# corosync-cmapctl runtime.totem.pg.mrp.srp.members
  23. runtime.totem.pg.mrp.srp.members.1.config_version (u64) = 0
  24. runtime.totem.pg.mrp.srp.members.1.ip (str) = r(0) ip(192.168.220.21) 
  25. runtime.totem.pg.mrp.srp.members.1.join_count (u32) = 1
  26. runtime.totem.pg.mrp.srp.members.1.status (str) = joined
  27. runtime.totem.pg.mrp.srp.members.2.config_version (u64) = 0
  28. runtime.totem.pg.mrp.srp.members.2.ip (str) = r(0) ip(192.168.220.22) 
  29. runtime.totem.pg.mrp.srp.members.2.join_count (u32) = 1
  30. runtime.totem.pg.mrp.srp.members.2.status (str) = joined
  31. runtime.totem.pg.mrp.srp.members.3.config_version (u64) = 0
  32. runtime.totem.pg.mrp.srp.members.3.ip (str) = r(0) ip(192.168.220.23) 
  33. runtime.totem.pg.mrp.srp.members.3.join_count (u32) = 1
  34. runtime.totem.pg.mrp.srp.members.3.status (str) = joined

Start Pacemaker

  1. [root@controller1 ~]# systemctl start pacemaker
  2. [root@controller1 ~]# crm_mon -1
  3. Stack: corosync
  4. Current DC: controller1 (version 1.1.16-12.el7_4.5-94ff4df) - partition with quorum
  5. Last updated: Fri Dec 15 00:34:25 2017
  6. Last change: Fri Dec 15 00:21:45 2017 by hacluster via crmd on controller1
  7.  
  8. 3 nodes configured
  9. 0 resources configured
  10.  
  11. Online: [ controller1 controller2 controller3 ]
  12.  
  13. No active resources

Set Basic Cluster Properties

  1. [root@controller1 ~]# pcs property set pe-warn-series-max=1000 \
  2. >   pe-input-series-max=1000 \
  3. >   pe-error-series-max=1000 \
  4. >   cluster-recheck-interval=5min
  5. [root@controller1 ~]# pcs property set stonith-enabled=false

RabbitMQ Cluster Setup

Install RabbitMQ

  1. [root@controller1 ~]# yum install erlang rabbitmq-server -y
  2. [root@controller2 ~]# yum install erlang rabbitmq-server -y
  3. [root@controller3 ~]# yum install erlang rabbitmq-server -y
  4.  
  5. [root@controller1 ~]# systemctl enable rabbitmq-server.service
  6. Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.
  7. [root@controller2 ~]# systemctl enable rabbitmq-server.service
  8. Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.
  9. [root@controller3 ~]# systemctl enable rabbitmq-server.service
  10. Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.
  11.  
  12. [root@controller1 ~]# systemctl start rabbitmq-server.service
  13.  
  14. [root@controller1 ~]# rabbitmq-plugins enable rabbitmq_management
  15. The following plugins have been enabled:
  16.   mochiweb
  17.   webmachine
  18.   rabbitmq_web_dispatch
  19.   amqp_client
  20.   rabbitmq_management_agent
  21.   rabbitmq_management
  22.  
  23. Applying plugin configuration to rabbit@controller1... started 6 plugins.
  24. [root@controller2 ~]# rabbitmq-plugins enable rabbitmq_management
  25. The following plugins have been enabled:
  26.   mochiweb
  27.   webmachine
  28.   rabbitmq_web_dispatch
  29.   amqp_client
  30.   rabbitmq_management_agent
  31.   rabbitmq_management
  32.  
  33. Applying plugin configuration to rabbit@controller2... started 6 plugins.
  34. [root@controller3 ~]# rabbitmq-plugins enable rabbitmq_management
  35. The following plugins have been enabled:
  36.   mochiweb
  37.   webmachine
  38.   rabbitmq_web_dispatch
  39.   amqp_client
  40.   rabbitmq_management_agent
  41.   rabbitmq_management
  42.  
  43. Applying plugin configuration to rabbit@controller3... started 6 plugins.

Configure RabbitMQ for HA queues

  1. [root@controller1 ~]# scp /var/lib/rabbitmq/.erlang.cookie [email protected]:/var/lib/rabbitmq/.erlang.cookie
  2. .erlang.cookie                                                             100%   20    19.8KB/s   00:00    
  3. [root@controller1 ~]# scp /var/lib/rabbitmq/.erlang.cookie [email protected]:/var/lib/rabbitmq/.erlang.cookie
  4. .erlang.cookie                                                             100%   20    34.2KB/s   00:00

On Each Nodes

  1. # chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
  2. # chmod 400 /var/lib/rabbitmq/.erlang.cookie
  3.  
  4. # systemctl enable rabbitmq-server.service
  5. # systemctl start rabbitmq-server.service
  6.  
  7. [root@controller1 ~]# rabbitmqctl cluster_status
  8. Cluster status of node rabbit@controller1 ...
  9. [{nodes,[{disc,[rabbit@controller1]}]},
  10.  {running_nodes,[rabbit@controller1]},
  11.  {cluster_name,<<"[email protected]">>},
  12.  {partitions,[]},
  13.  {alarms,[{rabbit@controller1,[]}]}]
  14. [root@controller2 ~]# rabbitmqctl cluster_status
  15. Cluster status of node rabbit@controller2 ...
  16. [{nodes,[{disc,[rabbit@controller2]}]},
  17.  {running_nodes,[rabbit@controller2]},
  18.  {cluster_name,<<"[email protected]">>},
  19.  {partitions,[]},
  20.  {alarms,[{rabbit@controller2,[]}]}]
  21. [root@controller3 ~]# rabbitmqctl cluster_status
  22. Cluster status of node rabbit@controller3 ...
  23. [{nodes,[{disc,[rabbit@controller3]}]},
  24.  {running_nodes,[rabbit@controller3]},
  25.  {cluster_name,<<"[email protected]">>},
  26.  {partitions,[]},
  27.  {alarms,[{rabbit@controller3,[]}]}]

On Other Nodes

  1. [root@controller2 ~]# rabbitmqctl stop_app
  2. Stopping node rabbit@controller2 ...
  3. [root@controller3 ~]# rabbitmqctl stop_app
  4. Stopping node rabbit@controller3 ...
  5.  
  6. [root@controller2 ~]# rabbitmqctl join_cluster --ram [email protected]
  7. Clustering node rabbit@controller2 with rabbit@controller1 ...
  8. [root@controller3 ~]# rabbitmqctl join_cluster --ram [email protected]
  9. Clustering node rabbit@controller3 with rabbit@controller1 ...
  10.  
  11. [root@controller2 ~]# rabbitmqctl start_app
  12. Starting node rabbit@controller2 ...
  13. [root@controller3 ~]# rabbitmqctl start_app
  14. Starting node rabbit@controller3 ...

Set the HA-Mode Policy

  1. [root@controller1 ~]# rabbitmqctl cluster_status
  2. Cluster status of node rabbit@controller1 ...
  3. [{nodes,[{disc,[rabbit@controller1]},
  4.          {ram,[rabbit@controller3,rabbit@controller2]}]},
  5.  {running_nodes,[rabbit@controller3,rabbit@controller2,rabbit@controller1]},
  6.  {cluster_name,<<"[email protected]">>},
  7.  {partitions,[]},
  8.  {alarms,[{rabbit@controller3,[]},
  9.           {rabbit@controller2,[]},
  10.           {rabbit@controller1,[]}]}]
  11. [root@controller2 ~]# rabbitmqctl cluster_status
  12. Cluster status of node rabbit@controller2 ...
  13. [{nodes,[{disc,[rabbit@controller1]},
  14.          {ram,[rabbit@controller3,rabbit@controller2]}]},
  15.  {running_nodes,[rabbit@controller3,rabbit@controller1,rabbit@controller2]},
  16.  {cluster_name,<<"[email protected]">>},
  17.  {partitions,[]},
  18.  {alarms,[{rabbit@controller3,[]},
  19.           {rabbit@controller1,[]},
  20.           {rabbit@controller2,[]}]}]
  21. [root@controller3 ~]# rabbitmqctl set_policy ha-all '^(?!amq\.).*' '{"ha-mode": "all"}'
  22. Setting policy "ha-all" for pattern "^(?!amq\\.).*" to "{\"ha-mode\": \"all\"}" with priority "0" ...
  23. [root@controller3 ~]# 
  24. [root@controller3 ~]# 
  25. [root@controller3 ~]# rabbitmqctl cluster_status
  26. Cluster status of node rabbit@controller3 ...
  27. [{nodes,[{disc,[rabbit@controller1]},
  28.          {ram,[rabbit@controller3,rabbit@controller2]}]},
  29.  {running_nodes,[rabbit@controller2,rabbit@controller1,rabbit@controller3]},
  30.  {cluster_name,<<"[email protected]">>},
  31.  {partitions,[]},
  32.  {alarms,[{rabbit@controller2,[]},
  33.           {rabbit@controller1,[]},
  34.           {rabbit@controller3,[]}]}]
  35.  
  36. [root@controller1 ~]# rabbitmqctl set_policy ha-all '^(?!amq\.).*' '{"ha-mode": "all"}'
  37. Setting policy "ha-all" for pattern "^(?!amq\\.).*" to "{\"ha-mode\": \"all\"}" with priority "0" ...
  38. [root@controller2 ~]# rabbitmqctl set_policy ha-all '^(?!amq\.).*' '{"ha-mode": "all"}'
  39. Setting policy "ha-all" for pattern "^(?!amq\\.).*" to "{\"ha-mode\": \"all\"}" with priority "0" ...
  40. [root@controller3 ~]# rabbitmqctl set_policy ha-all '^(?!amq\.).*' '{"ha-mode": "all"}'
  41. Setting policy "ha-all" for pattern "^(?!amq\\.).*" to "{\"ha-mode\": \"all\"}" with priority "0" ...

Now, Take the Browser

http://192.168.220.21:15672

username/password :

guest/guest

Configure OpenStack services to use RabbitMQ HA queues

  1. transport_url = rabbit://RABBIT_USER:RABBIT_PASS@rabbit1:5672,
  2. RABBIT_USER:RABBIT_PASS@rabbit2:5672,RABBIT_USER:RABBIT_PASS@rabbit3:5672
  3. rabbit_retry_interval=1
  4. rabbit_retry_backoff=2
  5. rabbit_max_retries=0
  6. rabbit_durable_queues=true
  7. rabbit_ha_queues=true

For the Old Set-Up

  1. # rabbitmqctl stop_app
  2. # rabbitmqctl reset
  3. # rabbitmqctl start_app

Create RabbitMQ Admin

  1. [root@controller1 ~]# rabbitmqctl  add_user admin admin
  2. Creating user "admin" ...
  3. [root@controller1 ~]# rabbitmqctl  set_user_tags admin administrator
  4. Setting tags for user "admin" to [administrator] ...
  5. [root@controller1 ~]# rabbitmqctl add_user openstack openstack
  6. Creating user "openstack" ...
  7. [root@controller1 ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*" 
  8. Setting permissions for user "openstack" in vhost "/" ...
  9. [root@controller1 ~]# rabbitmqctl  set_user_tags openstack administrator
  10. Setting tags for user "openstack" to [administrator] ...
  11. [root@controller1 ~]# systemctl restart rabbitmq-server.service

MariaDB Galera Cluster

Install Database On Controller Nodes

  1. [root@controller1 ~]# yum install memcached python-memcached -y
  2. [root@controller1 ~]# yum install mariadb-galera-server mariadb-galera-common galera rsync -y

Database configuration(controller1)

  1. [root@controller1 ~]# cat /etc/my.cnf
  2. [mysqld]
  3. datadir=/var/lib/mysql
  4. socket=/var/lib/mysql/mysql.sock
  5. user=mysql
  6. binlog_format=ROW
  7. bind-address=192.168.220.21 # The management IP address of the controller node
  8.  
  9. # InnoDB Configuration
  10. default_storage_engine=innodb
  11. innodb_autoinc_lock_mode=2
  12. innodb_flush_log_at_trx_commit=0
  13. innodb_buffer_pool_size=122M
  14.  
  15. !includedir /etc/my.cnf.d/
  16.  
  17. [root@controller1 ~]# cat /etc/my.cnf.d/galera.cnf | grep ^[^#].*
  18. [mysqld]
  19. binlog_format=ROW
  20. default-storage-engine=innodb
  21. innodb_autoinc_lock_mode=2
  22. bind-address=0.0.0.0
  23. wsrep_on=1
  24. wsrep_provider=/usr/lib64/galera/libgalera_smm.so
  25. wsrep_cluster_name="my_wsrep_cluster"
  26. wsrep_cluster_address="gcomm://controller1,controller2,controller3"
  27. wsrep_node_name=controller1
  28. wsrep_node_address=192.168.220.21
  29. wsrep_slave_threads=1
  30. wsrep_certify_nonPK=1
  31. wsrep_max_ws_rows=131072
  32. wsrep_max_ws_size=1073741824
  33. wsrep_debug=0
  34. wsrep_convert_LOCK_to_trx=0
  35. wsrep_retry_autocommit=1
  36. wsrep_auto_increment_control=1
  37. wsrep_drupal_282555_workaround=0
  38. wsrep_causal_reads=0
  39. wsrep_notify_cmd=
  40. wsrep_sst_method=rsync
  41. wsrep_sst_auth=root:

Database configuration(controller2,controller3)

  1. [root@controller1 ~]# rsync -avzP  -e 'ssh -p 22'  /etc/my.cnf controller2:/etc/
  2. [root@controller1 ~]# rsync -avzP  -e 'ssh -p 22'  /etc/my.cnf.d/galera.cnf controller2:/etc/my.cnf.d/
  3. [root@controller1 ~]# rsync -avzP  -e 'ssh -p 22'  /etc/my.cnf controller3:/etc/
  4. [root@controller1 ~]# rsync -avzP  -e 'ssh -p 22'  /etc/my.cnf.d/galera.cnf controller3:/etc/my.cnf.d/
  5.  
  6. [root@controller2 ~]# cat /etc/my.cnf
  7. [mysqld]
  8. datadir=/var/lib/mysql
  9. socket=/var/lib/mysql/mysql.sock
  10. user=mysql
  11. binlog_format=ROW
  12. bind-address=192.168.220.22 # The management IP address of the controller node
  13.  
  14. # InnoDB Configuration
  15. default_storage_engine=innodb
  16. innodb_autoinc_lock_mode=2
  17. innodb_flush_log_at_trx_commit=0
  18. innodb_buffer_pool_size=122M
  19.  
  20. !includedir /etc/my.cnf.d/
  21.  
  22. [root@controller2 ~]# cat /etc/my.cnf.d/galera.cnf | grep ^[^#].*
  23. [mysqld]
  24. binlog_format=ROW
  25. default-storage-engine=innodb
  26. innodb_autoinc_lock_mode=2
  27. bind-address=0.0.0.0
  28. wsrep_on=1
  29. wsrep_provider=/usr/lib64/galera/libgalera_smm.so
  30. wsrep_cluster_name="my_wsrep_cluster"
  31. wsrep_cluster_address="gcomm://controller1,controller2,controller3"
  32. wsrep_node_name=controller2
  33. wsrep_node_address=192.168.220.22
  34. wsrep_slave_threads=1
  35. wsrep_certify_nonPK=1
  36. wsrep_max_ws_rows=131072
  37. wsrep_max_ws_size=1073741824
  38. wsrep_debug=0
  39. wsrep_convert_LOCK_to_trx=0
  40. wsrep_retry_autocommit=1
  41. wsrep_auto_increment_control=1
  42. wsrep_drupal_282555_workaround=0
  43. wsrep_causal_reads=0
  44. wsrep_notify_cmd=
  45. wsrep_sst_method=rsync
  46. wsrep_sst_auth=root:
  47.  
  48. [root@controller3 ~]# cat /etc/my.cnf
  49. [mysqld]
  50. datadir=/var/lib/mysql
  51. socket=/var/lib/mysql/mysql.sock
  52. user=mysql
  53. binlog_format=ROW
  54. bind-address=192.168.220.23 # The management IP address of the controller node
  55.  
  56. # InnoDB Configuration
  57. default_storage_engine=innodb
  58. innodb_autoinc_lock_mode=2
  59. innodb_flush_log_at_trx_commit=0
  60. innodb_buffer_pool_size=122M
  61.  
  62. !includedir /etc/my.cnf.d/
  63.  
  64. [root@controller3 ~]# cat /etc/my.cnf.d/galera.cnf | grep ^[^#].*
  65. [mysqld]
  66. binlog_format=ROW
  67. default-storage-engine=innodb
  68. innodb_autoinc_lock_mode=2
  69. bind-address=0.0.0.0
  70. wsrep_on=1
  71. wsrep_provider=/usr/lib64/galera/libgalera_smm.so
  72. wsrep_cluster_name="my_wsrep_cluster"
  73. wsrep_cluster_address="gcomm://controller1,controller2,controller3"
  74. wsrep_node_name=controller3
  75. wsrep_node_address=192.168.220.23
  76. wsrep_slave_threads=1
  77. wsrep_certify_nonPK=1
  78. wsrep_max_ws_rows=131072
  79. wsrep_max_ws_size=1073741824
  80. wsrep_debug=0
  81. wsrep_convert_LOCK_to_trx=0
  82. wsrep_retry_autocommit=1
  83. wsrep_auto_increment_control=1
  84. wsrep_drupal_282555_workaround=0
  85. wsrep_causal_reads=0
  86. wsrep_notify_cmd=
  87. wsrep_sst_method=rsync
  88. wsrep_sst_auth=root:

Database Management

Initialize the Primary Component on one cluster node
  1. [root@controller1 ~]# /usr/libexec/mysqld --wsrep-new-cluster --user=root &
Start the database server on all other cluster nodes
  1. [root@controller2 ~]# systemctl start mariadb
  2. [root@controller3 ~]# systemctl start mariadb
Check MaribDB Cluster
The Key Value :
  • wsrep_connected ON
  • wsrep_cluster_size 3
  • wsrep_local_index 0 (controller1 : 0 controller2 : 1 controller3 : 2)
  • wsrep_incoming_addresses 192.168.220.21:3306,192.168.220.22:3306,192.168.220.23:3306
    1. [root@controller1 ~]# mysql -uroot -proot -e "show status like 'wsrep_%'"
    2. +------------------------------+-------------------------------------------------------------+
    3. | Variable_name                | Value                                                       |
    4. +------------------------------+-------------------------------------------------------------+
    5. | wsrep_apply_oooe             | 0.000000                                                    |
    6. | wsrep_apply_oool             | 0.000000                                                    |
    7. | wsrep_apply_window           | 0.000000                                                    |
    8. | wsrep_causal_reads           | 0                                                           |
    9. | wsrep_cert_deps_distance     | 0.000000                                                    |
    10. | wsrep_cert_index_size        | 0                                                           |
    11. | wsrep_cert_interval          | 0.000000                                                    |
    12. | wsrep_cluster_conf_id        | 3                                                           |
    13. | wsrep_cluster_size           | 3                                                           |
    14. | wsrep_cluster_state_uuid     | 37649504-e137-11e7-815b-1ec404fbf23e                        |
    15. | wsrep_cluster_status         | Primary                                                     |
    16. | wsrep_commit_oooe            | 0.000000                                                    |
    17. | wsrep_commit_oool            | 0.000000                                                    |
    18. | wsrep_commit_window          | 0.000000                                                    |
    19. | wsrep_connected              | ON                                                          |
    20. | wsrep_desync_count           | 0                                                           |
    21. | wsrep_evs_delayed            |                                                             |
    22. | wsrep_evs_evict_list         |                                                             |
    23. | wsrep_evs_repl_latency       | 0/0/0/0/0                                                   |
    24. | wsrep_evs_state              | OPERATIONAL                                                 |
    25. | wsrep_flow_control_paused    | 0.000000                                                    |
    26. | wsrep_flow_control_paused_ns | 0                                                           |
    27. | wsrep_flow_control_recv      | 0                                                           |
    28. | wsrep_flow_control_sent      | 0                                                           |
    29. | wsrep_gcomm_uuid             | 37644373-e137-11e7-8fef-c76eb92175c6                        |
    30. | wsrep_incoming_addresses     | 192.168.220.21:3306,192.168.220.22:3306,192.168.220.23:3306 |
    31. | wsrep_last_committed         | 0                                                           |
    32. | wsrep_local_bf_aborts        | 0                                                           |
    33. | wsrep_local_cached_downto    | 18446744073709551615                                        |
    34. | wsrep_local_cert_failures    | 0                                                           |
    35. | wsrep_local_commits          | 0                                                           |
    36. | wsrep_local_index            | 0                                                           |
    37. | wsrep_local_recv_queue       | 0                                                           |
    38. | wsrep_local_recv_queue_avg   | 0.100000                                                    |
    39. | wsrep_local_recv_queue_max   | 2                                                           |
    40. | wsrep_local_recv_queue_min   | 0                                                           |
    41. | wsrep_local_replays          | 0                                                           |
    42. | wsrep_local_send_queue       | 0                                                           |
    43. | wsrep_local_send_queue_avg   | 0.000000                                                    |
    44. | wsrep_local_send_queue_max   | 1                                                           |
    45. | wsrep_local_send_queue_min   | 0                                                           |
    46. | wsrep_local_state            | 4                                                           |
    47. | wsrep_local_state_comment    | Synced                                                      |
    48. | wsrep_local_state_uuid       | 37649504-e137-11e7-815b-1ec404fbf23e                        |
    49. | wsrep_protocol_version       | 7                                                           |
    50. | wsrep_provider_name          | Galera                                                      |
    51. | wsrep_provider_vendor        | Codership Oy <info@codership.com>                           |
    52. | wsrep_provider_version       | 3.16(r5c765eb)                                              |
    53. | wsrep_ready                  | ON                                                          |
    54. | wsrep_received               | 10                                                          |
    55. | wsrep_received_bytes         | 794                                                         |
    56. | wsrep_repl_data_bytes        | 0                                                           |
    57. | wsrep_repl_keys              | 0                                                           |
    58. | wsrep_repl_keys_bytes        | 0                                                           |
    59. | wsrep_repl_other_bytes       | 0                                                           |
    60. | wsrep_replicated             | 0                                                           |
    61. | wsrep_replicated_bytes       | 0                                                           |
    62. | wsrep_thread_count           | 2                                                           |
    63. +------------------------------+-------------------------------------------------------------+
    64. [root@controller2 ~]# mysql -uroot -proot -e "show status like 'wsrep_%'"
    65. +------------------------------+-------------------------------------------------------------+
    66. | Variable_name                | Value                                                       |
    67. +------------------------------+-------------------------------------------------------------+
    68. | wsrep_apply_oooe             | 0.000000                                                    |
    69. | wsrep_apply_oool             | 0.000000                                                    |
    70. | wsrep_apply_window           | 0.000000                                                    |
    71. | wsrep_causal_reads           | 0                                                           |
    72. | wsrep_cert_deps_distance     | 0.000000                                                    |
    73. | wsrep_cert_index_size        | 0                                                           |
    74. | wsrep_cert_interval          | 0.000000                                                    |
    75. | wsrep_cluster_conf_id        | 3                                                           |
    76. | wsrep_cluster_size           | 3                                                           |
    77. | wsrep_cluster_state_uuid     | 37649504-e137-11e7-815b-1ec404fbf23e                        |
    78. | wsrep_cluster_status         | Primary                                                     |
    79. | wsrep_commit_oooe            | 0.000000                                                    |
    80. | wsrep_commit_oool            | 0.000000                                                    |
    81. | wsrep_commit_window          | 0.000000                                                    |
    82. | wsrep_connected              | ON                                                          |
    83. | wsrep_desync_count           | 0                                                           |
    84. | wsrep_evs_delayed            |                                                             |
    85. | wsrep_evs_evict_list         |                                                             |
    86. | wsrep_evs_repl_latency       | 0.000204825/0.00047307/0.000741314/0.000268244/2            |
    87. | wsrep_evs_state              | OPERATIONAL                                                 |
    88. | wsrep_flow_control_paused    | 0.000000                                                    |
    89. | wsrep_flow_control_paused_ns | 0                                                           |
    90. | wsrep_flow_control_recv      | 0                                                           |
    91. | wsrep_flow_control_sent      | 0                                                           |
    92. | wsrep_gcomm_uuid             | 781401a8-e137-11e7-bba3-9e3f83e88f32                        |
    93. | wsrep_incoming_addresses     | 192.168.220.21:3306,192.168.220.22:3306,192.168.220.23:3306 |
    94. | wsrep_last_committed         | 0                                                           |
    95. | wsrep_local_bf_aborts        | 0                                                           |
    96. | wsrep_local_cached_downto    | 18446744073709551615                                        |
    97. | wsrep_local_cert_failures    | 0                                                           |
    98. | wsrep_local_commits          | 0                                                           |
    99. | wsrep_local_index            | 1                                                           |
    100. | wsrep_local_recv_queue       | 0                                                           |
    101. | wsrep_local_recv_queue_avg   | 0.000000                                                    |
    102. | wsrep_local_recv_queue_max   | 1                                                           |
    103. | wsrep_local_recv_queue_min   | 0                                                           |
    104. | wsrep_local_replays          | 0                                                           |
    105. | wsrep_local_send_queue       | 0                                                           |
    106. | wsrep_local_send_queue_avg   | 0.000000                                                    |
    107. | wsrep_local_send_queue_max   | 1                                                           |
    108. | wsrep_local_send_queue_min   | 0                                                           |
    109. | wsrep_local_state            | 4                                                           |
    110. | wsrep_local_state_comment    | Synced                                                      |
    111. | wsrep_local_state_uuid       | 37649504-e137-11e7-815b-1ec404fbf23e                        |
    112. | wsrep_protocol_version       | 7                                                           |
    113. | wsrep_provider_name          | Galera                                                      |
    114. | wsrep_provider_vendor        | Codership Oy <info@codership.com>                           |
    115. | wsrep_provider_version       | 3.16(r5c765eb)                                              |
    116. | wsrep_ready                  | ON                                                          |
    117. | wsrep_received               | 4                                                           |
    118. | wsrep_received_bytes         | 529                                                         |
    119. | wsrep_repl_data_bytes        | 0                                                           |
    120. | wsrep_repl_keys              | 0                                                           |
    121. | wsrep_repl_keys_bytes        | 0                                                           |
    122. | wsrep_repl_other_bytes       | 0                                                           |
    123. | wsrep_replicated             | 0                                                           |
    124. | wsrep_replicated_bytes       | 0                                                           |
    125. | wsrep_thread_count           | 2                                                           |
    126. +------------------------------+-------------------------------------------------------------+
    127. [root@controller3 ~]# mysql -uroot -proot -e "show status like 'wsrep_%'"
    128. +------------------------------+-------------------------------------------------------------+
    129. | Variable_name                | Value                                                       |
    130. +------------------------------+-------------------------------------------------------------+
    131. | wsrep_apply_oooe             | 0.000000                                                    |
    132. | wsrep_apply_oool             | 0.000000                                                    |
    133. | wsrep_apply_window           | 0.000000                                                    |
    134. | wsrep_causal_reads           | 0                                                           |
    135. | wsrep_cert_deps_distance     | 0.000000                                                    |
    136. | wsrep_cert_index_size        | 0                                                           |
    137. | wsrep_cert_interval          | 0.000000                                                    |
    138. | wsrep_cluster_conf_id        | 3                                                           |
    139. | wsrep_cluster_size           | 3                                                           |
    140. | wsrep_cluster_state_uuid     | 37649504-e137-11e7-815b-1ec404fbf23e                        |
    141. | wsrep_cluster_status         | Primary                                                     |
    142. | wsrep_commit_oooe            | 0.000000                                                    |
    143. | wsrep_commit_oool            | 0.000000                                                    |
    144. | wsrep_commit_window          | 0.000000                                                    |
    145. | wsrep_connected              | ON                                                          |
    146. | wsrep_desync_count           | 0                                                           |
    147. | wsrep_evs_delayed            |                                                             |
    148. | wsrep_evs_evict_list         |                                                             |
    149. | wsrep_evs_repl_latency       | 0.000224679/0.000465885/0.000643407/0.000164076/5           |
    150. | wsrep_evs_state              | OPERATIONAL                                                 |
    151. | wsrep_flow_control_paused    | 0.000000                                                    |
    152. | wsrep_flow_control_paused_ns | 0                                                           |
    153. | wsrep_flow_control_recv      | 0                                                           |
    154. | wsrep_flow_control_sent      | 0                                                           |
    155. | wsrep_gcomm_uuid             | 7ce71d07-e137-11e7-b720-baa5cd647a15                        |
    156. | wsrep_incoming_addresses     | 192.168.220.21:3306,192.168.220.22:3306,192.168.220.23:3306 |
    157. | wsrep_last_committed         | 0                                                           |
    158. | wsrep_local_bf_aborts        | 0                                                           |
    159. | wsrep_local_cached_downto    | 18446744073709551615                                        |
    160. | wsrep_local_cert_failures    | 0                                                           |
    161. | wsrep_local_commits          | 0                                                           |
    162. | wsrep_local_index            | 2                                                           |
    163. | wsrep_local_recv_queue       | 0                                                           |
    164. | wsrep_local_recv_queue_avg   | 0.000000                                                    |
    165. | wsrep_local_recv_queue_max   | 1                                                           |
    166. | wsrep_local_recv_queue_min   | 0                                                           |
    167. | wsrep_local_replays          | 0                                                           |
    168. | wsrep_local_send_queue       | 0                                                           |
    169. | wsrep_local_send_queue_avg   | 0.333333                                                    |
    170. | wsrep_local_send_queue_max   | 2                                                           |
    171. | wsrep_local_send_queue_min   | 0                                                           |
    172. | wsrep_local_state            | 4                                                           |
    173. | wsrep_local_state_comment    | Synced                                                      |
    174. | wsrep_local_state_uuid       | 37649504-e137-11e7-815b-1ec404fbf23e                        |
    175. | wsrep_protocol_version       | 7                                                           |
    176. | wsrep_provider_name          | Galera                                                      |
    177. | wsrep_provider_vendor        | Codership Oy <info@codership.com>                           |
    178. | wsrep_provider_version       | 3.16(r5c765eb)                                              |
    179. | wsrep_ready                  | ON                                                          |
    180. | wsrep_received               | 3                                                           |
    181. | wsrep_received_bytes         | 311                                                         |
    182. | wsrep_repl_data_bytes        | 0                                                           |
    183. | wsrep_repl_keys              | 0                                                           |
    184. | wsrep_repl_keys_bytes        | 0                                                           |
    185. | wsrep_repl_other_bytes       | 0                                                           |
    186. | wsrep_replicated             | 0                                                           |
    187. | wsrep_replicated_bytes       | 0                                                           |
    188. | wsrep_thread_count           | 2                                                           |
    189. +------------------------------+-------------------------------------------------------------+
    Test MaribDB Cluster
    1. [root@controller1 ~]# mysql -uroot -proot -e "show databases"           
    2. +--------------------+
    3. | Database           |
    4. +--------------------+
    5. | information_schema |
    6. | mysql              |
    7. | performance_schema |
    8. +--------------------+
    9. [root@controller2 ~]# mysql -uroot -proot -e "show databases"
    10. +--------------------+
    11. | Database           |
    12. +--------------------+
    13. | information_schema |
    14. | mysql              |
    15. | performance_schema |
    16. +--------------------+
    17. [root@controller3 ~]# mysql -uroot -proot -e "show databases"
    18. +--------------------+
    19. | Database           |
    20. +--------------------+
    21. | information_schema |
    22. | mysql              |
    23. | performance_schema |
    24. +--------------------+
    25. [root@controller1 ~]# mysql -uroot -proot -e "create database galera_test"
    26. [root@controller1 ~]# mysql -uroot -proot -e "show databases"             
    27. +--------------------+
    28. | Database           |
    29. +--------------------+
    30. | galera_test        |
    31. | information_schema |
    32. | mysql              |
    33. | performance_schema |
    34. +--------------------+
    35. [root@controller2 ~]# mysql -uroot -proot -e "show databases"
    36. +--------------------+
    37. | Database           |
    38. +--------------------+
    39. | galera_test        |
    40. | information_schema |
    41. | mysql              |
    42. | performance_schema |
    43. +--------------------+
    44. [root@controller3 ~]# mysql -uroot -proot -e "show databases"
    45. +--------------------+
    46. | Database           |
    47. +--------------------+
    48. | galera_test        |
    49. | information_schema |
    50. | mysql              |
    51. | performance_schema |
    52. +--------------------+

    Database Management

    1. echo '
    2. MYSQL_USERNAME="clustercheck_user"
    3. MYSQL_PASSWORD="my_clustercheck_password"
    4. MYSQL_HOST="localhost"
    5. MYSQL_PORT="3306"
    6. ' > /etc/sysconfig/clustercheck

    Grant the clustercheck user

    1. [[email protected] ~]# mysql -uroot -proot -e "GRANT PROCESS ON *.* TO 'clustercheck_user'@'localhost' IDENTIFIED BY 'my_clustercheck_password';FLUSH PRIVILEGES;"
    2. [[email protected] ~]# mysql -uroot -proot -e "SELECT User, Host, Password FROM mysql.user;"
    3. +-------------------+-----------+-------------------------------------------+
    4. | User              | Host      | Password                                  |
    5. +-------------------+-----------+-------------------------------------------+
    6. | root              | localhost | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
    7. | root              | 127.0.0.1 | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
    8. | root              | ::1       | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
    9. | clustercheck_user | localhost | *B7ECF4F5C3B1DDB87695D91C5D27631AEC569993 |
    10. +-------------------+-----------+-------------------------------------------+

    Create a configuration file for the HAProxy monitor service

    1. echo '
    2. service galera-monitor
    3. {
    4.    port = 9200
    5.    disable = no
    6.    socket_type = stream
    7.    protocol = tcp
    8.    wait = no
    9.    user = root
    10.    group = root
    11.    groups = yes
    12.    server = /usr/bin/clustercheck
    13.    type = UNLISTED
    14.    per_source = UNLIMITED
    15.    log_on_success =
    16.    log_on_failure = HOST
    17.    flags = REUSE
    18. }
    19. ' > /etc/xinetd.d/galera-monitor

    Create OpenStack Users & Databases

    1. [root@controller1 ~]# mysql -u root -proot -e "
    2. > create database keystone;
    3. > grant all privileges on keystone.* to 'keystone'@'localhost' identified by 'keystone';
    4. > grant all privileges on keystone.* to 'keystone'@'%' identified by 'keystone';
    5. > create database glance;
    6. > grant all privileges on glance.* to 'glance'@'localhost' identified by 'glance';
    7. > grant all privileges on glance.* to 'glance'@'%' identified by 'glance';
    8. > 
    9. > create database nova;
    10. > grant all privileges on nova.* to 'nova'@'localhost' identified by 'nova';
    11. > grant all privileges on nova.* to 'nova'@'%' identified by 'nova';
    12. > create database nova_api;
    13. > grant all privileges on nova_api.* to 'nova'@'localhost' identified by 'nova';
    14. > grant all privileges on nova_api.* to 'nova'@'%' identified by 'nova';
    15. > create database nova_cell0;
    16. > grant all privileges on nova_cell0.* to 'nova'@'localhost' identified by 'nova';
    17. > grant all privileges on nova_cell0.* to 'nova'@'%' identified by 'nova';
    18. > 
    19. > create database neutron;
    20. > grant all privileges on neutron.* to 'neutron'@'localhost' identified by 'neutron';
    21. > grant all privileges on neutron.* to 'neutron'@'%' identified by 'neutron';
    22. > 
    23. > flush privileges;
    24. > select user,host from mysql.user;
    25. > show databases;
    26. > "
    27. "
    28. +-------------------+-----------+
    29. | user              | host      |
    30. +-------------------+-----------+
    31. | glance            | %         |
    32. | keystone          | %         |
    33. | neutron           | %         |
    34. | nova              | %         |
    35. | root              | 127.0.0.1 |
    36. | root              | ::1       |
    37. | clustercheck_user | localhost |
    38. | glance            | localhost |
    39. | keystone          | localhost |
    40. | neutron           | localhost |
    41. | nova              | localhost |
    42. | root              | localhost |
    43. +-------------------+-----------+
    44. +--------------------+
    45. | Database           |
    46. +--------------------+
    47. | galera_test        |
    48. | glance             |
    49. | information_schema |
    50. | keystone           |
    51. | mysql              |
    52. | neutron            |
    53. | nova               |
    54. | nova_api           |
    55. | nova_cell0         |
    56. | performance_schema |
    57. +--------------------+

    Start the xinetd daemon for clustercheck

    1. [root@controller1 ~]# systemctl daemon-reload
    2. [root@controller1 ~]# systemctl enable xinetd
    3. [root@controller1 ~]# systemctl start xinetd

    Memcached on Multiple Servers

    Install the packages

    1. # yum install memcached python-memcached

    Edit the /etc/sysconfig/memcached file

    1. [root@controller1 ~]# cat /etc/sysconfig/memcached                            
    2. PORT="11211"
    3. USER="memcached"
    4. MAXCONN="1024"
    5. CACHESIZE="64"
    6. OPTIONS="-l 127.0.0.1,::1,controller"
    7. Memcached_servers = controller1:11211,controller2:11211,controller3:11211

    PCS Create Memcached

    1. # pcs resource delete memcached --force
    2. # pcs resource create memcached systemd:memcached --clone interleave=true
    3. # pcs status

    Install CentOS & Configure

    Firewall Configure

    1. [root@localhost ~]# systemctl stop firewalld.service
    2. [root@localhost ~]# systemctl disable firewalld.service
    3. [root@localhost ~]# firewall-cmd --state

    Disable SELinux

    1. [root@localhost ~]# sed -i '/^SELINUX=.*/c SELINUX=disabled' /etc/selinux/config
    2. [root@localhost ~]# sed -i 's/^SELINUXTYPE=.*/SELINUXTYPE=disabled/g' /etc/selinux/config
    3. [root@localhost ~]# grep --color=auto '^SELINUX' /etc/selinux/config
    4. [root@localhost ~]# setenforce 0

    Synchronize time

    Refer to “CLOUD COMPUTING —> OpenStack High Availability —> 3.Create Local NTP”

    Set HostName

    1. [root@localhost ~]# hostnamectl set-hostname controller1
    2. [root@localhost ~]# hostnamectl set-hostname controller2
    3. [root@localhost ~]# hostnamectl set-hostname controller3
    4. [root@localhost ~]# hostnamectl set-hostname compute01
    5. [root@localhost ~]# hostnamectl set-hostname compute02

    Network Configure

    192.168.200.0 Host-only

    192.168.220.0 NAT

    Controller1

    1. [root@controller1 ~]# ls -al /etc/sysconfig/network-scripts/ifcfg-*
    2. -rw-r--r--  1 root root 369 Dec 13 22:22 /etc/sysconfig/network-scripts/ifcfg-ens33
    3. -rw-r--r--  1 root root 369 Dec 13 22:23 /etc/sysconfig/network-scripts/ifcfg-ens37
    4. -rw-r--r--  1 root root 326 Dec 13 22:26 /etc/sysconfig/network-scripts/ifcfg-ens38
    5. -rw-r--r--  1 root root 326 Dec 13 22:28 /etc/sysconfig/network-scripts/ifcfg-ens39
    6. -rw-r--r--. 1 root root 254 May  3  2017 /etc/sysconfig/network-scripts/ifcfg-lo

    Update the 1st network adapter:

    1. [root@controller1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33 
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens33
    14. UUID=9eb00433-c8b9-4be2-af53-50cab2247226
    15. DEVICE=ens33
    16. ONBOOT=yes
    17. IPADDR=192.168.220.11
    18. NETMASK=255.255.255.0
    19. GATEWAY=192.168.220.2
    20. DNS1=114.114.114.114

    Update the 2nd network adapter:

    1. [root@controller1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens37
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens37
    14. UUID=cf7a62c9-e135-4488-b252-99717664941c
    15. DEVICE=ens37
    16. ONBOOT=yes
    17. IPADDR=192.168.220.21
    18. NETMASK=255.255.255.0
    19. GATEWAY=192.168.220.2
    20. DNS1=114.114.114.114

    Update the 3rd network adapter:

    1. [root@controller1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens38
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens38
    14. UUID=b077534d-3154-43ca-a240-ac811f255f42
    15. DEVICE=ens38
    16. ONBOOT=yes
    17. IPADDR=192.168.200.11
    18. NETMASK=255.255.255.0

    Update the 4th network adapter:

    1. [root@controller1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens39
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens39
    14. UUID=ea5e0f92-8f8c-457f-a693-f946c623d0e7
    15. DEVICE=ens39
    16. ONBOOT=yes
    17. IPADDR=192.168.200.21
    18. NETMASK=255.255.255.0

    Controller2

    1. [root@controller2 ~]# ls -al /etc/sysconfig/network-scripts/ifcfg-*
    2. -rw-r--r--  1 root root 369 Dec 13 22:22 /etc/sysconfig/network-scripts/ifcfg-ens33
    3. -rw-r--r--  1 root root 369 Dec 13 22:23 /etc/sysconfig/network-scripts/ifcfg-ens37
    4. -rw-r--r--  1 root root 326 Dec 13 22:26 /etc/sysconfig/network-scripts/ifcfg-ens38
    5. -rw-r--r--  1 root root 326 Dec 13 22:28 /etc/sysconfig/network-scripts/ifcfg-ens39
    6. -rw-r--r--. 1 root root 254 May  3  2017 /etc/sysconfig/network-scripts/ifcfg-lo

    Update the 1st network adapter:

    1. [root@controller2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33 
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens33
    14. UUID=14a0d64d-bca2-4b37-ac1d-460897567fff
    15. DEVICE=ens33
    16. ONBOOT=yes
    17. IPADDR=192.168.220.12
    18. NETMASK=255.255.255.0
    19. GATEWAY=192.168.220.2
    20. DNS1=114.114.114.114

    Update the 2nd network adapter:

    1. [root@controller2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens37
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens37
    14. UUID=c382316f-97d8-4e3f-a82b-b48cd6d0d025
    15. DEVICE=ens37
    16. ONBOOT=yes
    17. IPADDR=192.168.220.22
    18. NETMASK=255.255.255.0
    19. GATEWAY=192.168.220.2
    20. DNS1=114.114.114.114

    Update the 3rd network adapter:

    1. [root@controller2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens38
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens38
    14. UUID=f727a6f1-0ae0-4c0d-aa54-fbaefb3570c7
    15. DEVICE=ens38
    16. ONBOOT=yes
    17. IPADDR=192.168.200.12
    18. NETMASK=255.255.255.0

    Update the 4th network adapter:

    1. [root@controller2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens39
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens39
    14. UUID=b56c3af9-2844-47e3-9e30-ef078640b2f1
    15. DEVICE=ens39
    16. ONBOOT=yes
    17. IPADDR=192.168.200.22
    18. NETMASK=255.255.255.0

    Controller3

    1. [root@controller3 ~]# ls -al /etc/sysconfig/network-scripts/ifcfg-*
    2. -rw-r--r--  1 root root 369 Dec 13 22:22 /etc/sysconfig/network-scripts/ifcfg-ens33
    3. -rw-r--r--  1 root root 369 Dec 13 22:23 /etc/sysconfig/network-scripts/ifcfg-ens37
    4. -rw-r--r--  1 root root 326 Dec 13 22:26 /etc/sysconfig/network-scripts/ifcfg-ens38
    5. -rw-r--r--  1 root root 326 Dec 13 22:28 /etc/sysconfig/network-scripts/ifcfg-ens39
    6. -rw-r--r--. 1 root root 254 May  3  2017 /etc/sysconfig/network-scripts/ifcfg-lo

    Update the 1st network adapter:

    1. [root@controller3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens33
    14. UUID=5ca30d63-789d-4df4-9f98-29aa74945e1b
    15. DEVICE=ens33
    16. ONBOOT=yes
    17. IPADDR=192.168.220.13
    18. NETMASK=255.255.255.0
    19. GATEWAY=192.168.220.2
    20. DNS1=114.114.114.114

    Update the 2nd network adapter:

    1. [root@controller3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens37
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens37
    14. UUID=8cb6cd8b-304f-4148-96bb-326976276d17
    15. DEVICE=ens37
    16. ONBOOT=yes
    17. IPADDR=192.168.220.23
    18. NETMASK=255.255.255.0
    19. GATEWAY=192.168.220.2
    20. DNS1=114.114.114.114

    Update the 3rd network adapter:

    1. [root@controller3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens38
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens38
    14. UUID=9d8e2ebb-ded2-4d51-8b77-072ccfc269c3
    15. DEVICE=ens38
    16. ONBOOT=yes
    17. IPADDR=192.168.200.13
    18. NETMASK=255.255.255.0

    Update the 4th network adapter:

    1. [root@controller3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens39
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens39
    14. UUID=639fdbe3-b6f4-4f8d-b988-b9e01ef5041e
    15. DEVICE=ens39
    16. ONBOOT=yes
    17. IPADDR=192.168.200.23
    18. NETMASK=255.255.255.0

    Compute01

    1. [root@compute01 ~]# ls -al /etc/sysconfig/network-scripts/ifcfg-*
    2. -rw-r--r--  1 root root 369 Dec 13 22:22 /etc/sysconfig/network-scripts/ifcfg-ens33
    3. -rw-r--r--  1 root root 326 Dec 13 22:23 /etc/sysconfig/network-scripts/ifcfg-ens37
    4. -rw-r--r--. 1 root root 254 May  3  2017 /etc/sysconfig/network-scripts/ifcfg-lo

    Update the 1st network adapter:

    1. [root@compute01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens33
    14. UUID=fdab3eb4-d1c6-46e4-a09e-f3cff2c23514
    15. DEVICE=ens33
    16. ONBOOT=yes
    17. IPADDR=192.168.220.51
    18. NETMASK=255.255.255.0
    19. GATEWAY=192.168.220.2
    20. DNS1=114.114.114.114

    Update the 2nd network adapter:

    1. [root@compute01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens37
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens37
    14. UUID=0157d35c-ced3-4c0c-a519-48cb2a11e8db
    15. DEVICE=ens37
    16. ONBOOT=yes
    17. IPADDR=192.168.200.51
    18. NETMASK=255.255.255.0

    Compute02

    1. [root@compute02 ~]# ls -al /etc/sysconfig/network-scripts/ifcfg-*
    2. -rw-r--r--  1 root root 369 Dec 13 22:22 /etc/sysconfig/network-scripts/ifcfg-ens33
    3. -rw-r--r--  1 root root 326 Dec 13 22:23 /etc/sysconfig/network-scripts/ifcfg-ens37
    4. -rw-r--r--. 1 root root 254 May  3  2017 /etc/sysconfig/network-scripts/ifcfg-lo

    Update the 1st network adapter:

    1. [root@compute02 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens33
    14. UUID=e8cf9148-b8dd-4879-8851-f523bb0cefd0
    15. DEVICE=ens33
    16. ONBOOT=yes
    17. IPADDR=192.168.220.61
    18. NETMAKE=255.255.255.0
    19. GATEWAY=192.168.220.2
    20. DNS1=114.114.114.114

    Update the 2nd network adapter:

    1. [root@compute02 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens37
    2. TYPE=Ethernet
    3. PROXY_METHOD=none
    4. BROWSER_ONLY=no
    5. BOOTPROTO=static
    6. DEFROUTE=yes
    7. IPV4_FAILURE_FATAL=no
    8. IPV6INIT=yes
    9. IPV6_AUTOCONF=yes
    10. IPV6_DEFROUTE=yes
    11. IPV6_FAILURE_FATAL=no
    12. IPV6_ADDR_GEN_MODE=stable-privacy
    13. NAME=ens37
    14. UUID=308add2b-09df-495f-b706-5afbdff0ff9e
    15. DEVICE=ens37
    16. ONBOOT=yes
    17. IPADDR=192.168.200.61
    18. NETMAKE=255.255.255.0

    Update HostName

    1. [root@controller1 ~]# cat /etc/hosts
    2. 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    3. ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    4. 192.168.220.20 controller # virtual IP
    5. 192.168.220.21 controller1
    6. 192.168.220.22 controller2
    7. 192.168.220.23 controller3
    8. 192.168.220.51 compute01
    9. 192.168.220.61 compute02

    Controller SSH

    1. [root@controller1 ~]# ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa
    2. Generating public/private rsa key pair.
    3. Created directory '/root/.ssh'.
    4. Your identification has been saved in /root/.ssh/id_rsa.
    5. Your public key has been saved in /root/.ssh/id_rsa.pub.
    6. The key fingerprint is:
    7. SHA256:RJz627PplvqRVorpdiRPXLZ15aiQD/YruvXT/Cu1sSo root@controller1
    8. The key s randomart image is:
    9. +---[RSA 2048]----+
    10. |       ...       |
    11. |       .o       .|
    12. |       ..  .   o.|
    13. |      ..  = o o o|
    14. |       .So B.+ . |
    15. |        oo++=  o |
    16. |        oB*. +. +|
    17. |       .ooOEo.oo |
    18. |       .=O=+ooooo|
    19. +----[SHA256]-----+
    20. [root@controller1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
    21. /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
    22. The authenticity of host 'controller2 (192.168.220.22)' can't be established.
    23. ECDSA key fingerprint is SHA256:Q5vLVMvx0+FWYxqM263f4//dH72IwEgT/bWeOIlwTfY.
    24. ECDSA key fingerprint is MD5:b5:6a:fb:3f:be:98:f7:d9:71:4e:d1:89:c4:7f:8f:00.
    25. Are you sure you want to continue connecting (yes/no)? yes
    26. /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
    27. /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    28. [email protected]'s password: 
    29.  
    30. Number of key(s) added: 1
    31.  
    32. Now try logging into the machine, with:   "ssh '[email protected]'"
    33. and check to make sure that only the key(s) you wanted were added.
    34.  
    35. [root@controller1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
    36. /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
    37. The authenticity of host 'controller3 (192.168.220.23)' can't be established.
    38. ECDSA key fingerprint is SHA256:Q5vLVMvx0+FWYxqM263f4//dH72IwEgT/bWeOIlwTfY.
    39. ECDSA key fingerprint is MD5:b5:6a:fb:3f:be:98:f7:d9:71:4e:d1:89:c4:7f:8f:00.
    40. Are you sure you want to continue connecting (yes/no)? yes
    41. /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
    42. /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    43. [email protected]'s password: 
    44.  
    45. Number of key(s) added: 1
    46.  
    47. Now try logging into the machine, with:   "ssh '[email protected]'"
    48. and check to make sure that only the key(s) you wanted were added.
    49.  
    50. [root@controller1 ~]# ssh controller2
    51. Last login: Thu Dec 14 00:47:15 2017 from 192.168.220.1
    52. [root@controller2 ~]# exit
    53. logout
    54. Connection to controller2 closed.
    55. [root@controller1 ~]# ssh controller3
    56. Last login: Thu Dec 14 00:47:16 2017 from 192.168.220.1
    57. [root@controller3 ~]# exit
    58. logout
    59. Connection to controller3 closed.
    60. [root@controller1 ~]#

    Use Local Repository

    Refer to “CLOUD COMPUTING —> OpenStack High Availability —> 2.Create Local Repository

    Use Ali Mirror

    1. [root@localrepo ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    2. [root@localrepo ~]# cat /etc/yum.repos.d/CentOS-Pike.repo 
    3.  
    4. [centos-openstack-pike]
    5. name=centos-openstack-pike
    6. baseurl=https://mirrors.aliyun.com/centos/$releasever/cloud/$basearch/openstack-pike/
    7. gpgcheck=0
    8. enabled=1
    9.  
    10. [centos-qemu-ev]
    11. name=centos-qemu-ev
    12. baseurl=https://mirrors.aliyun.com/centos/$releasever/virt/$basearch/kvm-common/
    13. gpgcheck=0
    14. enabled=1

    Sync Repo

    1. [root@localrepo myrepo]# reposync --repoid=centos-openstack-pike
    2. [root@localrepo myrepo]# reposync --repoid=centos-qemu-ev
    3. [root@localrepo myrepo]# ls -al
    4. total 120
    5. drwxr-xr-x. 7 root root    98 Dec 14 02:51 .
    6. drwxr-xr-x. 3 root root    20 Dec 13 03:03 ..
    7. drwxr-xr-x. 4 root root    38 Dec 14 02:30 base
    8. drwxr-xr-x. 3 root root 90112 Dec 14 02:50 centos-openstack-pike
    9. drwxr-xr-x. 2 root root  4096 Dec 14 02:51 centos-qemu-ev
    10. drwxr-xr-x. 4 root root    38 Dec 14 02:31 extras
    11. drwxr-xr-x. 4 root root    38 Dec 14 02:31 updates

    Create Repo

    1. [root@localrepo myrepo]# createrepo /var/www/html/myrepo/centos-openstack-pike
    2. Spawning worker 0 with 1091 pkgs
    3. Spawning worker 1 with 1091 pkgs
    4. Workers Finished
    5. Saving Primary metadata
    6. Saving file lists metadata
    7. Saving other metadata
    8. Generating sqlite DBs
    9. Sqlite DBs complete
    10. [root@localrepo myrepo]# createrepo /var/www/html/myrepo/centos-qemu-ev/
    11. Spawning worker 0 with 18 pkgs
    12. Spawning worker 1 with 17 pkgs
    13. Workers Finished
    14. Saving Primary metadata
    15. Saving file lists metadata
    16. Saving other metadata
    17. Generating sqlite DBs
    18. Sqlite DBs complete

    Add Ali Mirror On Client Node

    1. [root@controller1 ~]# cat /etc/yum.repos.d/CentOS-Pike.repo 
    2.  
    3. [centos-openstack-pike]
    4. name=centos-openstack-pike
    5. baseurl=http://192.168.220.200/myrepo/centos-openstack-pike/
    6. gpgcheck=0
    7. enabled=1
    8.  
    9. [centos-qemu-ev]
    10. name=centos-qemu-ev
    11. baseurl=http://192.168.220.200/myrepo/centos-qemu-ev/
    12. gpgcheck=0
    13. enabled=1
    14.  
    15. [root@controller1 ~]# rsync -avzP  -e 'ssh -p 22'  /etc/yum.repos.d/CentOS-Pike.repo controller2:/etc/yum.repos.d/
    16. sending incremental file list
    17. CentOS-Pike.repo
    18.          247 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/1)
    19.  
    20. sent 195 bytes  received 31 bytes  452.00 bytes/sec
    21. total size is 247  speedup is 1.09
    22. [root@controller1 ~]# rsync -avzP  -e 'ssh -p 22'  /etc/yum.repos.d/CentOS-Pike.repo controller3:/etc/yum.repos.d/
    23. sending incremental file list
    24. CentOS-Pike.repo
    25.          247 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/1)
    26.  
    27. sent 195 bytes  received 31 bytes  452.00 bytes/sec
    28. total size is 247  speedup is 1.09

    Install OpenStack Environment On All Nodes

    1. [root@controller1 ~]# yum install centos-release-openstack-pike -y
    2. [root@controller1 ~]# yum install python-openstackclient openstack-selinux python2-PyMySQL openstack-utils -y
    3. [root@controller1 ~]# yum update -y

    Create Local NTP

    Controller node

    Install Chrony

    1. [root@localhost ~]# yum install chrony -y

    Edit the /etc/chrony.conf file

    1. [root@localntp ~]# diff /etc/chrony.conf /etc/chrony.conf_bak
    2. 3,7c3,6
    3. < #server 0.centos.pool.ntp.org iburst
    4. < #server 1.centos.pool.ntp.org iburst
    5. < #server 2.centos.pool.ntp.org iburst
    6. < #server 3.centos.pool.ntp.org iburst
    7. < server 192.168.220.201 iburst
    8. ---
    9. > server 0.centos.pool.ntp.org iburst
    10. > server 1.centos.pool.ntp.org iburst
    11. > server 2.centos.pool.ntp.org iburst
    12. > server 3.centos.pool.ntp.org iburst
    13. 28d26
    14. < allow 192.168.220.0/24

    Start the NTP service

    1. [root@localhost ~]# systemctl enable chronyd.service
    2. [root@localhost ~]# systemctl start chronyd.service
    3. [root@localhost ~]# systemctl restart chronyd.service

    Other nodes

    Install Chrony

    1. [root@localhost ~]# yum install chrony -y

    Edit the /etc/chrony.conf file

    1. [root@localhost ~]# diff /etc/chrony.conf /etc/chrony.conf_bak
    2. 3,7c3,6
    3. < #server 0.centos.pool.ntp.org iburst
    4. < #server 1.centos.pool.ntp.org iburst
    5. < #server 2.centos.pool.ntp.org iburst
    6. < #server 3.centos.pool.ntp.org iburst
    7. < server 192.168.220.201 iburst
    8. ---
    9. > server 0.centos.pool.ntp.org iburst
    10. > server 1.centos.pool.ntp.org iburst
    11. > server 2.centos.pool.ntp.org iburst
    12. > server 3.centos.pool.ntp.org iburst

    Start the NTP service

    1. [root@localhost ~]# systemctl enable chronyd.service
    2. [root@localhost ~]# systemctl start chronyd.service
    3. [root@localhost ~]# systemctl restart chronyd.service

    Verify operation

    controller node

    1. [root@localhost ~]# chronyc sources
    2. 210 Number of sources = 1
    3. MS Name/IP address         Stratum Poll Reach LastRx Last sample               
    4. ===============================================================================
    5. ^? localhost.localdomain         0   8     0     -     +0ns[   +0ns] +/-    0ns

    other nodes

    1. [root@localhost ~]# chronyc sources
    2. 210 Number of sources = 1
    3. MS Name/IP address         Stratum Poll Reach LastRx Last sample               
    4. ===============================================================================
    5. ^? 192.168.220.201               0   8     0     -     +0ns[   +0ns] +/-    0ns

    Create Local Repository

    Configure Firewall

    1. [root@localhost ~]# systemctl stop firewalld.service
    2. [root@localhost ~]# systemctl disable firewalld.service

    Install Httpd & Start Service

    1. [root@localhost ~]# yum install httpd -y
    2. [root@localhost ~]# systemctl enable httpd.service
    3. [root@localhost ~]# systemctl restart httpd.service
    4. [root@localhost ~]# systemctl status httpd.service

    Now, Take the Browser

    http://192.168.220.200

    Install Reposync

    1. [root@localhost ~]# yum install yum-utils -y

    Create Repo Dir

    1. [root@localhost ~]# mkdir /var/www/html/myrepo
    2. [root@localhost ~]# cd /var/www/html/myrepo

    List Repo

    1. [root@localhost myrepo]# yum repolist
    2. Loaded plugins: fastestmirror
    3. Loading mirror speeds from cached hostfile
    4.  * base: mirrors.163.com
    5.  * extras: mirrors.163.com
    6.  * updates: mirrors.aliyun.com
    7. repo id                                                 repo name                                                  status
    8. base/7/x86_64                                           CentOS-7 - Base                                            9,591
    9. extras/7/x86_64                                         CentOS-7 - Extras                                            284
    10. updates/7/x86_64                                        CentOS-7 - Updates                                         1,490
    11. repolist: 11,365

    Sync Repo

    1. [root@localhost myrepo]# reposync --repoid=base
    2. [root@localhost myrepo]# reposync --repoid=updates
    3. [root@localhost myrepo]# reposync --repoid=extras
    4. [root@localhost myrepo]# pwd
    5. /var/www/html/myrepo
    6. [root@localhost myrepo]# ls -al
    7. total 0
    8. drwxr-xr-x. 5 root root 47 Dec  6 20:18 .
    9. drwxr-xr-x. 3 root root 20 Dec  6 03:12 ..
    10. drwxr-xr-x. 3 root root 22 Dec  6 03:48 base
    11. drwxr-xr-x. 3 root root 22 Dec  6 20:18 extras
    12. drwxr-xr-x. 3 root root 22 Dec  6 20:06 updates

    Install Createrepo

    1. [root@localhost ~]# yum install createrepo -y

    Create Repo

    1. [root@localhost ~]# createrepo /var/www/html/myrepo/base
    2. Spawning worker 0 with 9591 pkgs
    3. Workers Finished
    4. Saving Primary metadata
    5. Saving file lists metadata
    6. Saving other metadata
    7. Generating sqlite DBs
    8. Sqlite DBs complete
    9. [root@localhost ~]# createrepo /var/www/html/myrepo/updates
    10. Spawning worker 0 with 1490 pkgs
    11. Workers Finished
    12. Saving Primary metadata
    13. Saving file lists metadata
    14. Saving other metadata
    15. Generating sqlite DBs
    16. Sqlite DBs complete
    17. [root@localhost ~]# createrepo /var/www/html/myrepo/extras
    18. Spawning worker 0 with 284 pkgs
    19. Workers Finished
    20. Saving Primary metadata
    21. Saving file lists metadata
    22. Saving other metadata
    23. Generating sqlite DBs
    24. Sqlite DBs complete

    Now, Take the Browser

    http://192.168.220.200/myrepo/

    Update Client Repo

    1. [root@localhost ~]# diff /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak 
    2. 15c15
    3. < baseurl=http://192.168.220.200/myrepo/base
    4. ---
    5. > mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
    6. 17c17
    7. < gpgcheck=0
    8. ---
    9. > gpgcheck=1
    10. 23c23
    11. < baseurl=http://192.168.220.200/myrepo/updates
    12. ---
    13. > mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
    14. 25c25
    15. < gpgcheck=0
    16. ---
    17. > gpgcheck=1
    18. 31c31
    19. < baseurl=http://192.168.220.200/myrepo/extras
    20. ---
    21. > mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
    22. 33c33
    23. < gpgcheck=0
    24. ---
    25. > gpgcheck=1

    Make Client Cache

    1. [root@localhost ~]# yum clean all && yum makecache

    Client Example

    1. [root@localhost ~]# yum install vim
    2. Loaded plugins: fastestmirror
    3. Loading mirror speeds from cached hostfile
    4. Resolving Dependencies
    5. --> Running transaction check
    6. ---> Package vim-enhanced.x86_64 2:7.4.160-2.el7 will be installed
    7. --> Processing Dependency: vim-common = 2:7.4.160-2.el7 for package: 2:vim-enhanced-7.4.160-2.el7.x86_64
    8. --> Processing Dependency: perl(:MODULE_COMPAT_5.16.3) for package: 2:vim-enhanced-7.4.160-2.el7.x86_64
    9. --> Processing Dependency: libperl.so()(64bit) for package: 2:vim-enhanced-7.4.160-2.el7.x86_64
    10. --> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.160-2.el7.x86_64
    11. --> Running transaction check
    12. ---> Package gpm-libs.x86_64 0:1.20.7-5.el7 will be installed
    13. ---> Package perl.x86_64 4:5.16.3-292.el7 will be installed
    14. --> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-292.el7.x86_64
    15. --> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-292.el7.x86_64
    16. --> Processing Dependency: perl-macros for package: 4:perl-5.16.3-292.el7.x86_64
    17. --> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-292.el7.x86_64
    18. --> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-292.el7.x86_64
    19. --> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-292.el7.x86_64
    20. --> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-292.el7.x86_64
    21. --> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-292.el7.x86_64
    22. --> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-292.el7.x86_64
    23. --> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-292.el7.x86_64
    24. --> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-292.el7.x86_64
    25. --> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-292.el7.x86_64
    26. --> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-292.el7.x86_64
    27. --> Processing Dependency: perl(Getopt::Long) for package: 4:perl-5.16.3-292.el7.x86_64
    28. --> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-292.el7.x86_64
    29. --> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-292.el7.x86_64
    30. --> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-292.el7.x86_64
    31. --> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-292.el7.x86_64
    32. --> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-292.el7.x86_64
    33. --> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-292.el7.x86_64
    34. --> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-292.el7.x86_64
    35. --> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-292.el7.x86_64
    36. --> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-292.el7.x86_64
    37. ---> Package perl-libs.x86_64 4:5.16.3-292.el7 will be installed
    38. ---> Package vim-common.x86_64 2:7.4.160-2.el7 will be installed
    39. --> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.160-2.el7.x86_64
    40. --> Running transaction check
    41. ---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed
    42. ---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed
    43. ---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed
    44. ---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed
    45. ---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed
    46. ---> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed
    47. --> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch
    48. --> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch
    49. ---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed
    50. ---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed
    51. --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
    52. --> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
    53. ---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed
    54. ---> Package perl-Socket.x86_64 0:2.010-4.el7 will be installed
    55. ---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed
    56. ---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed
    57. ---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed
    58. ---> Package perl-constant.noarch 0:1.27-2.el7 will be installed
    59. ---> Package perl-macros.x86_64 4:5.16.3-292.el7 will be installed
    60. ---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed
    61. ---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed
    62. ---> Package vim-filesystem.x86_64 2:7.4.160-2.el7 will be installed
    63. --> Running transaction check
    64. ---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
    65. ---> Package perl-Pod-Escapes.noarch 1:1.04-292.el7 will be installed
    66. ---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed
    67. --> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch
    68. --> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch
    69. ---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed
    70. --> Running transaction check
    71. ---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed
    72. --> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
    73. --> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
    74. ---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed
    75. --> Running transaction check
    76. ---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed
    77. ---> Package perl-parent.noarch 1:0.225-244.el7 will be installed
    78. --> Finished Dependency Resolution
    79.  
    80. Dependencies Resolved
    81.  
    82. =========================================================================================================================
    83.  Package                               Arch                  Version                           Repository           Size
    84. =========================================================================================================================
    85. Installing:
    86.  vim-enhanced                          x86_64                2:7.4.160-2.el7                   base                1.0 M
    87. Installing for dependencies:
    88.  gpm-libs                              x86_64                1.20.7-5.el7                      base                 32 k
    89.  perl                                  x86_64                4:5.16.3-292.el7                  base                8.0 M
    90.  perl-Carp                             noarch                1.26-244.el7                      base                 19 k
    91.  perl-Encode                           x86_64                2.51-7.el7                        base                1.5 M
    92.  perl-Exporter                         noarch                5.68-3.el7                        base                 28 k
    93.  perl-File-Path                        noarch                2.09-2.el7                        base                 26 k
    94.  perl-File-Temp                        noarch                0.23.01-3.el7                     base                 56 k
    95.  perl-Filter                           x86_64                1.49-3.el7                        base                 76 k
    96.  perl-Getopt-Long                      noarch                2.40-2.el7                        base                 56 k
    97.  perl-HTTP-Tiny                        noarch                0.033-3.el7                       base                 38 k
    98.  perl-PathTools                        x86_64                3.40-5.el7                        base                 82 k
    99.  perl-Pod-Escapes                      noarch                1:1.04-292.el7                    base                 51 k
    100.  perl-Pod-Perldoc                      noarch                3.20-4.el7                        base                 87 k
    101.  perl-Pod-Simple                       noarch                1:3.28-4.el7                      base                216 k
    102.  perl-Pod-Usage                        noarch                1.63-3.el7                        base                 27 k
    103.  perl-Scalar-List-Utils                x86_64                1.27-248.el7                      base                 36 k
    104.  perl-Socket                           x86_64                2.010-4.el7                       base                 49 k
    105.  perl-Storable                         x86_64                2.45-3.el7                        base                 77 k
    106.  perl-Text-ParseWords                  noarch                3.29-4.el7                        base                 14 k
    107.  perl-Time-HiRes                       x86_64                4:1.9725-3.el7                    base                 45 k
    108.  perl-Time-Local                       noarch                1.2300-2.el7                      base                 24 k
    109.  perl-constant                         noarch                1.27-2.el7                        base                 19 k
    110.  perl-libs                             x86_64                4:5.16.3-292.el7                  base                688 k
    111.  perl-macros                           x86_64                4:5.16.3-292.el7                  base                 43 k
    112.  perl-parent                           noarch                1:0.225-244.el7                   base                 12 k
    113.  perl-podlators                        noarch                2.5.1-3.el7                       base                112 k
    114.  perl-threads                          x86_64                1.87-4.el7                        base                 49 k
    115.  perl-threads-shared                   x86_64                1.43-6.el7                        base                 39 k
    116.  vim-common                            x86_64                2:7.4.160-2.el7                   base                5.9 M
    117.  vim-filesystem                        x86_64                2:7.4.160-2.el7                   base                9.8 k
    118.  
    119. Transaction Summary
    120. =========================================================================================================================
    121. Install  1 Package (+30 Dependent packages)
    122.  
    123. Total download size: 18 M
    124. Installed size: 60 M
    125. Is this ok [y/d/N]: y
    126. Downloading packages:
    127. (1/31): gpm-libs-1.20.7-5.el7.x86_64.rpm                                                          |  32 kB  00:00:00     
    128. (2/31): perl-Carp-1.26-244.el7.noarch.rpm                                                         |  19 kB  00:00:00     
    129. (3/31): perl-5.16.3-292.el7.x86_64.rpm                                                            | 8.0 MB  00:00:00     
    130. (4/31): perl-Encode-2.51-7.el7.x86_64.rpm                                                         | 1.5 MB  00:00:00     
    131. (5/31): perl-Exporter-5.68-3.el7.noarch.rpm                                                       |  28 kB  00:00:00     
    132. (6/31): perl-File-Path-2.09-2.el7.noarch.rpm                                                      |  26 kB  00:00:00     
    133. (7/31): perl-Filter-1.49-3.el7.x86_64.rpm                                                         |  76 kB  00:00:00     
    134. (8/31): perl-Getopt-Long-2.40-2.el7.noarch.rpm                                                    |  56 kB  00:00:00     
    135. (9/31): perl-File-Temp-0.23.01-3.el7.noarch.rpm                                                   |  56 kB  00:00:00     
    136. (10/31): perl-HTTP-Tiny-0.033-3.el7.noarch.rpm                                                    |  38 kB  00:00:00     
    137. (11/31): perl-Pod-Escapes-1.04-292.el7.noarch.rpm                                                 |  51 kB  00:00:00     
    138. (12/31): perl-PathTools-3.40-5.el7.x86_64.rpm                                                     |  82 kB  00:00:00     
    139. (13/31): perl-Pod-Perldoc-3.20-4.el7.noarch.rpm                                                   |  87 kB  00:00:00     
    140. (14/31): perl-Pod-Usage-1.63-3.el7.noarch.rpm                                                     |  27 kB  00:00:00     
    141. (15/31): perl-Pod-Simple-3.28-4.el7.noarch.rpm                                                    | 216 kB  00:00:00     
    142. (16/31): perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm                                           |  36 kB  00:00:00     
    143. (17/31): perl-Socket-2.010-4.el7.x86_64.rpm                                                       |  49 kB  00:00:00     
    144. (18/31): perl-Storable-2.45-3.el7.x86_64.rpm                                                      |  77 kB  00:00:00     
    145. (19/31): perl-Text-ParseWords-3.29-4.el7.noarch.rpm                                               |  14 kB  00:00:00     
    146. (20/31): perl-Time-HiRes-1.9725-3.el7.x86_64.rpm                                                  |  45 kB  00:00:00     
    147. (21/31): perl-Time-Local-1.2300-2.el7.noarch.rpm                                                  |  24 kB  00:00:00     
    148. (22/31): perl-constant-1.27-2.el7.noarch.rpm                                                      |  19 kB  00:00:00     
    149. (23/31): perl-macros-5.16.3-292.el7.x86_64.rpm                                                    |  43 kB  00:00:00     
    150. (24/31): perl-libs-5.16.3-292.el7.x86_64.rpm                                                      | 688 kB  00:00:00     
    151. (25/31): perl-parent-0.225-244.el7.noarch.rpm                                                     |  12 kB  00:00:00     
    152. (26/31): perl-threads-1.87-4.el7.x86_64.rpm                                                       |  49 kB  00:00:00     
    153. (27/31): perl-threads-shared-1.43-6.el7.x86_64.rpm                                                |  39 kB  00:00:00     
    154. (28/31): perl-podlators-2.5.1-3.el7.noarch.rpm                                                    | 112 kB  00:00:00     
    155. (29/31): vim-common-7.4.160-2.el7.x86_64.rpm                                                      | 5.9 MB  00:00:00     
    156. (30/31): vim-filesystem-7.4.160-2.el7.x86_64.rpm                                                  | 9.8 kB  00:00:00     
    157. (31/31): vim-enhanced-7.4.160-2.el7.x86_64.rpm                                                    | 1.0 MB  00:00:00     
    158. -------------------------------------------------------------------------------------------------------------------------
    159. Total                                                                                     41 MB/s |  18 MB  00:00:00     
    160. Running transaction check
    161. Running transaction test
    162. Transaction test succeeded
    163. Running transaction
    164.   Installing : 1:perl-parent-0.225-244.el7.noarch                                                                   1/31 
    165.   Installing : perl-HTTP-Tiny-0.033-3.el7.noarch                                                                    2/31 
    166.   Installing : perl-podlators-2.5.1-3.el7.noarch                                                                    3/31 
    167.   Installing : perl-Pod-Perldoc-3.20-4.el7.noarch                                                                   4/31 
    168.   Installing : 1:perl-Pod-Escapes-1.04-292.el7.noarch                                                               5/31 
    169.   Installing : perl-Text-ParseWords-3.29-4.el7.noarch                                                               6/31 
    170.   Installing : perl-Encode-2.51-7.el7.x86_64                                                                        7/31 
    171.   Installing : perl-Pod-Usage-1.63-3.el7.noarch                                                                     8/31 
    172.   Installing : 4:perl-macros-5.16.3-292.el7.x86_64                                                                  9/31 
    173.   Installing : 4:perl-libs-5.16.3-292.el7.x86_64                                                                   10/31 
    174.   Installing : perl-Storable-2.45-3.el7.x86_64                                                                     11/31 
    175.   Installing : perl-Exporter-5.68-3.el7.noarch                                                                     12/31 
    176.   Installing : perl-constant-1.27-2.el7.noarch                                                                     13/31 
    177.   Installing : perl-Time-Local-1.2300-2.el7.noarch                                                                 14/31 
    178.   Installing : perl-Socket-2.010-4.el7.x86_64                                                                      15/31 
    179.   Installing : perl-Carp-1.26-244.el7.noarch                                                                       16/31 
    180.   Installing : perl-PathTools-3.40-5.el7.x86_64                                                                    17/31 
    181.   Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64                                                          18/31 
    182.   Installing : perl-File-Temp-0.23.01-3.el7.noarch                                                                 19/31 
    183.   Installing : perl-File-Path-2.09-2.el7.noarch                                                                    20/31 
    184.   Installing : perl-threads-shared-1.43-6.el7.x86_64                                                               21/31 
    185.   Installing : perl-threads-1.87-4.el7.x86_64                                                                      22/31 
    186.   Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                                                               23/31 
    187.   Installing : perl-Filter-1.49-3.el7.x86_64                                                                       24/31 
    188.   Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch                                                                 25/31 
    189.   Installing : perl-Getopt-Long-2.40-2.el7.noarch                                                                  26/31 
    190.   Installing : 4:perl-5.16.3-292.el7.x86_64                                                                        27/31 
    191.   Installing : gpm-libs-1.20.7-5.el7.x86_64                                                                        28/31 
    192.   Installing : 2:vim-filesystem-7.4.160-2.el7.x86_64                                                               29/31 
    193.   Installing : 2:vim-common-7.4.160-2.el7.x86_64                                                                   30/31 
    194.   Installing : 2:vim-enhanced-7.4.160-2.el7.x86_64                                                                 31/31 
    195.   Verifying  : perl-HTTP-Tiny-0.033-3.el7.noarch                                                                    1/31 
    196.   Verifying  : perl-threads-shared-1.43-6.el7.x86_64                                                                2/31 
    197.   Verifying  : perl-Storable-2.45-3.el7.x86_64                                                                      3/31 
    198.   Verifying  : 2:vim-filesystem-7.4.160-2.el7.x86_64                                                                4/31 
    199.   Verifying  : perl-Exporter-5.68-3.el7.noarch                                                                      5/31 
    200.   Verifying  : perl-constant-1.27-2.el7.noarch                                                                      6/31 
    201.   Verifying  : perl-PathTools-3.40-5.el7.x86_64                                                                     7/31 
    202.   Verifying  : 4:perl-macros-5.16.3-292.el7.x86_64                                                                  8/31 
    203.   Verifying  : 1:perl-parent-0.225-244.el7.noarch                                                                   9/31 
    204.   Verifying  : 4:perl-5.16.3-292.el7.x86_64                                                                        10/31 
    205.   Verifying  : perl-File-Temp-0.23.01-3.el7.noarch                                                                 11/31 
    206.   Verifying  : 1:perl-Pod-Simple-3.28-4.el7.noarch                                                                 12/31 
    207.   Verifying  : perl-Time-Local-1.2300-2.el7.noarch                                                                 13/31 
    208.   Verifying  : gpm-libs-1.20.7-5.el7.x86_64                                                                        14/31 
    209.   Verifying  : 4:perl-libs-5.16.3-292.el7.x86_64                                                                   15/31 
    210.   Verifying  : perl-Pod-Perldoc-3.20-4.el7.noarch                                                                  16/31 
    211.   Verifying  : perl-Socket-2.010-4.el7.x86_64                                                                      17/31 
    212.   Verifying  : perl-Carp-1.26-244.el7.noarch                                                                       18/31 
    213.   Verifying  : 2:vim-common-7.4.160-2.el7.x86_64                                                                   19/31 
    214.   Verifying  : perl-Scalar-List-Utils-1.27-248.el7.x86_64                                                          20/31 
    215.   Verifying  : 1:perl-Pod-Escapes-1.04-292.el7.noarch                                                              21/31 
    216.   Verifying  : perl-Pod-Usage-1.63-3.el7.noarch                                                                    22/31 
    217.   Verifying  : perl-Encode-2.51-7.el7.x86_64                                                                       23/31 
    218.   Verifying  : perl-podlators-2.5.1-3.el7.noarch                                                                   24/31 
    219.   Verifying  : perl-Getopt-Long-2.40-2.el7.noarch                                                                  25/31 
    220.   Verifying  : 2:vim-enhanced-7.4.160-2.el7.x86_64                                                                 26/31 
    221.   Verifying  : perl-File-Path-2.09-2.el7.noarch                                                                    27/31 
    222.   Verifying  : perl-threads-1.87-4.el7.x86_64                                                                      28/31 
    223.   Verifying  : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                                                               29/31 
    224.   Verifying  : perl-Filter-1.49-3.el7.x86_64                                                                       30/31 
    225.   Verifying  : perl-Text-ParseWords-3.29-4.el7.noarch                                                              31/31 
    226.  
    227. Installed:
    228.   vim-enhanced.x86_64 2:7.4.160-2.el7                                                                                    
    229.  
    230. Dependency Installed:
    231.   gpm-libs.x86_64 0:1.20.7-5.el7                            perl.x86_64 4:5.16.3-292.el7                                 
    232.   perl-Carp.noarch 0:1.26-244.el7                           perl-Encode.x86_64 0:2.51-7.el7                              
    233.   perl-Exporter.noarch 0:5.68-3.el7                         perl-File-Path.noarch 0:2.09-2.el7                           
    234.   perl-File-Temp.noarch 0:0.23.01-3.el7                     perl-Filter.x86_64 0:1.49-3.el7                              
    235.   perl-Getopt-Long.noarch 0:2.40-2.el7                      perl-HTTP-Tiny.noarch 0:0.033-3.el7                          
    236.   perl-PathTools.x86_64 0:3.40-5.el7                        perl-Pod-Escapes.noarch 1:1.04-292.el7                       
    237.   perl-Pod-Perldoc.noarch 0:3.20-4.el7                      perl-Pod-Simple.noarch 1:3.28-4.el7                          
    238.   perl-Pod-Usage.noarch 0:1.63-3.el7                        perl-Scalar-List-Utils.x86_64 0:1.27-248.el7                 
    239.   perl-Socket.x86_64 0:2.010-4.el7                          perl-Storable.x86_64 0:2.45-3.el7                            
    240.   perl-Text-ParseWords.noarch 0:3.29-4.el7                  perl-Time-HiRes.x86_64 4:1.9725-3.el7                        
    241.   perl-Time-Local.noarch 0:1.2300-2.el7                     perl-constant.noarch 0:1.27-2.el7                            
    242.   perl-libs.x86_64 4:5.16.3-292.el7                         perl-macros.x86_64 4:5.16.3-292.el7                          
    243.   perl-parent.noarch 1:0.225-244.el7                        perl-podlators.noarch 0:2.5.1-3.el7                          
    244.   perl-threads.x86_64 0:1.87-4.el7                          perl-threads-shared.x86_64 0:1.43-6.el7                      
    245.   vim-common.x86_64 2:7.4.160-2.el7                         vim-filesystem.x86_64 2:7.4.160-2.el7                        
    246.  
    247. Complete!

    HA Prepare

    Basic Environment

    Intel Core i7 processor
     
    32GB memory
     
    512GB SSD + 2TB storage
     

    For example:

    Dell OptiPlex 7050

    Intel® Core i7 7700

    32GB (2x16GB) DDR4-2400

    512GB Solid State Drive SATA hard drive

    2TB SATA hard drive (7200RPM)

    VMware For OpenStack Requirement

    3 * Controller

    1 CPU (2 Core)
    4GB RAM
    100 GB Storage
    4 NIC(NAT + NAT + HostOnly + HostOnly)
    Virtualize Intel VT-x/EPT or AMD-V/RVI

    2 * Compute

    1 CPU (2 Core)
    4GB RAM
    100 GB Storage
    2 NIC(NAT + HostOnly)
    Virtualize Intel VT-x/EPT or AMD-V/RVI