OpenStack Train for CentOS7 RDO (All-In-One) installation record

If you look up the procedure, you will find a lot of information, but since "information that can only be found there" and "information that can only be found here" are dispersed, I will summarize the information for myself.

environment


# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core) 

--A newborn figure with a minimum installation. I just prepared for SSH connection (given IP address). --In your work, yum -y update will change to:

# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

Advance preparation

--Reference article -Install OpenStack Rocky on CentOS 7.6 - OpenStack packages for RHEL and CentOS

External network connection

Please forgive me for running everything under the root account

# nmcli con mod enp8s0f1 ipv4.dns "8.8.8.8" ipv4.gateway "192.168.200.98"

-- enp8s0f1 is an IF device that connects to an RT that connects to the outside -- 192.168.200.98 is the gateway address to the outside of our environment -- 8.8.8.8 is Google Public DNS

# systemctl restart network
# ping -c 3 google.com
PING google.com (172.217.175.238) 56(84) bytes of data.
64 bytes from nrt12s29-in-f14.1e100.net (172.217.175.238): icmp_seq=1 ttl=112 time=70.4 ms
64 bytes from nrt12s29-in-f14.1e100.net (172.217.175.238): icmp_seq=2 ttl=112 time=68.9 ms
64 bytes from nrt12s29-in-f14.1e100.net (172.217.175.238): icmp_seq=3 ttl=112 time=67.9 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 67.956/69.121/70.450/1.068 ms

--Confirmed to connect to the outside

Stopping unnecessary services (services that interfere with building OpenStack)

# systemctl stop NetworkManager
# systemctl disable NetworkManager
# systemctl stop firewalld
# systemctl disable firewalld

# sed -e 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config -i
# grep ^SELINUX /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted
# setenforce 0

update

# yum -y update

For some reason, symlink of NetworkManager is create on the way, so do the following just in case

# systemctl disable NetworkManager
Removed symlink /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service.

Reboot once

I'm doing setenforce 0 for SELinux, so I think it's okay, I've updated everything, so I'll do it for the time being.

Reconfirm the environment

# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

I am a vim sect

# yum -y install vim

Time synchronization

# vim /etc/chrony.conf
----------------------------------------------------------------------
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
----------------------------------------------------------------------
↓
----------------------------------------------------------------------
server xxx.xxx.xxx.xxx
----------------------------------------------------------------------
* Change to the NTP server of the environment

# chronyc makestep
200 OK

create if-bridge

# yum -y install bridge-utils
# cd /etc/sysconfig/network-scripts
# cp -p ifcfg-enp8s0f1 ifcfg-br-ex
# vim ifcfg-enp8s0f1 ifcfg-br-ex

ifcfg-enp8s0f1(Change before)


TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp8s0f1
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DEVICE=enp8s0f1
ONBOOT=yes
IPADDR=192.168.57.101
PREFIX=16
GATEWAY=192.168.200.98
DNS1=8.8.8.8
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no

↓ Delete DEFROUTE, IPADDR, PREFIX, GATEWAY, DNS1 and add BRIDGE.

ifcfg-enp8s0f1(After change)


TYPE=Ethernet
BOOTPROTO=none
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp8s0f1
UUID=af879466-eabf-4104-b0b3-6ea0026fe52b
DEVICE=enp8s0f1
ONBOOT=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no
BRIDGE=br-ex

Edit newly created files

:ifcfg-br-ex(Create New:ifcfg-Make a copy of enp8s0f1)


TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
NAME=br-ex
DEVICE=br-ex
ONBOOT=yes
IPADDR=192.168.57.101
PREFIX=16
GATEWAY=192.168.200.98
DNS1=8.8.8.8
# echo "192.168.57.101  `hostname`" >> /etc/hosts
# ip l add br-ex type bridge
# ip link show br-ex
12: br-ex: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether b2:9b:2c:a5:4d:be brd ff:ff:ff:ff:ff:ff
# ip link set up br-ex

