Skip to content

Commit 2d1c11e

Browse files
committed
Fixes for deploying Antelope (2023.1)
Ubuntu by default Add initial TENKS provision to a-seed-from-nothing Migrate to quay.io and new tag naming scheme Fix for loss of DHCP on Ubuntu/Netplan instances Give lab-specific names to security group and ssh key Disable interactive dialog for service restart on Jammy package update
1 parent c5a8048 commit 2d1c11e

File tree

3 files changed

+109
-90
lines changed

3 files changed

+109
-90
lines changed

a-seed-from-nothing.sh

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ then
2020
dpkg -l ufw && sudo systemctl is-enabled ufw && sudo systemctl stop ufw && sudo systemctl disable ufw
2121
else
2222
rpm -q firewalld && sudo systemctl is-enabled firewalld && sudo systemctl stop firewalld && sudo systemctl disable firewalld
23-
fi
2423

25-
# Disable SELinux.
26-
sudo setenforce 0
24+
# Disable SELinux.
25+
sudo setenforce 0
26+
fi
2727

2828
# Useful packages
2929
if [[ "${CLOUD_USER}" = "ubuntu" ]]
3030
then
31+
# Avoid the interactive dialog prompting for service restart: set policy to leave services unchanged
32+
echo "\$nrconf{restart} = 'l';" | sudo tee /etc/needrestart/conf.d/90-aufn.conf
3133
sudo apt update
3234
sudo apt install -y git tmux lvm2 iptables
3335
else
@@ -61,6 +63,19 @@ then
6163
exit -1
6264
;;
6365
esac
66+
elif [[ "${CLOUD_USER}" = "ubuntu" ]]
67+
then
68+
# Prepare for disabling of Netplan and enabling of systemd-networkd.
69+
# Netplan has an interaction with systemd and cloud-init to populate
70+
# systemd-networkd files, but ephemerally. If /etc/systemd/network is
71+
# empty and netplan config files are present in /run, copy them over.
72+
persistent_netcfg=$(ls /etc/systemd/network)
73+
ephemeral_netcfg=$(ls /run/systemd/network)
74+
if [[ -z "$persistent_netcfg" && ! -z "$ephemeral_netcfg" ]]
75+
then
76+
echo "Creating persistent versions of Netplan ephemeral config"
77+
sudo cp /run/systemd/network/* /etc/systemd/network
78+
fi
6479
fi
6580

6681
# Exit on error
@@ -89,8 +104,7 @@ fi
89104

90105
# Clone Kayobe.
91106
cd $HOME
92-
#[[ -d kayobe ]] || git clone https://opendev.org/openstack/kayobe.git -b stable/yoga
93-
[[ -d kayobe ]] || git clone https://github.com/oneswig/kayobe -b oneswig/yoga
107+
[[ -d kayobe ]] || git clone https://opendev.org/openstack/kayobe.git -b stable/2023.1
94108
cd kayobe
95109

96110
# Bump the provisioning time - it can be lengthy on virtualised storage
@@ -102,11 +116,10 @@ sed -i.bak 's%^[# ]*wait_active_timeout:.*% wait_active_timeout: 5000%' ~/kay
102116
# Clone this Kayobe configuration.
103117
mkdir -p config/src
104118
cd config/src/
105-
#[[ -d kayobe-config ]] || git clone https://github.com/stackhpc/a-universe-from-nothing.git -b stable/yoga kayobe-config
106-
[[ -d kayobe-config ]] || git clone https://github.com/stackhpc/a-universe-from-nothing.git -b yoga-XL kayobe-config
119+
[[ -d kayobe-config ]] || git clone https://github.com/stackhpc/a-universe-from-nothing.git -b stable/2023.1 kayobe-config
107120

108121
# Set default registry name to the one we just created
109-
sed -i.bak 's/^docker_registry.*/docker_registry: '$registry_ip':4000/' kayobe-config/etc/kayobe/docker.yml
122+
sed -i.bak 's/^docker_registry:.*/docker_registry: '$registry_ip':4000/' kayobe-config/etc/kayobe/docker.yml
110123

111124
# Configure host networking (bridge, routes & firewall)
112125
./kayobe-config/configure-local-networking.sh
@@ -150,7 +163,6 @@ fi
150163

