Skip to content
Snippets Groups Projects

Compute nodes post provisioning

1 file
+ 8
0
Compare changes
  • Side-by-side
  • Inline
+ 8
0
@@ -19,6 +19,14 @@ resource "openstack_compute_instance_v2" "compute" {
key_pair = var.key_pair
security_groups = ["default"]
count = var.compute_node_count
user_data = <<-EOF
#cloud-config
runcmd:
- [ bash, -xc, 'ethernet=$(cat /sys/class/net/eth0/address); nodename=$(hostname -s); sed -e "s/MY_HWADDR/$ethernet/" -e "s/MY_NODENAME/$nodename/" -i /warewulf/config;' ]
- [ bash, -xc, "echo $(date) ': hello world!'; until WWGETFILES_INTERVAL=0 bash -x /warewulf/bin/wwgetfiles; do echo waiting ; rm -f /tmp/.wwgetfile.lock ; sleep 10; done;" ]
- [ bash, -xc, "systemctl restart munge" ]
- [ bash, -xc, "systemctl restart slurmd" ]
EOF
# defines the networks of the instance
network {
Loading