Switch to console connection and do the following

# systemctl restart network
# ip link set up br-ex
# ip addr add 192.168.57.101/16 dev br-ex

OpenStack installation

--Reference article - OpenStack packages for RHEL and CentOS -OpenStack Train: Installation of linked services -Install OpenStack automatic construction tool, Packstack

Added Openstack Train repository

# yum -y install centos-release-openstack-train epel
# yum -y install openstack-packstack --disablerepo=epel

If you do not do --disablerepo = epel, packages such as leatherman will be updated, and in the following steps, failures due to different package versions will occur.

answer file creation

# packstack --gen-answer-file=/root/answer.txt --default-password=******** --os-neutron-l2-agent=openvswitch
* Password is optional

--This time, it is a special requirement that does not use Cinder, Swift, so disable it.

answer.txt


  # Specify 'y' to install OpenStack Block Storage (cinder). ['y', 'n']
- CONFIG_CINDER_INSTALL=y
+ CONFIG_CINDER_INSTALL=n

  # Specify 'y' to install OpenStack Object Storage (swift). ['y', 'n']
- CONFIG_SWIFT_INSTALL=y
+ CONFIG_SWIFT_INSTALL=n

Also specify NTP server

answer.txt


  # Comma-separated list of NTP servers. Leave plain if Packstack
  # should not install ntpd on instances.
- CONFIG_NTP_SERVERS=
+ CONFIG_NTP_SERVERS=192.168.110.210

Update DB connection timeout

/usr/share/openstack-puppet/modules/nova/manifests/db/online_data_migrations.pp
/usr/share/openstack-puppet/modules/nova/manifests/db/sync.pp
/usr/share/openstack-puppet/modules/nova/manifests/db/sync_api.pp
/usr/share/openstack-puppet/modules/neutron/manifests/db/sync.pp

Change $ db_sync_timeout = 300 in the above file to $ db_sync_timeout = 0.

I don't know what it is, but the timeout value is updated

PuppetError: Error appeared during Puppet run: 192.168.57.101_controller.pp
Error: /Stage[main]/Keystone::Roles::Admin/Keystone_user_role[admin@admin]: Could not evaluate: Command: 'openstack ["role", "list", "--quiet", "--format", "csv", ["--project", "340c6675f1ee44558d1cd4a27fc68ef9", "--user", "982d7c8b6e66446b9af61dc0da17d1e1"]]' has been running for more than 40 seconds (tried 4, for a total of 170 seconds)^[[0m
You will find full trace in log /var/tmp/packstack/20201209-181903-Been0k/manifests/192.168.57.101_controller.pp.log

Measures when such an error occurs

/usr/share/openstack-puppet/modules/openstacklib/lib/puppet/provider/openstack.rb


  @@no_retry_actions = %w(create remove delete)
  @@command_timeout  = 40
  # Fails on the 5th retry for a max of 212s (~3.5min) before total
  # failure.
  @@request_timeout  = 10800
  @@retry_sleep      = 3

/usr/share/openstack-puppet/modules/openstacklib/lib/puppet/provider/openstack.rb


  @@no_retry_actions = %w(create remove delete)
  @@command_timeout  = 3600
  # Fails on the 5th retry for a max of 212s (~3.5min) before total
  # failure.
  @@request_timeout  = 10800
  @@retry_sleep      = 3

It's Show Time !!

# packstack --answer-file /root/answer.txt --timeout=0 --debug

Recovery procedure when it fails

--Reference site - Installation of Openstack Pike on Centos 7.4 fails - Following official guide

====> remove installed files
# yum remove openstack-packstack
# yum remove centos-release-openstack-train
# yum remove mariadb
# rm -rf /var/lib/mysql
# rm /root/.my.cnf

====> install packages
# yum -y install centos-release-openstack-train epel-release 
# yum -y install openstack-packstack python-pip --disablerepo=epel

Recommended Posts

OpenStack Train for CentOS7 RDO (All-In-One) installation record
First CentOS 8 installation