-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AUFN OpenStack Antelope #15
base: smslab/yoga
Are you sure you want to change the base?
Changes from 3 commits
9b52c31
c5a8048
2d1c11e
82f9d17
b9b34ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
SECONDS=0 | ||
|
||
# Cloud User: cloud-user (CentOS) or ubuntu? | ||
CLOUD_USER=cloud-user | ||
CLOUD_USER=ubuntu | ||
|
||
ENABLE_OVN=true | ||
|
||
|
@@ -16,17 +16,20 @@ echo "[INFO] Given docker registry IP: $registry_ip" | |
# Disable the firewall. | ||
if [[ "${CLOUD_USER}" = "ubuntu" ]] | ||
then | ||
grep -q $HOSTNAME /etc/hosts || (echo "$(ip r | grep -o '^default via.*src [0-9.]*' | awk '{print $NF}') $HOSTNAME" | sudo tee -a /etc/hosts) | ||
dpkg -l ufw && sudo systemctl is-enabled ufw && sudo systemctl stop ufw && sudo systemctl disable ufw | ||
else | ||
rpm -q firewalld && sudo systemctl is-enabled firewalld && sudo systemctl stop firewalld && sudo systemctl disable firewalld | ||
fi | ||
|
||
# Disable SELinux. | ||
sudo setenforce 0 | ||
# Disable SELinux. | ||
sudo setenforce 0 | ||
fi | ||
|
||
# Useful packages | ||
if [[ "${CLOUD_USER}" = "ubuntu" ]] | ||
then | ||
# Avoid the interactive dialog prompting for service restart: set policy to leave services unchanged | ||
echo "\$nrconf{restart} = 'l';" | sudo tee /etc/needrestart/conf.d/90-aufn.conf | ||
sudo apt update | ||
sudo apt install -y git tmux lvm2 iptables | ||
else | ||
|
@@ -60,6 +63,19 @@ then | |
exit -1 | ||
;; | ||
esac | ||
elif [[ "${CLOUD_USER}" = "ubuntu" ]] | ||
then | ||
# Prepare for disabling of Netplan and enabling of systemd-networkd. | ||
# Netplan has an interaction with systemd and cloud-init to populate | ||
# systemd-networkd files, but ephemerally. If /etc/systemd/network is | ||
# empty and netplan config files are present in /run, copy them over. | ||
persistent_netcfg=$(ls /etc/systemd/network) | ||
ephemeral_netcfg=$(ls /run/systemd/network) | ||
if [[ -z "$persistent_netcfg" && ! -z "$ephemeral_netcfg" ]] | ||
then | ||
echo "Creating persistent versions of Netplan ephemeral config" | ||
sudo cp /run/systemd/network/* /etc/systemd/network | ||
fi | ||
fi | ||
|
||
# Exit on error | ||
|
@@ -88,7 +104,7 @@ fi | |
|
||
# Clone Kayobe. | ||
cd $HOME | ||
[[ -d kayobe ]] || git clone https://opendev.org/openstack/kayobe.git -b stable/yoga | ||
[[ -d kayobe ]] || git clone https://opendev.org/openstack/kayobe.git -b stable/2023.1 | ||
cd kayobe | ||
|
||
# Bump the provisioning time - it can be lengthy on virtualised storage | ||
|
@@ -100,10 +116,10 @@ sed -i.bak 's%^[# ]*wait_active_timeout:.*% wait_active_timeout: 5000%' ~/kay | |
# Clone this Kayobe configuration. | ||
mkdir -p config/src | ||
cd config/src/ | ||
[[ -d kayobe-config ]] || git clone https://github.com/stackhpc/a-universe-from-nothing.git -b stable/yoga kayobe-config | ||
[[ -d kayobe-config ]] || git clone https://github.com/stackhpc/a-universe-from-nothing.git -b stable/2023.1 kayobe-config | ||
|
||
# Set default registry name to the one we just created | ||
sed -i.bak 's/^docker_registry.*/docker_registry: '$registry_ip':4000/' kayobe-config/etc/kayobe/docker.yml | ||
sed -i.bak 's/^docker_registry:.*/docker_registry: '$registry_ip':4000/' kayobe-config/etc/kayobe/docker.yml | ||
|
||
# Configure host networking (bridge, routes & firewall) | ||
./kayobe-config/configure-local-networking.sh | ||
|
@@ -145,6 +161,11 @@ if ! ./dev/seed-deploy.sh; then | |
./dev/seed-deploy.sh | ||
fi | ||
|
||
# Run TENKS | ||
cd ~/kayobe | ||
export TENKS_CONFIG_PATH=config/src/kayobe-config/tenks.yml | ||
./dev/tenks-deploy-overcloud.sh ./tenks | ||
|
||
Comment on lines
+164
to
+168
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we always want to do this now, or was this just to speed up this weeks' sessions? I can see the benefit of having these deployed in advance, especially given we later have users use tenks to deploy a new hypervisor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think so, it's a liability... |
||
# Duration | ||
duration=$SECONDS | ||
echo "[INFO] $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we want to change the default to ubuntu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just remove the default user #16