Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Commit 3403d97

Browse files
author
Mark Ryan
authored
Merge pull request #108 from ganeshmaharaj/f29
Add fedora 29 as a workload
2 parents edaca4e + 32ccb0c commit 3403d97

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

workloads/fedora29.yaml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
base_image_url: http://download.fedoraproject.org/pub/fedora/linux/releases/29/Cloud/x86_64/images/Fedora-Cloud-Base-29-1.2.x86_64.qcow2
3+
base_image_name: Fedora 29
4+
vm:
5+
disk_gib: 16
6+
...
7+
---
8+
#cloud-config
9+
write_files:
10+
{{- if len $.HTTPProxy }}
11+
- content: |
12+
[Service]
13+
Environment="HTTP_PROXY={{$.HTTPProxy}}"{{if len .HTTPSProxy}} "HTTPS_PROXY={{.HTTPSProxy}}{{end}}"{{if len .NoProxy}} "NO_PROXY={{.NoProxy}},{{.Hostname}}{{end}}"
14+
path: /etc/systemd/system/docker.service.d/http-proxy.conf
15+
{{- end}}
16+
{{with proxyEnv . 5}}
17+
- content: |
18+
{{.}}
19+
path: /etc/environment
20+
{{end -}}
21+
22+
dnf:
23+
{{- if len $.HTTPProxy }}
24+
proxy: "{{$.HTTPProxy}}"
25+
{{- end}}
26+
{{- if len $.HTTPSProxy }}
27+
https_proxy: "{{$.HTTPSProxy}}"
28+
{{- end}}
29+
30+
package_upgrade: {{with .PackageUpgrade}}{{.}}{{else}}false{{end}}
31+
32+
runcmd:
33+
- {{beginTask . "Booting VM"}}
34+
- {{endTaskOk . }}
35+
36+
- hostnamectl set-hostname {{.Hostname}}
37+
38+
- {{beginTask . (printf "Adding %s to /etc/hosts" .Hostname) }}
39+
- echo "127.0.0.1 {{.Hostname}}" >> /etc/hosts
40+
- {{endTaskCheck .}}
41+
42+
{{range .Mounts}}
43+
- mkdir -p {{.Path}}
44+
- sudo chown {{$.User}}:{{$.User}} {{.Tag}}
45+
- echo "{{.Tag}} {{.Path}} 9p x-systemd.automount,x-systemd.device-timeout=10,nofail,trans=virtio,version=9p2000.L 0 0" >> /etc/fstab
46+
{{end}}
47+
{{range .Mounts}}
48+
- {{beginTask $ (printf "Mounting %s" .Path) }}
49+
- mount {{.Path}}
50+
- {{endTaskCheck $}}
51+
{{end}}
52+
53+
users:
54+
- name: {{.User}}
55+
uid: "{{.UID}}"
56+
gid: "{{.GID}}"
57+
gecos: CC Demo User
58+
lock-passwd: true
59+
shell: /bin/bash
60+
sudo: ALL=(ALL) NOPASSWD:ALL
61+
ssh-authorized-keys:
62+
- {{.PublicKey}}
63+
...

0 commit comments

Comments
 (0)