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