151164
# Run TENKS
152165
cd ~/kayobe
153-
source dev/environment-setup.sh
154166
export TENKS_CONFIG_PATH=config/src/kayobe-config/tenks.yml
155167
./dev/tenks-deploy-overcloud.sh ./tenks
156168

openstack-device.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "openstack_compute_keypair_v2" "ufn_lab_key" {
2-
name = "ufn_lab_key"
2+
name = "${var.lab_prefix}_lab_key"
33
public_key = tls_private_key.default.public_key_openssh
44
}
55

pull-retag-push-images.sh

Lines changed: 87 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -41,88 +41,95 @@ if [ ! "$(sudo docker ps -q -f name=registry)" ]; then
4141
sudo docker run -d -p 4000:5000 --restart=always --name registry registry
4242
fi
4343

44-
tag=${1:-yoga}
45-
images="kolla/${DISTRO}-source-bifrost-deploy
46-
kolla/${DISTRO}-source-kolla-toolbox
47-
kolla/${DISTRO}-source-haproxy
48-
kolla/${DISTRO}-source-mariadb-server
49-
kolla/${DISTRO}-source-mariadb-clustercheck
50-
kolla/${DISTRO}-source-fluentd
51-
kolla/${DISTRO}-source-cron
52-
kolla/${DISTRO}-source-keepalived
53-
kolla/${DISTRO}-source-neutron-server
54-
kolla/${DISTRO}-source-neutron-l3-agent
55-
kolla/${DISTRO}-source-neutron-metadata-agent
56-
kolla/${DISTRO}-source-neutron-openvswitch-agent
57-
kolla/${DISTRO}-source-neutron-dhcp-agent
58-
kolla/${DISTRO}-source-glance-api
59-
kolla/${DISTRO}-source-nova-compute
60-
kolla/${DISTRO}-source-keystone-fernet
61-
kolla/${DISTRO}-source-keystone-ssh
62-
kolla/${DISTRO}-source-keystone
63-
kolla/${DISTRO}-source-nova-api
64-
kolla/${DISTRO}-source-nova-conductor
65-
kolla/${DISTRO}-source-nova-ssh
66-
kolla/${DISTRO}-source-nova-novncproxy
67-
kolla/${DISTRO}-source-nova-scheduler
68-
kolla/${DISTRO}-source-placement-api
69-
kolla/${DISTRO}-source-openvswitch-vswitchd
70-
kolla/${DISTRO}-source-openvswitch-db-server
71-
kolla/${DISTRO}-source-nova-libvirt
72-
kolla/${DISTRO}-source-memcached
73-
kolla/${DISTRO}-source-rabbitmq
74-
kolla/${DISTRO}-source-heat-api
75-
kolla/${DISTRO}-source-heat-api-cfn
76-
kolla/${DISTRO}-source-heat-engine
77-
kolla/${DISTRO}-source-horizon
78-
kolla/${DISTRO}-source-kibana
79-
kolla/${DISTRO}-source-elasticsearch
80-
kolla/${DISTRO}-source-elasticsearch-curator
81-
kolla/${DISTRO}-source-barbican-base
82-
kolla/${DISTRO}-source-barbican-api
83-
kolla/${DISTRO}-source-barbican-worker
84-
kolla/${DISTRO}-source-barbican-keystone-listener
85-
kolla/${DISTRO}-source-magnum-base
86-
kolla/${DISTRO}-source-magnum-api
87-
kolla/${DISTRO}-source-magnum-conductor
88-
kolla/${DISTRO}-source-prometheus-alertmanager
89-
kolla/${DISTRO}-source-prometheus-v2-server
90-
kolla/${DISTRO}-source-prometheus-cadvisor
91-
kolla/${DISTRO}-source-prometheus-haproxy-exporter
92-
kolla/${DISTRO}-source-prometheus-mtail
93-
kolla/${DISTRO}-source-prometheus-memcached-exporter
94-
kolla/${DISTRO}-source-prometheus-blackbox-exporter
95-
kolla/${DISTRO}-source-prometheus-node-exporter
96-
kolla/${DISTRO}-source-prometheus-elasticsearch-exporter
97-
kolla/${DISTRO}-source-prometheus-mysqld-exporter
98-
kolla/${DISTRO}-source-prometheus-openstack-exporter
99-
kolla/${DISTRO}-source-prometheus-libvirt-exporter
100-
kolla/${DISTRO}-source-grafana
101-
kolla/${DISTRO}-source-cinder-scheduler
102-
kolla/${DISTRO}-source-cinder-volume
103-
kolla/${DISTRO}-source-cinder-backup
104-
kolla/${DISTRO}-source-cinder-api
105-
kolla/${DISTRO}-source-ovn-controller
106-
kolla/${DISTRO}-source-ovn-northd
107-
kolla/${DISTRO}-source-ovn-nb-db-server
108-
kolla/${DISTRO}-source-ovn-sb-db-server
109-
kolla/${DISTRO}-source-dnsmasq
110-
kolla/${DISTRO}-source-ironic-api
111-
kolla/${DISTRO}-source-ironic-conductor
112-
kolla/${DISTRO}-source-ironic-inspector
113-
kolla/${DISTRO}-source-ironic-neutron-agent
114-
kolla/${DISTRO}-source-ironic-pxe
115-
kolla/${DISTRO}-source-nova-compute-ironic
116-
kolla/${DISTRO}-source-manila-api
117-
kolla/${DISTRO}-source-manila-share
118-
kolla/${DISTRO}-source-manila-data
119-
kolla/${DISTRO}-source-manila-scheduler"
44+
registry=quay.io
45+
acct=openstack.kolla
46+
if [[ "${DISTRO}" = "ubuntu" ]]
47+
then
48+
tag=${1:-2023.1-ubuntu-jammy}
49+
else
50+
tag=${1:-2023.1-rocky-9}
51+
fi
52+
images="bifrost-deploy
53+
kolla-toolbox
54+
haproxy
55+
mariadb-server
56+
mariadb-clustercheck
57+
fluentd
58+
cron
59+
keepalived
60+
neutron-server
61+
neutron-l3-agent
62+
neutron-metadata-agent
63+
neutron-openvswitch-agent
64+
neutron-dhcp-agent
65+
glance-api
66+
nova-compute
67+
keystone-fernet
68+
keystone-ssh
69+
keystone
70+
nova-api
71+
nova-conductor
72+
nova-ssh
73+
nova-novncproxy
74+
nova-scheduler
75+
placement-api
76+
openvswitch-vswitchd
77+
openvswitch-db-server
78+
nova-libvirt
79+
memcached
80+
rabbitmq
81+
heat-api
82+
heat-api-cfn
83+
heat-engine
84+
horizon
85+
opensearch
86+
opensearch-dashboards
87+
barbican-base
88+
barbican-api
89+
barbican-worker
90+
barbican-keystone-listener
91+
magnum-base
92+
magnum-api
93+
magnum-conductor
94+
prometheus-alertmanager
95+
prometheus-v2-server
96+
prometheus-cadvisor
97+
prometheus-haproxy-exporter
98+
prometheus-mtail
99+
prometheus-memcached-exporter
100+
prometheus-blackbox-exporter
101+
prometheus-node-exporter
102+
prometheus-elasticsearch-exporter
103+
prometheus-mysqld-exporter
104+
prometheus-openstack-exporter
105+
prometheus-libvirt-exporter
106+
grafana
107+
cinder-scheduler
108+
cinder-volume
109+
cinder-backup
110+
cinder-api
111+
ovn-controller
112+
ovn-northd
113+
ovn-nb-db-server
114+
ovn-sb-db-server
115+
dnsmasq
116+
ironic-api
117+
ironic-conductor
118+
ironic-inspector
119+
ironic-neutron-agent
120+
ironic-pxe
121+
nova-compute-ironic
122+
manila-api
123+
manila-share
124+
manila-data
125+
manila-scheduler"
120126

121127
for image in $images; do
122-
sudo docker pull $image:$tag
123-
sudo docker tag docker.io/$image:$tag localhost:4000/openstack.$image:$tag
124-
sudo docker push localhost:4000/openstack.$image:$tag
125-
sudo docker image remove docker.io/$image:$tag
128+
echo "Processing $acct/$image:$tag..."
129+
sudo docker pull $registry/$acct/$image:$tag
130+
sudo docker tag $registry/$acct/$image:$tag localhost:4000/$acct/$image:$tag
131+
sudo docker push localhost:4000/$acct/$image:$tag
132+
sudo docker image remove $registry/$acct/$image:$tag
126133
done
127134

128135
# Duration

0 commit comments

Comments
 (0)