diff --git a/testutil/ciao-down/cloudinit.go b/testutil/ciao-down/cloudinit.go index ac78cfe94..bc2937684 100644 --- a/testutil/ciao-down/cloudinit.go +++ b/testutil/ciao-down/cloudinit.go @@ -34,9 +34,6 @@ mounts: {{if len .UIPath }} - [hostui, {{.UIPath}}, 9p, "x-systemd.automount,x-systemd.device-timeout=10,nofail,trans=virtio,version=9p2000.L", "0", "0"]{{end}} write_files: {{- if len $.HTTPProxy }} - - content: | - Acquire::http::Proxy "{{$.HTTPProxy}}"; - path: /etc/apt/apt.conf - content: | [Service] Environment="HTTP_PROXY={{$.HTTPProxy}}"{{if len .HTTPSProxy}} "HTTPS_PROXY={{.HTTPSProxy}}{{end}}"{{if len .NoProxy}} "NO_PROXY={{.NoProxy}},singlevm{{end}}" @@ -62,6 +59,15 @@ write_files: deb https://apt.dockerproject.org/repo ubuntu-xenial main path: /etc/apt/sources.list.d/docker.list +apt: +{{- if len $.HTTPProxy }} + proxy: "{{$.HTTPProxy}}" +{{- end}} +{{- if len $.HTTPSProxy }} + https_proxy: "{{$.HTTPSProxy}}" +{{- end}} +package_upgrade: true + runcmd: - echo "127.0.0.1 singlevm" >> /etc/hosts - mount hostgo @@ -109,10 +115,6 @@ runcmd: - {{template "ENV" .}}apt-get update - {{template "CHECK" .}} - - curl -X PUT -d "Upgrading" 10.0.2.2:{{.HTTPServerPort}} - - {{template "ENV" .}}apt-get upgrade -y - - {{template "CHECK" .}} - - curl -X PUT -d "Installing Docker" 10.0.2.2:{{.HTTPServerPort}} - {{template "ENV" .}}apt-get install docker-engine -y - {{template "CHECK" .}} @@ -256,9 +258,6 @@ mounts: - [hostgo, {{.GoPath}}, 9p, "x-systemd.automount,x-systemd.device-timeout=10,nofail,trans=virtio,version=9p2000.L", "0", "0"] write_files: {{- if len $.HTTPProxy }} - - content: | - Acquire::http::Proxy "{{$.HTTPProxy}}"; - path: /etc/apt/apt.conf - content: | [Service] Environment="HTTP_PROXY={{$.HTTPProxy}}"{{if len .HTTPSProxy}} "HTTPS_PROXY={{.HTTPSProxy}}{{end}}"{{if len .NoProxy}} "NO_PROXY={{.NoProxy}},singlevm{{end}}" @@ -283,6 +282,15 @@ write_files: deb https://apt.dockerproject.org/repo ubuntu-xenial main path: /etc/apt/sources.list.d/docker.list +apt: +{{- if len $.HTTPProxy }} + proxy: "{{$.HTTPProxy}}" +{{- end}} +{{- if len $.HTTPSProxy }} + https_proxy: "{{$.HTTPSProxy}}" +{{- end}} +package_upgrade: true + runcmd: - echo "127.0.0.1 singlevm" >> /etc/hosts - mount hostgo @@ -330,15 +338,10 @@ runcmd: - {{template "ENV" .}}curl -fsSL http://download.opensuse.org/repositories/home:clearlinux:preview:clear-containers-2.1/xUbuntu_16.04/Release.key | sudo apt-key add - - {{template "CHECK" .}} - - curl -X PUT -d "Retrieving updated list of packages" 10.0.2.2:{{.HTTPServerPort}} - {{template "ENV" .}}apt-get update - {{template "CHECK" .}} - - curl -X PUT -d "Upgrading" 10.0.2.2:{{.HTTPServerPort}} - - {{template "ENV" .}}apt-get upgrade -y - - {{template "CHECK" .}} - - curl -X PUT -d "Installing Clear Containers Runtime" 10.0.2.2:{{.HTTPServerPort}} - {{template "ENV" .}}apt-get install cc-oci-runtime -y - {{template "CHECK" .}}