Commit b70d0725 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Rename instance helper module

Attention, this change will require manual intervention on the upgraded
cluster with:

sed -i 's/^recipe = caddyprofiledeps/recipe = software/g' .installed*

On each partition.
parent fb41ee6f
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = adacc6cedd88addedb75726f373ac493 md5sum = e4d2e7e3c8f0c827bfee34add24f1902
[profile-common] [profile-common]
filename = instance-common.cfg.in filename = instance-common.cfg.in
...@@ -22,11 +22,11 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68 ...@@ -22,11 +22,11 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-frontend] [profile-frontend]
filename = instance-frontend.cfg.in filename = instance-frontend.cfg.in
md5sum = 204ea7abf93694cf3b0f1a08dcd57256 md5sum = 3bd9eecc14b13c02de425a411a351c6a
[profile-master] [profile-master]
filename = instance-master.cfg.in filename = instance-master.cfg.in
md5sum = 69f38298337aff987eb9b46fc22ec3d4 md5sum = 11a4000544e7fa6ca6b0b700790f8d32
[profile-slave-list] [profile-slave-list]
filename = instance-slave-list.cfg.in filename = instance-slave-list.cfg.in
...@@ -92,12 +92,12 @@ md5sum = 4d2537d2698d32a7e909989f8778d144 ...@@ -92,12 +92,12 @@ md5sum = 4d2537d2698d32a7e909989f8778d144
_update_hash_filename_ = templates/rotate-script.sh.in _update_hash_filename_ = templates/rotate-script.sh.in
md5sum = 8c150e1e6c993708d31936742f3a7302 md5sum = 8c150e1e6c993708d31936742f3a7302
[caddyprofiledeps-setup] [software-setup]
filename = setup.py filename = setup.py
md5sum = f6f72d03af7d9dc29fb4d4fef1062e73 md5sum = 04bc664aa0159acaafec49a6bc36e84b
[caddyprofiledeps-dummy] [software-py]
filename = caddyprofiledummy.py filename = software.py
md5sum = e82ccdb0b26552a1c88ff523d8fae24a md5sum = e82ccdb0b26552a1c88ff523d8fae24a
[profile-kedifa] [profile-kedifa]
......
...@@ -10,7 +10,7 @@ parts = ...@@ -10,7 +10,7 @@ parts =
directory directory
logrotate-entry-caddy logrotate-entry-caddy
caddy-frontend caddy-frontend
caddyprofiledeps software-py
switch-frontend-softwaretype switch-frontend-softwaretype
caucase-updater caucase-updater
caucase-updater-promise caucase-updater-promise
...@@ -60,8 +60,8 @@ parts = ...@@ -60,8 +60,8 @@ parts =
logrotate-entry-slave-introspection logrotate-entry-slave-introspection
backend-haproxy-statistic-frontend-promise backend-haproxy-statistic-frontend-promise
[caddyprofiledeps] [software-py]
recipe = caddyprofiledeps recipe = software
[frontend-node-id] [frontend-node-id]
# Store id file in top of hierarchy, so it does not depend on directory creation # Store id file in top of hierarchy, so it does not depend on directory creation
...@@ -347,7 +347,7 @@ stop-on-error = True ...@@ -347,7 +347,7 @@ stop-on-error = True
[dynamic-custom-personal-profile-slave-list] [dynamic-custom-personal-profile-slave-list]
< = jinja2-template-base < = jinja2-template-base
depends = ${caddyprofiledeps:recipe} depends = ${software-py:recipe}
url = {{ software_parameter_dict['profile_slave_list'] }} url = {{ software_parameter_dict['profile_slave_list'] }}
filename = instance-slave-list.cfg filename = instance-slave-list.cfg
master_key_download_url = {{ dumps(slapparameter_dict['master-key-download-url']) }} master_key_download_url = {{ dumps(slapparameter_dict['master-key-download-url']) }}
......
...@@ -271,7 +271,7 @@ context = ...@@ -271,7 +271,7 @@ context =
{% for url_key in ['url-netloc-list', 'https-url-netloc-list', 'health-check-failover-url-netloc-list'] %} {% for url_key in ['url-netloc-list', 'https-url-netloc-list', 'health-check-failover-url-netloc-list'] %}
{% if url_key in slave %} {% if url_key in slave %}
{% for netloc in slave[url_key].split() %} {% for netloc in slave[url_key].split() %}
{% if not caddyprofiledummy.validate_netloc(netloc) %} {% if not software.validate_netloc(netloc) %}
{% do slave_error_list.append('slave %s %r invalid' % (url_key, netloc)) %} {% do slave_error_list.append('slave %s %r invalid' % (url_key, netloc)) %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
extends = {{ software_parameter_dict['profile_common'] }} extends = {{ software_parameter_dict['profile_common'] }}
parts = parts =
caddyprofiledeps software-py
switch-softwaretype switch-softwaretype
[caddyprofiledeps] [software-py]
recipe = caddyprofiledeps recipe = software
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -48,7 +48,7 @@ extra-context = ...@@ -48,7 +48,7 @@ extra-context =
[dynamic-profile-master] [dynamic-profile-master]
< = jinja2-template-base < = jinja2-template-base
depends = ${caddyprofiledeps:recipe} depends = ${software-py:recipe}
url = {{ software_parameter_dict['profile_master'] }} url = {{ software_parameter_dict['profile_master'] }}
filename = instance-master.cfg filename = instance-master.cfg
extra-context = extra-context =
...@@ -56,7 +56,7 @@ extra-context = ...@@ -56,7 +56,7 @@ extra-context =
import functools_module functools import functools_module functools
import operator_module operator import operator_module operator
import validators validators import validators validators
import caddyprofiledummy caddyprofiledummy import software software
# Must match the key id in [switch-softwaretype] which uses this section. # Must match the key id in [switch-softwaretype] which uses this section.
raw software_type RootSoftwareInstance-default-custom-personal-replicate raw software_type RootSoftwareInstance-default-custom-personal-replicate
......
# The caddyprofiledeps egg allows to set dependecies of the Caddy profiles # * sets additional dependencies for the instance processing
# which are enabled during the instance run, thanks to using caddyprofiledeps # * provides instance's importable specific code
# recipe
from setuptools import setup from setuptools import setup
setup( setup(
name='caddyprofiledeps', name='software',
install_requires=[ install_requires=[
'validators', 'validators',
'furl', 'furl',
...@@ -14,11 +13,11 @@ setup( ...@@ -14,11 +13,11 @@ setup(
], ],
entry_points={ entry_points={
'zc.buildout': [ 'zc.buildout': [
'default = caddyprofiledummy:Recipe', 'default = software:Recipe',
], ],
'console_scripts': [ 'console_scripts': [
'smart-caucase-signer = caddyprofiledummy:smart_sign', 'smart-caucase-signer = software:smart_sign',
'caucase-csr-sign-check = caddyprofiledummy:caucase_csr_sign_check' 'caucase-csr-sign-check = software:caucase_csr_sign_check'
] ]
} }
) )
...@@ -19,7 +19,7 @@ extends = ...@@ -19,7 +19,7 @@ extends =
parts += parts +=
caucase-eggs caucase-eggs
template template
caddyprofiledeps software-install
kedifa kedifa
[kedifa] [kedifa]
...@@ -28,15 +28,15 @@ eggs = ...@@ -28,15 +28,15 @@ eggs =
${python-cryptography:egg} ${python-cryptography:egg}
kedifa kedifa
[caddyprofiledeps-setup] [software-setup]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/setup.py url = ${:_profile_base_location_}/setup.py
[caddyprofiledeps-dummy] [software-py]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/caddyprofiledummy.py url = ${:_profile_base_location_}/software.py
[caddyprofiledeps-prepare] [software-prepare]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = True stop-on-error = True
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
...@@ -44,18 +44,18 @@ update-command = ${:command} ...@@ -44,18 +44,18 @@ update-command = ${:command}
command = command =
rm -fr ${:location} && rm -fr ${:location} &&
mkdir -p ${:location} && mkdir -p ${:location} &&
cp ${caddyprofiledeps-setup:target} ${:location}/ && cp ${software-setup:target} ${:location}/ &&
cp ${caddyprofiledeps-dummy:target} ${:location}/ cp ${software-py:target} ${:location}/
[caddyprofiledeps-develop] [software-develop]
recipe = zc.recipe.egg:develop recipe = zc.recipe.egg:develop
setup = ${caddyprofiledeps-prepare:location} setup = ${software-prepare:location}
[caddyprofiledeps] [software-install]
depends = ${caddyprofiledeps-develop:recipe} depends = ${software-develop:recipe}
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
caddyprofiledeps software
websockify websockify
[profile-common] [profile-common]
......
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