Commit 588c259f authored by Kristopher Ruzic's avatar Kristopher Ruzic

updates files to fix bugs

as the recipe is pulled from git, we need to keep it up to date
parent 1d69a55c
...@@ -28,8 +28,8 @@ socket_path = '%(socket-path)s' ...@@ -28,8 +28,8 @@ socket_path = '%(socket-path)s'
nbd_list = (('%(nbd-host)s', %(nbd-port)s), ('%(nbd2-host)s', %(nbd2-port)s)) nbd_list = (('%(nbd-host)s', %(nbd-port)s), ('%(nbd2-host)s', %(nbd2-port)s))
disk_path = '%(disk-path)s' disk_path = '%(disk-path)s'
nat_rules = '%(nat-rules)s'.strip() nat_rules = '%(nat-rules)s'.strip()
use_tap = literal_eval('%(use-tap)s') use_tap = ast.literal_eval('%(use-tap)s')
use_nat = literal_eval('%(use-nat)s') use_nat = ast.literal_eval('%(use-nat)s')
tap_interface = '%(tap-interface)s' tap_interface = '%(tap-interface)s'
listen_ip = '%(ipv4)s' listen_ip = '%(ipv4)s'
mac_address = '%(mac-address)s' mac_address = '%(mac-address)s'
...@@ -40,14 +40,13 @@ numa_list = '%(numa)s'.split() ...@@ -40,14 +40,13 @@ numa_list = '%(numa)s'.split()
ram_size = '%(ram-size)s' ram_size = '%(ram-size)s'
pid_file_path = '%(pid-file-path)s' pid_file_path = '%(pid-file-path)s'
etc_directory = '%(etc-directory)s'.strip() etc_directory = '%(etc-directory)s'.strip()
httpd_port = %(httpd-port)s httpd_port = '%(httpd-port)s'
netcat_bin = '%(netcat-binary)s'.strip() netcat_bin = '%(netcat-binary)s'.strip()
cluster_doc_host = '%(cluster-doc-host)s' cluster_doc_host = '%(cluster-doc-host)s'
cluster_doc_port = %(cluster-doc-port)s cluster_doc_port = '%(cluster-doc-port)s'
# iso url and md5 are hardcoded for now # iso url and md5 are hardcoded for now
build["iso_url"] = build["iso_url"] = "http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso"
"http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso",
build["iso_checksum"] = "1a311f9afb68d6365211b13b4342c40b" build["iso_checksum"] = "1a311f9afb68d6365211b13b4342c40b"
build["iso_checksum_type"] = "md5" build["iso_checksum_type"] = "md5"
...@@ -68,15 +67,15 @@ build["boot_command"] = [ ...@@ -68,15 +67,15 @@ build["boot_command"] = [
"<esc><wait><wait>", "<esc><wait><wait>",
"install auto ", "install auto ",
"debian-installer=en_US locale=en_US keymap=us ", "debian-installer=en_US locale=en_US keymap=us ",
"netcfg/get_hostname={{hostname}} ", "netcfg/get_hostname=%(packer-hostname)s",
"netcfg/get_domain={{domain}} ", "netcfg/get_domain=%(packer-domain)s",
"fb=false debconf/frontend=noninteractive ", "fb=false debconf/frontend=noninteractive ",
"passwd/user-fullname={{user}} ", "passwd/user-fullname=%(packer-username)s",
"passwd/user-password={{password}} ", "passwd/user-password=%(packer-password)s",
"passwd/user-password-again={{password}} ", "passwd/user-password-again=%(packer-password)s",
"passwd/username={{user}} ", "passwd/username=%(packer-username)s",
"<enter>" "<enter>"
] ]
...@@ -102,11 +101,10 @@ def getSocketStatus(host, port): ...@@ -102,11 +101,10 @@ def getSocketStatus(host, port):
return s return s
def gen_packer_json(build): def gen_packer_json(build):
import json
packer_json = {"builders": [build]} packer_json = {"builders": [build]}
with open("packer.json", 'w') as outfile:
json_file = open("packer.json", 'w') json.dump(packer_json, outfile)
json_file.write(packer_json)
json_file.close()
# Generate network parameters # Generate network parameters
......
...@@ -68,11 +68,6 @@ extra-context = ...@@ -68,11 +68,6 @@ extra-context =
key content packer-configuration:packer-build-command key content packer-configuration:packer-build-command
[packer-configuration] [packer-configuration]
disk-size = 10000
user = nexedi
password = test
hostname =
domain =
packer-environment = ${buildout:parts-directory}/qemu/bin/ packer-environment = ${buildout:parts-directory}/qemu/bin/
packer-build-command = packer-build-command =
${buildout:parts-directory}/packer/packer build -debug -color=false ${buildout:parts-directory}/packer.json > testing.log ${buildout:parts-directory}/packer/packer build -debug -color=false ${buildout:parts-directory}/packer.json > testing.log
...@@ -97,7 +92,7 @@ nbd2-port = ${slap-parameter:nbd2-port} ...@@ -97,7 +92,7 @@ nbd2-port = ${slap-parameter:nbd2-port}
tap-interface = tap-interface =
disk-size = "" disk-size = 10
disk-type = ${slap-parameter:disk-type} disk-type = ${slap-parameter:disk-type}
socket-path = $${directory:var}/qmp_socket socket-path = $${directory:var}/qmp_socket
...@@ -121,3 +116,18 @@ nat-rules = ${slap-parameter:nat-rules} ...@@ -121,3 +116,18 @@ nat-rules = ${slap-parameter:nat-rules}
shell-path = {{ dash_executable_location }} shell-path = {{ dash_executable_location }}
6tunnel-path = {{ sixtunnel_executable_location }} 6tunnel-path = {{ sixtunnel_executable_location }}
disk-path = test
etc-directory = $${buildout:directory}/etc
httpd-port = 1024
netcat-binary = test
cluster-doc-host = test
cluster-doc-port = 1024
packer-name = Nexedi Test Image
packer-domain = nexedi-domain
packer-hostname = nexedi-hostname
packer-username = nexedi
#XXX: change to use password gen
packer-password = test
...@@ -9,6 +9,7 @@ extends = ...@@ -9,6 +9,7 @@ extends =
parts += parts +=
slapos-cookbook slapos-cookbook
slapos-cookbook-develop
instance-profile instance-profile
lxml-python lxml-python
packer packer
...@@ -64,7 +65,6 @@ external-disk-number = 0 ...@@ -64,7 +65,6 @@ external-disk-number = 0
external-disk-size = 20 external-disk-size = 20
external-disk-format = qcow2 external-disk-format = qcow2
[versions] [versions]
plone.recipe.command = 1.1 plone.recipe.command = 1.1
slapos.recipe.template = 2.8 slapos.recipe.template = 2.8
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment