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

Leave a Reply

Your email address will not be published. Required fields are marked *