Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions a-seed-from-nothing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,36 @@ then
sudo apt update
sudo apt install -y git tmux lvm2 iptables
else
sudo dnf install -y git tmux lvm2
sudo dnf install -y git tmux lvm2 patch
fi

# Work around connectivity issues seen while configuring this node as seed
# hypervisor with Kayobe
if [[ "${CLOUD_USER}" = "cloud-user" ]]
then
sudo dnf install -y network-scripts
sudo rm -f /etc/sysconfig/network-scripts/ifcfg-ens3*
fi
cat <<EOF | sudo tee /etc/sysctl.d/70-ipv6.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
EOF
sudo sysctl --load /etc/sysctl.d/70-ipv6.conf

# CentOS Stream 8 requires network-scripts. Rocky Linux 9 and onwards use NetworkManager.
if [[ "${CLOUD_USER}" = "cloud-user" ]]
then
sudo systemctl is-active NetworkManager && (sudo systemctl disable NetworkManager; sudo systemctl stop NetworkManager)
sudo systemctl is-active network || (sudo systemctl enable network; sudo pkill dhclient; sudo systemctl start network)
case $(grep -o "[89]\.[0-9]" /etc/redhat-release) in
"8.*")
sudo dnf install -y network-scripts
sudo rm -f /etc/sysconfig/network-scripts/ifcfg-ens3*
sudo systemctl is-active NetworkManager && (sudo systemctl disable NetworkManager; sudo systemctl stop NetworkManager)
sudo systemctl is-active network || (sudo systemctl enable network; sudo pkill dhclient; sudo systemctl start network)
;;
"9.*")
# No network-scripts for RL9
sudo systemctl is-active NetworkManager || (sudo systemctl enable NetworkManager; sudo systemctl start NetworkManager)
;;
"*")
echo "Could not recognise OS release $(< /etc/redhat-release)"
exit -1
;;
esac
fi

# Exit on error
Expand Down
4 changes: 2 additions & 2 deletions openstack-device.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ resource "openstack_compute_instance_v2" "registry" {

resource "openstack_compute_floatingip_v2" "registry" {
count = var.allocate_floating_ips ? 1 : 0
pool = "external"
pool = var.floating_ip_external_net
}

resource "openstack_compute_floatingip_associate_v2" "registry" {
Expand Down Expand Up @@ -143,7 +143,7 @@ resource "openstack_compute_instance_v2" "lab" {

resource "openstack_compute_floatingip_v2" "lab" {
count = var.allocate_floating_ips ? var.lab_count : 0
pool = "external"
pool = var.floating_ip_external_net
}

resource "openstack_compute_floatingip_associate_v2" "lab" {
Expand Down
7 changes: 6 additions & 1 deletion vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ variable "allocate_floating_ips" {
default = "false"
}

variable "floating_ip_external_net" {
description = "Network name to use for floating IP allocation"
default = "external"
}

# Remember to set a floating IP if you're using a bastion
variable "create_bastion" {
description = "Whether or not to create a bastion instance"
Expand All @@ -73,4 +78,4 @@ variable "create_bastion" {
variable "bastion_floating_ip" {
description = "Bastion floating IP"
default = "0.0.0.0"
}
}