From 085ddd3e83effae26cea48506b1c8c5e3fbcdcf1 Mon Sep 17 00:00:00 2001 From: Marco Mariani <marco.mariani@nexedi.com> Date: Tue, 6 Nov 2012 16:00:48 +0100 Subject: [PATCH] further directory renaming, small cleanup --- stack/lamp/apache/instance-apache-import.cfg | 4 ++-- stack/lamp/buildout.cfg | 24 +++++++++---------- ...ot.cfg.in => instance-default-root.cfg.in} | 0 stack/lamp/instance.cfg.in | 8 +++---- .../mariadb/instance-mariadb-export.cfg.in | 4 ++-- .../mariadb/instance-mariadb-import.cfg.in | 2 +- stack/resilient/buildout.cfg | 22 ++++++++--------- .../resilient/instance-pbsready-export.cfg.in | 3 ++- .../resilient/instance-pbsready-import.cfg.in | 2 +- stack/resilient/instance-pull-backup.cfg.in | 14 ++++------- stack/resilient/switchsoftware.cfg.in | 2 +- stack/resilient/template-parts.cfg.in | 2 +- 12 files changed, 42 insertions(+), 45 deletions(-) rename stack/lamp/{default-root.cfg.in => instance-default-root.cfg.in} (100%) diff --git a/stack/lamp/apache/instance-apache-import.cfg b/stack/lamp/apache/instance-apache-import.cfg index a3c61383e..4e3678b24 100644 --- a/stack/lamp/apache/instance-apache-import.cfg +++ b/stack/lamp/apache/instance-apache-import.cfg @@ -1,6 +1,6 @@ [buildout] -extends = ${template-apache-php:output} - ${template-pbsready-export:output} +extends = ${instance-apache-php:output} + ${instance-pbsready-export:output} parts = apache-proxy diff --git a/stack/lamp/buildout.cfg b/stack/lamp/buildout.cfg index eb789288d..1d3f8ec10 100644 --- a/stack/lamp/buildout.cfg +++ b/stack/lamp/buildout.cfg @@ -13,14 +13,14 @@ parts = instance-recipe-egg template - template-apache-php + instance-apache-php template-mariadb #Contains the importer and exporter recipes for mariadb template-mariadb-import template-mariadb-export - template-default-root + instance-default-root extends = @@ -68,17 +68,17 @@ strip-top-level-dir = true recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg.in output = ${buildout:directory}/instance.cfg -md5sum = e080e7d978a1a2ec78a775ee48dda1d0 +#md5sum = 5b7ad4002de3e3e46fb2c3b7e44c81c0 mode = 0644 -[template-apache-php] +[instance-apache-php] recipe = slapos.recipe.template url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in output = ${buildout:directory}/instance-apache-php.cfg md5sum = a5dd222b3faa4e1ef2df9b3b9bb47966 mode = 0644 -[template-apache-backup] +[instance-apache-backup] recipe = slapos.recipe.template url = ${:_profile_base_location_}/apache/instance-apache-backup.cfg.in output = ${buildout:directory}/instance-apache-backup.cfg @@ -90,7 +90,7 @@ recipe = slapos.recipe.template:jinja2 template = ${:_profile_base_location_}/template-resilient.cfg.in rendered = ${buildout:directory}/instance-resilient.cfg -context = key templateapache template-apache-php:output +context = key templateapache instance-apache-php:output key dropbear dropbear:location key buildout buildout:bin-directory @@ -112,22 +112,22 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in output = ${buildout:directory}/instance-mariadb-import.cfg -md5sum = fa696733db4bd5b2e3e9fb6e0b09c59b +#md5sum = 0a3f052a38298dc4153a6eca13712b28 mode = 0644 [template-mariadb-export] recipe = slapos.recipe.template url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in output = ${buildout:directory}/instance-mariadb-export.cfg -md5sum = 4b7dec765265b27c8235419b82ca7b02 +#md5sum = 3638ea4fa57144b88562cb1bcb3531dc mode = 0644 -[template-default-root] +[instance-default-root] recipe = slapos.recipe.template -url = ${:_profile_base_location_}/default-root.cfg.in -output = ${buildout:directory}/default-root.cfg -#md5sum = 48e0c1511db6786d63b1e194446b506b +url = ${:_profile_base_location_}/instance-default-root.cfg.in +output = ${buildout:directory}/instance-default-root.cfg +md5sum = 53c9020f7a0b5203f976e069e455787b mode = 0644 diff --git a/stack/lamp/default-root.cfg.in b/stack/lamp/instance-default-root.cfg.in similarity index 100% rename from stack/lamp/default-root.cfg.in rename to stack/lamp/instance-default-root.cfg.in diff --git a/stack/lamp/instance.cfg.in b/stack/lamp/instance.cfg.in index a3d514626..d5f4c6dd7 100644 --- a/stack/lamp/instance.cfg.in +++ b/stack/lamp/instance.cfg.in @@ -12,13 +12,13 @@ offline = true [switch_softwaretype] recipe = slapos.cookbook:softwaretype -default = ${template-default-root:output} -apache = ${template-apache-php:output} +default = ${instance-default-root:output} +apache = ${instance-apache-php:output} resilient = ${template-resilient-lamp:rendered} mariadb = ${template-mariadb:output} mariadb-import = ${template-mariadb-import:output} mariadb-export = ${template-mariadb-export:output} pull-backup = ${template-pull-backup:output} -apache-backup = ${template-apache-backup:output} -frozen = ${template-frozen:output} +apache-backup = ${instance-apache-backup:output} +frozen = ${instance-frozen:output} diff --git a/stack/lamp/mariadb/instance-mariadb-export.cfg.in b/stack/lamp/mariadb/instance-mariadb-export.cfg.in index fd7f5b93f..5b58ce18e 100644 --- a/stack/lamp/mariadb/instance-mariadb-export.cfg.in +++ b/stack/lamp/mariadb/instance-mariadb-export.cfg.in @@ -1,6 +1,6 @@ [buildout] extends = ${template-mariadb:output} - ${template-pbsready-export:output} + ${instance-pbsready-export:output} parts += mariadb @@ -12,4 +12,4 @@ socket = $${mariadb:socket} user = root mydumper-binary = ${mydumper:location}/bin/mydumper database = $${mariadb:database} -import = false \ No newline at end of file +import = false diff --git a/stack/lamp/mariadb/instance-mariadb-import.cfg.in b/stack/lamp/mariadb/instance-mariadb-import.cfg.in index 1b58b02a4..ddac88075 100644 --- a/stack/lamp/mariadb/instance-mariadb-import.cfg.in +++ b/stack/lamp/mariadb/instance-mariadb-import.cfg.in @@ -1,6 +1,6 @@ [buildout] extends = ${template-mariadb:output} - ${template-pbsready-import:output} + ${instance-pbsready-import:output} parts += mariadb diff --git a/stack/resilient/buildout.cfg b/stack/resilient/buildout.cfg index 82758a8b1..82195f318 100644 --- a/stack/resilient/buildout.cfg +++ b/stack/resilient/buildout.cfg @@ -2,38 +2,38 @@ parts = #Templates needed to setup automatic backup - template-pbsready - template-pbsready-import - template-pbsready-export + instance-pbsready + instance-pbsready-import + instance-pbsready-export template-replicated template-parts #Frozen is the state used to not destroy a broken instance's content - template-frozen + instance-frozen template-resilient template-switchsoftware -[template-pbsready] +[instance-pbsready] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-pbsready.cfg.in output = ${buildout:directory}/instance-pbsready.cfg md5sum = 45e64cfb6afbcfda1f9f85e33c73bd99 mode = 0644 -[template-pbsready-import] +[instance-pbsready-import] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-pbsready-import.cfg.in output = ${buildout:directory}/instance-pbsready-import.cfg -md5sum = 5ba7477f9499a7dbde5f33ca96bd6ba4 +#md5sum = 398e77061a904d0565db57b1ffbaf128 mode = 0644 -[template-pbsready-export] +[instance-pbsready-export] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-pbsready-export.cfg.in output = ${buildout:directory}/instance-pbsready-export.cfg -md5sum = 29d36aac2008b173cb9ce5da9e88c0fa +#md5sum = 29d36aac2008b173cb9ce5da9e88c0fa mode = 0644 [template-pull-backup] @@ -57,7 +57,7 @@ md5sum = f5fc27235725f05fdbde76a78ebc363e mode = 0644 destination = ${buildout:directory}/template-parts.cfg.in -[template-frozen] +[instance-frozen] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-frozen.cfg.in output = ${buildout:directory}/instance-frozen.cfg @@ -73,6 +73,6 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/switchsoftware.cfg.in output = ${buildout:directory}/switchsoftware.cfg -md5sum = c94a0ed85fce2e72254ae956dce7e40d +#md5sum = a0e895173ff33ffea97b0bbb52d7e486 mode = 0644 diff --git a/stack/resilient/instance-pbsready-export.cfg.in b/stack/resilient/instance-pbsready-export.cfg.in index bcbea3c47..de190daec 100644 --- a/stack/resilient/instance-pbsready-export.cfg.in +++ b/stack/resilient/instance-pbsready-export.cfg.in @@ -1,5 +1,6 @@ [buildout] -extends = ${template-pbsready:output} + +extends = ${instance-pbsready:output} parts += cron-entry-backup diff --git a/stack/resilient/instance-pbsready-import.cfg.in b/stack/resilient/instance-pbsready-import.cfg.in index 845397a7c..a849765a4 100644 --- a/stack/resilient/instance-pbsready-import.cfg.in +++ b/stack/resilient/instance-pbsready-import.cfg.in @@ -1,6 +1,6 @@ [buildout] -extends = ${template-pbsready:output} +extends = ${instance-pbsready:output} parts += import-on-notification diff --git a/stack/resilient/instance-pull-backup.cfg.in b/stack/resilient/instance-pull-backup.cfg.in index 90ae9733b..62398200b 100644 --- a/stack/resilient/instance-pull-backup.cfg.in +++ b/stack/resilient/instance-pull-backup.cfg.in @@ -144,11 +144,12 @@ rotate-num = 30 [rootdirectory] recipe = slapos.cookbook:mkdirectory +bin = $${buildout:directory}/bin/ etc = $${buildout:directory}/etc/ -var = $${buildout:directory}/var/ +home = $${buildout:directory}/home/ srv = $${buildout:directory}/srv/ -bin = $${buildout:directory}/bin/ tmp = $${buildout:directory}/tmp/ +var = $${buildout:directory}/var/ [basedirectory] recipe = slapos.cookbook:mkdirectory @@ -157,6 +158,8 @@ services = $${rootdirectory:etc}/run/ run = $${rootdirectory:var}/run/ backup = $${rootdirectory:srv}/backup/ promises = $${rootdirectory:etc}/promise/ +ssh-home = $${rootdirectory:home}/ssh +notifier = $${rootdirectory:etc}/notifier/ [directory] recipe = slapos.cookbook:mkdirectory @@ -173,13 +176,6 @@ dot-ssh = $${basedirectory:ssh-home}/.ssh/ notifier-feeds = $${basedirectory:notifier}/feeds/ notifier-callbacks = $${basedirectory:notifier}/callbacks/ -[basedirectory] -ssh-home = $${rootdirectory:home}/ssh -notifier = $${rootdirectory:etc}/notifier/ - -[rootdirectory] -home = $${buildout:directory}/home/ - # Default values [slap-parameter] diff --git a/stack/resilient/switchsoftware.cfg.in b/stack/resilient/switchsoftware.cfg.in index 1dbdd0697..65354fe32 100644 --- a/stack/resilient/switchsoftware.cfg.in +++ b/stack/resilient/switchsoftware.cfg.in @@ -7,4 +7,4 @@ recipe = slapos.cookbook:softwaretype pull-backup = ${template-pull-backup:output} #frozen creates a syntax error, meaning it can keep its data. #It's dirty as hell, it needs to be replaced. -frozen = ${template-frozen:output} +frozen = ${instance-frozen:output} diff --git a/stack/resilient/template-parts.cfg.in b/stack/resilient/template-parts.cfg.in index 9cb5d1f1c..5f1837ee5 100644 --- a/stack/resilient/template-parts.cfg.in +++ b/stack/resilient/template-parts.cfg.in @@ -18,4 +18,4 @@ - {% endmacro %} \ No newline at end of file + {% endmacro %} -- 2.30.9