Commit da310364 authored by Viktor Horvath's avatar Viktor Horvath

After first help from Marco

parent ade01a05
[buildout]
parts =
postgres-urlparse
apacheperl-promise
publish-connection-information
# mioga-instance
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -43,4 +45,26 @@ port = $${apacheperl-instance:port}
[publish-connection-information]
recipe = slapos.cookbook:publish
apacheperl_url = http://[$${apacheperl-instance:ip}]:$${apacheperl-instance:port}
\ No newline at end of file
apacheperl_url = http://[$${apacheperl-instance:ip}]:$${apacheperl-instance:port}
# Request Postgres instance and parse its URL
[request-postgres]
<= slap-connection
recipe = slapos.cookbook:request
name = Postgres
software-url = $${slap-connection:software-release-url}
software-type = postgres
return = url
sla = computer_guid
sla-computer_guid = $${slap-connection:computer-id}
[postgres-urlparse]
recipe = slapos.cookbook:urlparse
url = $${request-postgres:connection-url}
[symlinks]
recipe = cns.recipe.symlink
symlink_target = $${rootdirectory:bin}
symlink_base = ${postgresql:location}/bin
# [mioga-instance]
\ No newline at end of file
[buildout]
parts =
symlinks
publish
postgres-instance
postgres-promise
# Define egg directories to be the one from Software Release
# (/opt/slapgrid/...)
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[instance-parameters]
# Fetches parameters defined in SlapOS Master for this instance
recipe = slapos.cookbook:slapconfiguration
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}
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc
services = $${rootdirectory:etc}/run/
promises = $${rootdirectory:etc}/promise/
var = $${buildout:directory}/var
[symlinks]
recipe = cns.recipe.symlink
symlink_target = $${rootdirectory:bin}
symlink_base = ${postgresql:location}/bin
[postgres-instance]
# create cluster, configuration files and a database
recipe = slapos.cookbook:postgres
# Options
ipv6_host = $${slap-network-information:global-ipv6}
user = postgres
port = 5432
dbname = db
# pgdata_directory is created by initdb, and should not exist beforehand.
pgdata-directory = $${rootdirectory:var}/data
services = $${rootdirectory:services}
bin = $${rootdirectory:bin}
# Deploy promises scripts
[postgres-promise]
recipe = slapos.cookbook:check_port_listening
path = $${rootdirectory:promises}/postgres
hostname = $${slap-network-information:global-ipv6}
port = $${postgres-instance:port}
[publish]
recipe = slapos.cookbook:publishurl
url = $${postgres-instance:url}
......@@ -9,12 +9,13 @@ offline = true
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${template-apacheperl:output}
postgres = ${template-postgres:output}
[slap-connection]
# part to migrate to new - separated words
computer-id = $${slap_connection:computer_id}
partition-id = $${slap_connection:partition_id}
server-url = $${slap_connection:server_url}
software-release-url = $${slap_connection:software_release_url}
key-file = $${slap_connection:key_file}
cert-file = $${slap_connection:cert_file}
\ No newline at end of file
# [slap-connection]
# # part to migrate to new - separated words
# computer-id = $${slap_connection:computer_id}
# partition-id = $${slap_connection:partition_id}
# server-url = $${slap_connection:server_url}
# software-release-url = $${slap_connection:software_release_url}
# key-file = $${slap_connection:key_file}
# cert-file = $${slap_connection:cert_file}
\ No newline at end of file
......@@ -22,7 +22,6 @@ extends =
parts =
eggs
apache-perl
template
perl-Apache2-Request
perl-Crypt-SSLeay
perl-DBD-Pg
......@@ -36,26 +35,16 @@ parts =
perl-Search-Xapian
cpan-simple-modules
mioga
template
template-apacheperl
template-postgres
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.cookbook
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
# md5sum =
output = ${buildout:directory}/template.cfg
mode = 0644
[template-apacheperl]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apacheperl.cfg
# md5sum =
output = ${buildout:directory}/template-apacheperl.cfg
mode = 0644
cns.recipe.symlink
[cpan-simple-modules]
recipe = slapos.recipe.build:cpan
......@@ -126,6 +115,27 @@ url = ${:_profile_base_location_}/${:filename}
download-only = true
filename = mioga-hooks.py
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
# md5sum =
output = ${buildout:directory}/template.cfg
mode = 0644
[template-apacheperl]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apacheperl.cfg
# md5sum =
output = ${buildout:directory}/template-apacheperl.cfg
mode = 0644
[template-postgres]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-postgres.cfg
# md5sum =
output = ${buildout:directory}/template-postgres.cfg
mode = 0644
[networkcache]
# Cedric de Saint Martin signature certificate
signature-certificate-list =
......
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