comfy 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +46 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +13 -0
  7. data/README.md +131 -0
  8. data/Rakefile +18 -0
  9. data/bin/comfy +4 -0
  10. data/comfy.gemspec +36 -0
  11. data/config/comfy.yml +20 -0
  12. data/lib/comfy/command_executioner.rb +225 -0
  13. data/lib/comfy/creator.rb +200 -0
  14. data/lib/comfy/errors/invalid_distribution_version_error.rb +1 -0
  15. data/lib/comfy/errors/no_such_distribution_version_error.rb +1 -0
  16. data/lib/comfy/errors/packer_error.rb +1 -0
  17. data/lib/comfy/errors/packer_execution_error.rb +1 -0
  18. data/lib/comfy/errors/packer_validation_error.rb +1 -0
  19. data/lib/comfy/errors.rb +4 -0
  20. data/lib/comfy/extensions/yell.rb +8 -0
  21. data/lib/comfy/settings.rb +15 -0
  22. data/lib/comfy/templater.rb +62 -0
  23. data/lib/comfy/version.rb +3 -0
  24. data/lib/comfy.rb +18 -0
  25. data/lib/templates/centos/centos.cfg.erb +47 -0
  26. data/lib/templates/centos/centos.description +20 -0
  27. data/lib/templates/centos/files/10-ipv6.conf +5 -0
  28. data/lib/templates/centos/files/check-mk-agent-meta-checks-2.0-1.noarch.rpm +0 -0
  29. data/lib/templates/centos/files/check-mk-agent-meta-key-1.0-1.noarch.rpm +0 -0
  30. data/lib/templates/centos/files/cloud.cfg +101 -0
  31. data/lib/templates/centos/files/fail2ban.local +3 -0
  32. data/lib/templates/centos/files/getty@ttyS0.service +47 -0
  33. data/lib/templates/centos/files/grub +11 -0
  34. data/lib/templates/centos/files/iptables-multiport.local +6 -0
  35. data/lib/templates/centos/files/jail.local +17 -0
  36. data/lib/templates/centos/files/krb5.conf +181 -0
  37. data/lib/templates/centos/files/ntp.conf +61 -0
  38. data/lib/templates/centos/files/pakiti-2.1.5-1.noarch.rpm +0 -0
  39. data/lib/templates/centos/files/sshd_config +152 -0
  40. data/lib/templates/centos/files/xen-domU.conf +1 -0
  41. data/lib/templates/centos/scripts/init.sh +83 -0
  42. data/lib/templates/debian/debian.cfg.erb +80 -0
  43. data/lib/templates/debian/debian.description +28 -0
  44. data/lib/templates/debian/files/.bashrc +112 -0
  45. data/lib/templates/debian/files/.gitconfig +7 -0
  46. data/lib/templates/debian/files/10-ipv6.conf +5 -0
  47. data/lib/templates/debian/files/DEPOT-GPG-KEY.cfg +32 -0
  48. data/lib/templates/debian/files/RPM-GPG-KEY-CERIT-SC.cfg +30 -0
  49. data/lib/templates/debian/files/backports.list +2 -0
  50. data/lib/templates/debian/files/cerit-cloudinit.list +2 -0
  51. data/lib/templates/debian/files/cloud.cfg +102 -0
  52. data/lib/templates/debian/files/depot.list +4 -0
  53. data/lib/templates/debian/files/depot_all.pref +6 -0
  54. data/lib/templates/debian/files/depot_check_mk.pref +5 -0
  55. data/lib/templates/debian/files/fail2ban.local +3 -0
  56. data/lib/templates/debian/files/getty@ttyS0.service +47 -0
  57. data/lib/templates/debian/files/grub +34 -0
  58. data/lib/templates/debian/files/inittab +69 -0
  59. data/lib/templates/debian/files/interfaces +15 -0
  60. data/lib/templates/debian/files/iptables-multiport.local +6 -0
  61. data/lib/templates/debian/files/jail.local +17 -0
  62. data/lib/templates/debian/files/krb5.conf +181 -0
  63. data/lib/templates/debian/files/meta-misc.list +2 -0
  64. data/lib/templates/debian/files/modules +15 -0
  65. data/lib/templates/debian/files/ntp.conf +61 -0
  66. data/lib/templates/debian/files/pakiti_2.1.5-2_all.deb +0 -0
  67. data/lib/templates/debian/files/sshd_config +131 -0
  68. data/lib/templates/debian/scripts/debian_cloud_script.sh +80 -0
  69. data/lib/templates/docker/docker.cfg.erb +87 -0
  70. data/lib/templates/docker/docker.description +21 -0
  71. data/lib/templates/docker/files/10-ipv6.conf +5 -0
  72. data/lib/templates/docker/files/DEPOT-GPG-KEY.cfg +32 -0
  73. data/lib/templates/docker/files/RPM-GPG-KEY-CERIT-SC.cfg +30 -0
  74. data/lib/templates/docker/files/cloud.cfg +109 -0
  75. data/lib/templates/docker/files/depot.list +4 -0
  76. data/lib/templates/docker/files/depot_all.pref +6 -0
  77. data/lib/templates/docker/files/depot_check_mk.pref +5 -0
  78. data/lib/templates/docker/files/docker.list +1 -0
  79. data/lib/templates/docker/files/fail2ban.local +3 -0
  80. data/lib/templates/docker/files/grub +34 -0
  81. data/lib/templates/docker/files/interfaces +15 -0
  82. data/lib/templates/docker/files/iptables-multiport.local +6 -0
  83. data/lib/templates/docker/files/jail.local +17 -0
  84. data/lib/templates/docker/files/krb5.conf +181 -0
  85. data/lib/templates/docker/files/meta-misc.list +2 -0
  86. data/lib/templates/docker/files/modules +15 -0
  87. data/lib/templates/docker/files/ntp.conf +61 -0
  88. data/lib/templates/docker/files/pakiti_2.1.5-2_all.deb +0 -0
  89. data/lib/templates/docker/files/sshd_config +131 -0
  90. data/lib/templates/docker/files/ttyS0.conf +11 -0
  91. data/lib/templates/docker/scripts/init.sh +65 -0
  92. data/lib/templates/packer.erb +93 -0
  93. data/lib/templates/scientificlinux/files/10-ipv6.conf +5 -0
  94. data/lib/templates/scientificlinux/files/check-mk-agent-meta-checks-2.0-1.noarch.rpm +0 -0
  95. data/lib/templates/scientificlinux/files/check-mk-agent-meta-key-1.0-1.noarch.rpm +0 -0
  96. data/lib/templates/scientificlinux/files/cloud.cfg +101 -0
  97. data/lib/templates/scientificlinux/files/fail2ban.local +3 -0
  98. data/lib/templates/scientificlinux/files/getty@ttyS0.service +47 -0
  99. data/lib/templates/scientificlinux/files/grub +10 -0
  100. data/lib/templates/scientificlinux/files/iptables-multiport.local +6 -0
  101. data/lib/templates/scientificlinux/files/jail.local +17 -0
  102. data/lib/templates/scientificlinux/files/krb5.conf +181 -0
  103. data/lib/templates/scientificlinux/files/ntp.conf +61 -0
  104. data/lib/templates/scientificlinux/files/pakiti-2.1.5-1.noarch.rpm +0 -0
  105. data/lib/templates/scientificlinux/files/sshd_config +150 -0
  106. data/lib/templates/scientificlinux/files/xen-domU.conf +1 -0
  107. data/lib/templates/scientificlinux/scientificlinux.cfg.erb +57 -0
  108. data/lib/templates/scientificlinux/scientificlinux.description +19 -0
  109. data/lib/templates/scientificlinux/scripts/init.sh +92 -0
  110. data/lib/templates/ubuntu/files/10-ipv6.conf +5 -0
  111. data/lib/templates/ubuntu/files/DEPOT-GPG-KEY.cfg +32 -0
  112. data/lib/templates/ubuntu/files/RPM-GPG-KEY-CERIT-SC.cfg +30 -0
  113. data/lib/templates/ubuntu/files/cloud.cfg +109 -0
  114. data/lib/templates/ubuntu/files/depot.list +4 -0
  115. data/lib/templates/ubuntu/files/depot_all.pref +6 -0
  116. data/lib/templates/ubuntu/files/depot_check_mk.pref +5 -0
  117. data/lib/templates/ubuntu/files/fail2ban.local +3 -0
  118. data/lib/templates/ubuntu/files/grub +34 -0
  119. data/lib/templates/ubuntu/files/interfaces +15 -0
  120. data/lib/templates/ubuntu/files/iptables-multiport.local +6 -0
  121. data/lib/templates/ubuntu/files/jail.local +17 -0
  122. data/lib/templates/ubuntu/files/krb5.conf +181 -0
  123. data/lib/templates/ubuntu/files/meta-misc.list +2 -0
  124. data/lib/templates/ubuntu/files/modules +15 -0
  125. data/lib/templates/ubuntu/files/ntp.conf +61 -0
  126. data/lib/templates/ubuntu/files/pakiti_2.1.5-2_all.deb +0 -0
  127. data/lib/templates/ubuntu/files/sshd_config +131 -0
  128. data/lib/templates/ubuntu/files/ttyS0.conf +11 -0
  129. data/lib/templates/ubuntu/scripts/init.sh +54 -0
  130. data/lib/templates/ubuntu/ubuntu.cfg.erb +87 -0
  131. data/lib/templates/ubuntu/ubuntu.description +21 -0
  132. data/schema/distribution_descriptor.schema +241 -0
  133. metadata +374 -0
