Skip to content

Commit

Permalink
cloud-init: simplify vmi-masquerade example
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Jun 9, 2020
1 parent 36b3b21 commit c7e77ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions examples/vmi-masquerade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,5 @@ spec:
echo "fedora" |passwd fedora --stdin
for i in {1..20}; do curl -I %s | grep "200 OK" && break || sleep 0.1; done
yum install -y nginx
systemctl enable nginx
systemctl start nginx
systemctl enable --now nginx
name: cloudinitdisk
2 changes: 1 addition & 1 deletion tools/vms-generator/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ func GetVMIMasquerade() *v1.VirtualMachineInstance {
vm.Spec.Domain.Resources.Requests[k8sv1.ResourceMemory] = resource.MustParse("1024M")
vm.Spec.Networks = []v1.Network{v1.Network{Name: "testmasquerade", NetworkSource: v1.NetworkSource{Pod: &v1.PodNetwork{}}}}
initFedora(&vm.Spec)
userData := "#!/bin/bash\necho \"fedora\" |passwd fedora --stdin\nfor i in {1..20}; do curl -I %s | grep \"200 OK\" && break || sleep 0.1; done\nyum install -y nginx\nsystemctl enable nginx\nsystemctl start nginx"
userData := "#!/bin/bash\necho \"fedora\" |passwd fedora --stdin\nfor i in {1..20}; do curl -I %s | grep \"200 OK\" && break || sleep 0.1; done\nyum install -y nginx\nsystemctl enable --now nginx"
networkData := "version: 2\nethernets:\n eth0:\n addresses: [ fd10:0:2::2/120 ]\n dhcp4: true\n gateway6: fd10:0:2::1\n"
addNoCloudDiskWitUserDataNetworkData(&vm.Spec, userData, networkData)

Expand Down

0 comments on commit c7e77ff

Please sign in to comment.