Commit 14fbcd92 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: slapos.cfg is now deployed by a buildout section

(in order to kick the recipe)
parent f5c3f092
......@@ -76,10 +76,10 @@ class Recipe(GenericBaseRecipe):
cloud9_url=self.cloud9_url
)
config_file = self.createFile(self.options['slapos.cfg'],
self.substituteTemplate(self.getTemplateFilename('slapos.cfg.in'),
configuration))
path_list.append(config_file)
#config_file = self.createFile(self.options['slapos.cfg'],
# self.substituteTemplate(self.getTemplateFilename('slapos.cfg.in'),
# configuration))
config_file = configuration['etc_dir'] + 'slapos.cfg'
environment = dict(
PATH=os.path.dirname(
......
......@@ -25,6 +25,11 @@ parts =
instance-runner-import
instance-runner-export
slapos-cookbook
slapos-cfg-template
develop =
/opt/slapos.toolbox/
/opt/slaprunner/
# XXX: we have to manually add this for resilience
rdiff-backup
......@@ -76,14 +81,14 @@ command =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
md5sum = 92a2f3bcd5ff79e3b61ca4a8bacb73ec
#md5sum = 92a2f3bcd5ff79e3b61ca4a8bacb73ec
mode = 0644
[template-runner]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg
md5sum = bcd1ee4dd126d2c6e9461f7753fc83b7
#md5sum = bcd1ee4dd126d2c6e9461f7753fc83b7
mode = 0644
[instance-runner-import]
......@@ -129,6 +134,15 @@ filename = launcher.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[slapos-cfg-template]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
#md5sum =
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = slapos.cfg.in.j2
download-only = true
mode = 0644
[eggs]
recipe = z3c.recipe.scripts
eggs =
......
......@@ -21,6 +21,7 @@ parts =
request-cloud9-frontend
node-frontend-promise
nginx-promise
slapos-cfg
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -394,3 +395,34 @@ debug = false
cloud9-frontend-domain =
frontend-domain =
[slapos-cfg]
recipe = slapos.recipe.template:jinja2
template = ${slapos-cfg-template:location}/${slapos-cfg-template:filename}
rendered = $${slaprunner:slapos.cfg}
mode = 700
supd-temp-var = $${slaprunner:instance-directory}/$${directory:etc}/supervisord.conf
prox-db-var = $${slaprunner:working-directory}/proxy.db
context =
key software_root runnerdirectory:software-root
key instance_root runnerdirectory:instance-root
key ipv4 slaprunner:ipv4
key proxy_port slaprunner:proxy_port
key partition_amount slaprunner:partition-amount
key slapgrid_sr slaprunner:slapgrid_sr
key slapgrid_cp slaprunner:slapgrid_cp
key slapproxy slaprunner:slapproxy
key supervisor slaprunner:supervisor
key supervisord_config slapos-cfg:supd-temp-var
key runner_workdir slaprunner:working-directory
key runner_port slaprunner:runner_port
key ipv6 slaprunner:ipv6
key etc_dir slaprunner:etc_dir
key proxy_host slaprunner:ipv4
key proxy_database slapos-cfg:prox-db-var
key ssh_client slaprunner:ssh_client
key public_key slaprunner:public_key
key private_key slaprunner:private_key
key git slaprunner:git-binary
key cloud9_url slaprunner:cloud9-url
key run_dir slaprunner:run_dir
key log_dir slaprunner:log_dir
......@@ -50,4 +50,4 @@ computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
\ No newline at end of file
cert = $${slap-connection:cert-file}
......@@ -69,7 +69,7 @@ lock-file = 2.0
rdiff-backup = 1.0.5
slapos.recipe.cmmi = 0.2
slapos.recipe.download = 1.0.dev-r4053
slapos.toolbox = 0.35.1
#slapos.toolbox = 0.35.1
slapos.cookbook = 0.78.5
cliff = 1.4
cmd2 = 0.6.6
......
[slapos]
software_root = {{software_root}}
instance_root = {{instance_root}}
master_url = http://{{ipv4}}:{{proxy_port}}
computer_id = slaprunner
maximal_delay = 0
[slapformat]
partition_amount = {{partition_amount}}
[slaprunner]
slapgrid_sr = {{slapgrid_sr}}
slapgrid_cp = {{slapgrid_cp}}
slapproxy = {{slapproxy}}
supervisor = {{supervisor}}
supervisord_config = {{supervisord_config}}
runner_workdir = {{runner_workdir}}
runner_host = {{ipv4}}
runner_port = {{runner_port}}
ipv4_address = {{ipv4}}
ipv6_address = {{ipv6}}
etc_dir = {{etc_dir}}
run_dir = {{run_dir}}
log_dir = {{log_dir}}
[slapproxy]
host = {{proxy_host}}
port = {{proxy_port}}
database_uri = {{proxy_database}}
[sshkeys_authority]
ssh_client = {{ssh_client}}
public_key = {{public_key}}
private_key = {{private_key}}
[gitclient]
git = {{git}}
[cloud9_IDE]
cloud9 = {{cloud9_url}}
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