@@ -0,0 +1,61 @@
1
+ # /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
2
+
3
+ driftfile /var/lib/ntp/ntp.drift
4
+
5
+
6
+ # Enable this if you want statistics to be logged.
7
+ statsdir /var/log/ntpstats/
8
+
9
+ statistics loopstats peerstats clockstats
10
+ filegen loopstats file loopstats type day enable
11
+ filegen peerstats file peerstats type day enable
12
+ filegen clockstats file clockstats type day enable
13
+
14
+
15
+ # You do need to talk to an NTP server or two (or three).
16
+ server tik.cesnet.cz
17
+ server tak.cesnet.cz
18
+ server ntp.muni.cz
19
+ server time.fi.muni.cz
20
+
21
+ # pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
22
+ # pick a different set every time it starts up. Please consider joining the
23
+ # pool: <http://www.pool.ntp.org/join.html>
24
+ #server 0.debian.pool.ntp.org iburst
25
+ #server 1.debian.pool.ntp.org iburst
26
+ #server 2.debian.pool.ntp.org iburst
27
+ #server 3.debian.pool.ntp.org iburst
28
+
29
+
30
+ # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
31
+ # details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
32
+ # might also be helpful.
33
+ #
34
+ # Note that "restrict" applies to both servers and clients, so a configuration
35
+ # that might be intended to block requests from certain clients could also end
36
+ # up blocking replies from your own upstream servers.
37
+
38
+ # By default, exchange time with everybody, but don't allow configuration.
39
+ restrict -4 default kod notrap nomodify nopeer noquery
40
+ restrict -6 default kod notrap nomodify nopeer noquery
41
+
42
+ # Local users may interrogate the ntp server more closely.
43
+ restrict 127.0.0.1
44
+ restrict ::1
45
+
46
+ # Clients from this (example!) subnet have unlimited access, but only if
47
+ # cryptographically authenticated.
48
+ #restrict 192.168.123.0 mask 255.255.255.0 notrust
49
+
50
+
51
+ # If you want to provide time to your local subnet, change the next line.
52
+ # (Again, the address is an example only.)
53
+ #broadcast 192.168.123.255
54
+
55
+ # If you want to listen to time broadcasts on your local subnet, de-comment the
56
+ # next lines. Please do this only if you trust everybody on the network!
57
+ #disable auth
58
+ #broadcastclient
59
+
60
+ # Try to avoid NTP amplification attacks
61
+ disable monitor
@@ -0,0 +1,131 @@
1
+ # This is the sshd server system-wide configuration file. See
2
+ # sshd_config(5) for more information.
3
+
4
+ # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
5
+
6
+ # The strategy used for options in the default sshd_config shipped with
7
+ # OpenSSH is to specify options with their default value where
8
+ # possible, but leave them commented. Uncommented options override the
9
+ # default value.
10
+
11
+ #Port 22
12
+ AddressFamily inet
13
+ #ListenAddress 0.0.0.0
14
+ #ListenAddress ::
15
+
16
+ # The default requires explicit activation of protocol 1
17
+ #Protocol 2
18
+
19
+ # HostKey for protocol version 1
20
+ #HostKey /etc/ssh/ssh_host_key
21
+ # HostKeys for protocol version 2
22
+ #HostKey /etc/ssh/ssh_host_rsa_key
23
+ #HostKey /etc/ssh/ssh_host_dsa_key
24
+ #HostKey /etc/ssh/ssh_host_ecdsa_key
25
+ #HostKey /etc/ssh/ssh_host_ed25519_key
26
+
27
+ # Lifetime and size of ephemeral version 1 server key
28
+ #KeyRegenerationInterval 1h
29
+ #ServerKeyBits 1024
30
+
31
+ # Ciphers and keying
32
+ #RekeyLimit default none
33
+
34
+ # Logging
35
+ # obsoletes QuietMode and FascistLogging
36
+ #SyslogFacility AUTH
37
+ #LogLevel INFO
38
+
39
+ # Authentication:
40
+
41
+ #LoginGraceTime 2m
42
+ #PermitRootLogin yes
43
+ #StrictModes yes
44
+ #MaxAuthTries 6
45
+ #MaxSessions 10
46
+
47
+ #RSAAuthentication yes
48
+ #PubkeyAuthentication yes
49
+
50
+ # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
51
+ # but this is overridden so installations will only check .ssh/authorized_keys
52
+ AuthorizedKeysFile .ssh/authorized_keys
53
+
54
+ #AuthorizedPrincipalsFile none
55
+
56
+ #AuthorizedKeysCommand none
57
+ #AuthorizedKeysCommandUser nobody
58
+
59
+ # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
60
+ #RhostsRSAAuthentication no
61
+ # similar for protocol version 2
62
+ #HostbasedAuthentication no
63
+ # Change to yes if you don't trust ~/.ssh/known_hosts for
64
+ # RhostsRSAAuthentication and HostbasedAuthentication
65
+ #IgnoreUserKnownHosts no
66
+ # Don't read the user's ~/.rhosts and ~/.shosts files
67
+ #IgnoreRhosts yes
68
+
69
+ # To disable tunneled clear text passwords, change to no here!
70
+ PasswordAuthentication no
71
+ #PermitEmptyPasswords no
72
+
73
+ # Change to no to disable s/key passwords
74
+ ChallengeResponseAuthentication no
75
+
76
+ # Kerberos options
77
+ #KerberosAuthentication no
78
+ #KerberosOrLocalPasswd yes
79
+ #KerberosTicketCleanup yes
80
+ #KerberosGetAFSToken no
81
+
82
+ # GSSAPI options
83
+ GSSAPIAuthentication yes
84
+ GSSAPICleanupCredentials yes
85
+
86
+ # Set this to 'yes' to enable PAM authentication, account processing,
87
+ # and session processing. If this is enabled, PAM authentication will
88
+ # be allowed through the ChallengeResponseAuthentication and
89
+ # PasswordAuthentication. Depending on your PAM configuration,
90
+ # PAM authentication via ChallengeResponseAuthentication may bypass
91
+ # the setting of "PermitRootLogin without-password".
92
+ # If you just want the PAM account and session checks to run without
93
+ # PAM authentication, then enable this but set PasswordAuthentication
94
+ # and ChallengeResponseAuthentication to 'no'.
95
+ UsePAM yes
96
+
97
+ #AllowAgentForwarding yes
98
+ #AllowTcpForwarding yes
99
+ #GatewayPorts no
100
+ #X11Forwarding no
101
+ #X11DisplayOffset 10
102
+ #X11UseLocalhost yes
103
+ #PermitTTY yes
104
+ PrintMotd no # pam does that
105
+ #PrintLastLog yes
106
+ TCPKeepAlive yes
107
+ #UseLogin no
108
+ UsePrivilegeSeparation sandbox # Default for new installations.
109
+ #PermitUserEnvironment no
110
+ #Compression delayed
111
+ ClientAliveInterval 30
112
+ ClientAliveCountMax 5
113
+ #UseDNS no
114
+ #PidFile /run/sshd.pid
115
+ #MaxStartups 10:30:100
116
+ #PermitTunnel no
117
+ #ChrootDirectory none
118
+ #VersionAddendum none
119
+
120
+ # no default banner path
121
+ #Banner none
122
+
123
+ # override default of no subsystems
124
+ Subsystem sftp /usr/lib/ssh/sftp-server
125
+
126
+ # Example of overriding settings on a per-user basis
127
+ #Match User anoncvs
128
+ # X11Forwarding no
129
+ # AllowTcpForwarding no
130
+ # PermitTTY no
131
+ # ForceCommand cvs server
@@ -0,0 +1,11 @@
1
+ # ttyS0 - getty
2
+ #
3
+ # This service maintains a getty on ttyS0 from the point the system is
4
+ # started until it is shut down again.
5
+
6
+ start on stopped rc or RUNLEVEL=[12345]
7
+ stop on runlevel [!12345]
8
+
9
+ respawn
10
+ exec /sbin/getty --autologin root -L 115200 ttyS0 vt102
11
+
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env bash
2
+
3
+ apt-get update
4
+
5
+ apt-get --assume-yes install qemu-guest-agent
6
+ apt-key add /root/RPM-GPG-KEY-CERIT-SC.cfg
7
+ rm -f /root/RPM-GPG-KEY-CERIT-SC.cfg
8
+ apt-key add /root/DEPOT-GPG-KEY.cfg
9
+ rm -f /root/DEPOT-GPG-KEY.cfg
10
+ mv /root/meta-misc.list /etc/apt/sources.list.d/meta-misc.list
11
+ mv /root/depot.list /etc/apt/sources.list.d/depot.list
12
+ mv /root/depot_all.pref /etc/apt/preferences.d/depot_all.pref
13
+ mv /root/depot_check_mk.pref /etc/apt/preferences.d/depot_check_mk.pref
14
+
15
+ apt-get update
16
+ apt-get --assume-yes upgrade
17
+ apt-get --assume-yes install cloud-init
18
+ DEBIAN_FRONTEND=noninteractive apt-get --assume-yes install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" heimdal-clients libpam-heimdal
19
+ apt-get --assume-yes install vim git fail2ban ntp
20
+
21
+ mv /root/ntp.conf /etc/ntf.conf
22
+ mv /root/cloud.cfg /etc/cloud/cloud.cfg
23
+ mv /root/krb5.conf /etc/krb5.conf
24
+ mv /root/sshd_config /etc/ssh/sshd_config
25
+ mv /root/interfaces /etc/network/interfaces
26
+ mv /root/10-ipv6.conf /etc/sysctl.d/10-ipv6.conf
27
+ mv /root/ttyS0.conf /etc/init/ttyS0.conf
28
+ mv /root/grub /etc/default/grub
29
+ mv /root/modules /etc/initramfs-tools/modules
30
+
31
+ update-grub
32
+ start ttyS0
33
+
34
+ # fail2ban
35
+ mv /root/iptables-multiport.local /etc/fail2ban/action.d/iptables-multiport.local
36
+ mv /root/jail.local /etc/fail2ban/jail.local
37
+ mv /root/fail2ban.local /etc/fail2ban/fail2ban.local
38
+
39
+ # check-mk-agent
40
+ apt-get --assume-yes install check-mk-agent check-mk-agent-meta-key
41
+ apt-get --assume-yes install check-mk-agent-meta-checks
42
+
43
+ # pakiti-2-client
44
+ dpkg -i pakiti_2.1.5-2_all.deb
45
+ rm -f pakiti_2.1.5-2_all.deb
46
+
47
+ ln -s /dev/null /etc/udev/rules.d/75-persistent-net-generator.rules
48
+
49
+ update-initramfs -v -u -k `uname -r`
50
+
51
+ passwd -d root
52
+
53
+ rm -f ~/.bash_history
54
+ rm -f /var/log/cloud-init*
@@ -0,0 +1,87 @@
1
+ #Contents of the preconfiguration file (for ubuntu 12.04 and 14.04)
2
+
3
+ # Localization and language
4
+ d-i debian-installer/language string en
5
+ d-i debian-installer/country string US
6
+ d-i debian-installer/locale string en_US
7
+ d-i localechooser/supported-locales en_US
8
+
9
+ # Keyboard
10
+ d-i console-setup/ask_detect boolean false
11
+ d-i console-setup/layoutcode string us
12
+ d-i keymap select us
13
+ d-i keyboard-configuration/xkb-keymap select us
14
+
15
+ # Network
16
+ d-i netcfg/choose_interface select auto
17
+ d-i netcfg/get_hostname string ubuntu
18
+ d-i netcfg/get_domain string cesnet.cz
19
+
20
+ # Mirror
21
+ d-i mirror/country string manual
22
+ d-i mirror/http/hostname string archive.ubuntu.com
23
+ d-i mirror/http/directory string /ubuntu/
24
+ d-i mirror/http/proxy string
25
+
26
+ # Clock and time zone
27
+ d-i clock-setup/utc boolean true
28
+ d-i time/zone string Europe/Prague
29
+ d-i clock-setup/ntp boolean true
30
+
31
+ # Account
32
+ #d-i passwd/user-fullname string temporary_user
33
+ #d-i passwd/username string temporary_user
34
+ #d-i passwd/user-password password <%= @data[:password] %>
35
+ #d-i passwd/user-password-again password <%= @data[:password] %>
36
+ #d-i user-setup/encrypt-home boolean false
37
+ #d-i user-setup/allow-password-weak boolean true
38
+ d-i passwd/make-user boolean false
39
+
40
+ # Root password
41
+ d-i passwd/root-login boolean true
42
+ d-i passwd/root-password password <%= @data[:password] %>
43
+ d-i passwd/root-password-again password <%= @data[:password] %>
44
+
45
+ # Partition
46
+ d-i partman-md/device_remove_md boolean true
47
+ d-i partman-lvm/device_remove_lvm boolean true
48
+
49
+ d-i partman-auto/choose_recipe select boot-root
50
+ d-i partman-auto/init_automatically_partition select biggest_free
51
+ d-i partman-auto/method string regular
52
+
53
+ d-i partman-auto/expert_recipe string \
54
+ boot-root :: \
55
+ 500 10000 1000000000 ext4 \
56
+ method{ format } format{ } \
57
+ use_filesystem{ } filesystem{ ext4 } \
58
+ mountpoint{ / } \
59
+ .
60
+
61
+ d-i partman/confirm_write_new_label boolean true
62
+ d-i partman/choose_partition select finish
63
+ d-i partman/confirm_nooverwrite boolean true
64
+ d-i partman/confirm boolean true
65
+ d-i partman-basicfilesystems/no_swap boolean false
66
+ d-i partman-basicfilesystems/no_swap seen true
67
+ d-i partman/mount_style select uuid
68
+
69
+ # Grub
70
+ d-i grub-installer/only_debian boolean true
71
+ d-i grub-installer/with_other_os boolean false
72
+
73
+ # Base system installation
74
+ #d-i base-installer/install-recommends boolean false
75
+ d-i base-installer/kernel/image string linux-generic
76
+
77
+ # Package selection
78
+ tasksel tasksel/first multiselect none
79
+ d-i pkgsel/update-policy select none
80
+ d-i pkgsel/include string openssh-server build-essential
81
+ d-i pkgsel/upgrade select none
82
+
83
+ # SSH hack to allow root login
84
+ d-i preseed/late_command string in-target sed -i "s/PermitRootLogin without-password/PermitRootLogin yes/" /etc/ssh/sshd_config
85
+
86
+ # Finishing up the installation
87
+ d-i finish-install/reboot_in_progress note
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "Ubuntu",
3
+ "versions": [{
4
+ "major_version": "14",
5
+ "minor_version": "04",
6
+ "codename": "trusty",
7
+ "name": "Trusty Tahr",
8
+ "iso_url": "http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/mini.iso",
9
+ "iso_checksum": "bc09966b54f91f62c3c41fc14b76f2baa4cce48595ce22e8c9f24ab21ac8d965"
10
+ }],
11
+ "boot_command": "install auto=true priority=critical preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}",
12
+ "qemu": {
13
+ "accelerator": "kvm",
14
+ "qemuargs": [ [ "-m", "1024M" ] ]
15
+ },
16
+ "virtualbox": {
17
+ "guest_os_type": "Ubuntu_64",
18
+ "vboxmanage": [ ["modifyvm", "{{.Name}}", "--memory", "1024"] ],
19
+ "guest_additions_mode": "disable"
20
+ }
21
+ }
@@ -0,0 +1,241 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "name": {
5
+ "type": "string"
6
+ },
7
+ "versions": {
8
+ "type": "array",
9
+ "items": {
10
+ "type": "object",
11
+ "properties": {
12
+ "major_version": {
13
+ "type": "string"
14
+ },
15
+ "minor_version": {
16
+ "type": "string"
17
+ },
18
+ "patch_version": {
19
+ "type": "string"
20
+ },
21
+ "codename": {
22
+ "type": "string"
23
+ },
24
+ "iso_url": {
25
+ "type": "string"
26
+ },
27
+ "iso_checksum": {
28
+ "type": "string"
29
+ },
30
+ "name": {
31
+ "type": "string"
32
+ }
33
+ },
34
+ "required": [
35
+ "major_version",
36
+ "minor_version",
37
+ "iso_url",
38
+ "iso_checksum"
39
+ ],
40
+ "optional": [
41
+ "patch_version",
42
+ "codename",
43
+ "name"
44
+ ],
45
+ "additionalProperties": false
46
+ },
47
+ "minItems": 1
48
+ },
49
+ "boot_command": {
50
+ "type": "string"
51
+ },
52
+ "qemu": {
53
+ "type": "object",
54
+ "properties": {
55
+ "accelerator": {
56
+ "type": "string",
57
+ "enum": [
58
+ "none",
59
+ "kvm",
60
+ "tcg",
61
+ "xen"
62
+ ]
63
+ },
64
+ "disk_cache": {
65
+ "type": "string",
66
+ "enum": [
67
+ "writethrough",
68
+ "writeback",
69
+ "none",
70
+ "unsafe",
71
+ "directsync"
72
+ ]
73
+ },
74
+ "disk_discard": {
75
+ "type": "string",
76
+ "enum": [
77
+ "unmap",
78
+ "ignore"
79
+ ]
80
+ },
81
+ "disk_image": {
82
+ "type": "boolean"
83
+ },
84
+ "disk_interface": {
85
+ "type": "string",
86
+ "enum": [
87
+ "ide",
88
+ "scsi",
89
+ "virtio"
90
+ ]
91
+ },
92
+ "floppy_files": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "string"
96
+ }
97
+ },
98
+ "machine_type": {
99
+ "type": "string"
100
+ },
101
+ "net_device": {
102
+ "type": "string",
103
+ "enum": [
104
+ "ne2k_pci",
105
+ "i82551",
106
+ "i82557b",
107
+ "i82559er",
108
+ "rtl8139",
109
+ "e1000",
110
+ "pcnet",
111
+ "virtio"
112
+ ]
113
+ },
114
+ "qemu_binary": {
115
+ "type": "string"
116
+ },
117
+ "qemuargs": {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "string"
123
+ }
124
+ }
125
+ },
126
+ "vnc_port_min": {
127
+ "type": "integer"
128
+ },
129
+ "vnc_port_max": {
130
+ "type": "integer"
131
+ }
132
+ },
133
+ "optional": [
134
+ "accelerator",
135
+ "disk_cache",
136
+ "disk_discard",
137
+ "disk_image",
138
+ "disk_interface",
139
+ "floppy_files",
140
+ "machine_type",
141
+ "net_device",
142
+ "qemu_binary",
143
+ "qemuargs",
144
+ "vnc_port_min",
145
+ "vnc_port_max"
146
+ ],
147
+ "additionalProperties": false
148
+ },
149
+ "virtualbox": {
150
+ "type": "object",
151
+ "properties": {
152
+ "export_opts": {
153
+ "type": "array",
154
+ "items": {
155
+ "type": "string"
156
+ }
157
+ },
158
+ "guest_additions_mode": {
159
+ "type": "string",
160
+ "enum": [
161
+ "upload",
162
+ "attach",
163
+ "disable"
164
+ ]
165
+ },
166
+ "guest_additions_path": {
167
+ "type": "string"
168
+ },
169
+ "guest_additions_sha256": {
170
+ "type": "string"
171
+ },
172
+ "guest_additions_url": {
173
+ "type": "string"
174
+ },
175
+ "guest_os_type": {
176
+ "type": "string"
177
+ },
178
+ "hard_drive_interface": {
179
+ "type": "string",
180
+ "enum": [
181
+ "ide",
182
+ "sata",
183
+ "scsi"
184
+ ]
185
+ },
186
+ "iso_interface": {
187
+ "type": "string",
188
+ "enum": [
189
+ "ide",
190
+ "sata"
191
+ ]
192
+ },
193
+ "vboxmanage": {
194
+ "type": "array",
195
+ "items": {
196
+ "type": "array",
197
+ "items": {
198
+ "type": "string"
199
+ }
200
+ }
201
+ },
202
+ "vboxmanage_post": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "array",
206
+ "items": {
207
+ "type": "string"
208
+ }
209
+ }
210
+ },
211
+ "virtualbox_version_file": {
212
+ "type": "string"
213
+ }
214
+ },
215
+ "optional": [
216
+ "export_opts",
217
+ "guest_additions_mode",
218
+ "guest_additions_path",
219
+ "guest_additions_sha256",
220
+ "guest_additions_url",
221
+ "guest_os_type",
222
+ "hard_drive_interface",
223
+ "iso_interface",
224
+ "vboxmanage",
225
+ "vboxmanage_post",
226
+ "virtualbox_version_file"
227
+ ],
228
+ "additionalProperties": false
229
+ }
230
+ },
231
+ "required": [
232
+ "name",
233
+ "versions",
234
+ "boot_command"
235
+ ],
236
+ "optional": [
237
+ "qemu",
238
+ "virtualbox"
239
+ ],
240
+ "additionalProperties": false
241
+ }