Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos
Commits
7d8082d6
Commit
7d8082d6
authored
Apr 21, 2016
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apache-frontend: Migrate to monitor2.
parent
bb6f4599
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
57 deletions
+34
-57
software/apache-frontend/common.cfg
software/apache-frontend/common.cfg
+4
-4
software/apache-frontend/instance-apache-frontend.cfg
software/apache-frontend/instance-apache-frontend.cfg
+10
-43
software/apache-frontend/instance-apache-replicate.cfg.in
software/apache-frontend/instance-apache-replicate.cfg.in
+17
-9
software/apache-frontend/instance.cfg
software/apache-frontend/instance.cfg
+2
-0
software/apache-frontend/templates/apache-custom-slave-list.cfg.in
...apache-frontend/templates/apache-custom-slave-list.cfg.in
+1
-1
No files found.
software/apache-frontend/common.cfg
View file @
7d8082d6
...
@@ -58,27 +58,27 @@ command =
...
@@ -58,27 +58,27 @@ command =
[template]
[template]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
url = ${:_profile_base_location_}/instance.cfg
md5sum =
16b22ef9b0476352e2e5b68f5966ce62
md5sum =
51752d0e4eae8c761750117c44983594
output = ${buildout:directory}/template.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
mode = 0644
[template-apache-frontend]
[template-apache-frontend]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-frontend.cfg
url = ${:_profile_base_location_}/instance-apache-frontend.cfg
md5sum = 0
0361d1e4a2788863de58e0ca9b6dfcf
md5sum = 0
7b6f864b46cb2f7b4b8aab71da95d13
output = ${buildout:directory}/template-apache-frontend.cfg
output = ${buildout:directory}/template-apache-frontend.cfg
mode = 0644
mode = 0644
[template-apache-replicate]
[template-apache-replicate]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-apache-replicate.cfg.in
url = ${:_profile_base_location_}/instance-apache-replicate.cfg.in
md5sum =
c495395bf4cae93ff665c5e74e6d4583
md5sum =
a05bc0f925902ddf0b4d12146b10c9e1
mode = 0644
mode = 0644
[template-slave-list]
[template-slave-list]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/apache-custom-slave-list.cfg.in
url = ${:_profile_base_location_}/templates/apache-custom-slave-list.cfg.in
md5sum =
f09759a0b68337d820c70e72afb4dbf9
md5sum =
c01c0ebb749d16bda4649bf42d36c7ea
mode = 640
mode = 640
[template-slave-configuration]
[template-slave-configuration]
...
...
software/apache-frontend/instance-apache-frontend.cfg
View file @
7d8082d6
...
@@ -33,28 +33,9 @@ parts =
...
@@ -33,28 +33,9 @@ parts =
trafficserver-storage-config
trafficserver-storage-config
trafficserver-promise-listen-port
trafficserver-promise-listen-port
## Monitoring part
###Parts to add for monitoring
certificate-authority
cron-entry-monitor
cron-entry-rss
deploy-index
deploy-settings-cgi
deploy-status-cgi
deploy-status-history-cgi
setup-static-files
certificate-authority
zero-parameters
public-symlink
cgi-httpd-wrapper
cgi-httpd-graceful-wrapper
monitor-promise
monitor-instance-log-access
## Monitor for apache
## Monitor for apache
monitor-current-log-access
monitor-base
monitor-backup-log-access
monitor-ats-cache-stats-wrapper
monitor-ats-cache-stats-wrapper
monitor-apache-configuration-verification
monitor-verify-re6st-connectivity
monitor-verify-re6st-connectivity
extends = ${monitor-template:output}
extends = ${monitor-template:output}
...
@@ -74,9 +55,9 @@ srv = $${buildout:directory}/srv/
...
@@ -74,9 +55,9 @@ srv = $${buildout:directory}/srv/
var = $${buildout:directory}/var/
var = $${buildout:directory}/var/
template = $${buildout:directory}/template/
template = $${buildout:directory}/template/
backup = $${
:srv}
/backup
backup = $${
buildout:directory}/srv
/backup
log = $${
:var}
/log
log = $${
buildout:directory}/var
/log
run = $${
:var}
/run
run = $${
buildout:directory}/var
/run
service = $${:etc}/service
service = $${:etc}/service
etc-run = $${:etc}/run
etc-run = $${:etc}/run
promise = $${:etc}/promise
promise = $${:etc}/promise
...
@@ -181,7 +162,7 @@ extra-context =
...
@@ -181,7 +162,7 @@ extra-context =
section logrotate_dict logrotate
section logrotate_dict logrotate
section frontend_configuration frontend-configuration
section frontend_configuration frontend-configuration
section apache_configuration apache-configuration
section apache_configuration apache-configuration
key monitor_
url monitor-parameters:url
key monitor_
base_url monitor-instance-parameter:monitor-base-url
[dynamic-custom-group-template-slave-list]
[dynamic-custom-group-template-slave-list]
< = jinja2-template-base
< = jinja2-template-base
...
@@ -633,19 +614,15 @@ frontend-name =
...
@@ -633,19 +614,15 @@ frontend-name =
# Monitoring sections
# Monitoring sections
#
#
[monitor-current-log-access]
[monitor-conf-parameters]
< = monitor-directory-access
private-path-list +=
source = $${directory:log}
$${directory:logrotate-backup}
[monitor-backup-log-access]
< = monitor-directory-access
source = $${directory:logrotate-backup}
# Produce ATS Cache stats
# Produce ATS Cache stats
[monitor-ats-cache-stats-wrapper]
[monitor-ats-cache-stats-wrapper]
< = jinja2-template-base
< = jinja2-template-base
template = ${template-wrapper:output}
template = ${template-wrapper:output}
rendered = $${monitor-directory:
monitoring-cgi
}/ats-cache-stats
rendered = $${monitor-directory:
report
}/ats-cache-stats
mode = 0700
mode = 0700
command = export TS_ROOT=$${buildout:directory} && echo "<pre>$(${trafficserver:location}/bin/traffic_shell $${monitor-ats-cache-stats-config:rendered})</pre>"
command = export TS_ROOT=$${buildout:directory} && echo "<pre>$(${trafficserver:location}/bin/traffic_shell $${monitor-ats-cache-stats-config:rendered})</pre>"
extra-context =
extra-context =
...
@@ -659,19 +636,9 @@ mode = 644
...
@@ -659,19 +636,9 @@ mode = 644
context =
context =
raw content show:cache-stats
raw content show:cache-stats
# Display result of apache configuration check
[monitor-apache-configuration-verification]
< = jinja2-template-base
template = ${template-wrapper:output}
rendered = $${monitor-directory:monitoring-cgi}/front-httpd-configuration
mode = 0700
command = echo "<pre>$($${apache-configuration:frontend-configuration-verification})</pre>"
extra-context =
key content :command
[monitor-verify-re6st-connectivity]
[monitor-verify-re6st-connectivity]
recipe = slapos.cookbook:check_url_available
recipe = slapos.cookbook:check_url_available
path = $${
monitor-directory:monitor-custom-scripts
}/re6st-connectivity
path = $${
directory:promise
}/re6st-connectivity
url = $${public:re6st-verification-url}
url = $${public:re6st-verification-url}
dash_path = ${dash:location}/bin/dash
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
curl_path = ${curl:location}/bin/curl
...
...
software/apache-frontend/instance-apache-replicate.cfg.in
View file @
7d8082d6
...
@@ -80,6 +80,10 @@ context =
...
@@ -80,6 +80,10 @@ context =
[replicate]
[replicate]
<= slap-connection
<= slap-connection
recipe = slapos.cookbook:requestoptional
recipe = slapos.cookbook:requestoptional
config-monitor-cors-domains = {{ slapparameter_dict.get('monitor-cors-domains', 'monitor.app.officejs.com') }}
config-monitor-username = ${monitor-htpasswd:username}
config-monitor-password = ${monitor-htpasswd:passwd}
{% set frontend_software_url_key = "-frontend-software-release-url" %}
{% set frontend_software_url_key = "-frontend-software-release-url" %}
{% if slapparameter_dict.has_key(frontend_software_url_key) %}
{% if slapparameter_dict.has_key(frontend_software_url_key) %}
software-url = {{ slapparameter_dict.pop(frontend_software_url_key) }}
software-url = {{ slapparameter_dict.pop(frontend_software_url_key) }}
...
@@ -87,8 +91,7 @@ software-url = {{ slapparameter_dict.pop(frontend_software_url_key) }}
...
@@ -87,8 +91,7 @@ software-url = {{ slapparameter_dict.pop(frontend_software_url_key) }}
software-url = ${slap-connection:software-release-url}
software-url = ${slap-connection:software-release-url}
{% endif %}
{% endif %}
software-type = {{frontend_type}}
software-type = {{frontend_type}}
return = private-ipv4 public-ipv4 slave-instance-information-list monitor_url
return = private-ipv4 public-ipv4 slave-instance-information-list monitor-base-url
connection-monitor_url =
{% for section, frontend_request in request_dict.iteritems() %}
{% for section, frontend_request in request_dict.iteritems() %}
[{{section}}]
[{{section}}]
...
@@ -117,13 +120,10 @@ slave-amount = {{ slave_instance_list | length }}
...
@@ -117,13 +120,10 @@ slave-amount = {{ slave_instance_list | length }}
accepted-slave-amount = {{ authorized_slave_list | length }}
accepted-slave-amount = {{ authorized_slave_list | length }}
rejected-slave-amount = {{ rejected_slave_list | length }}
rejected-slave-amount = {{ rejected_slave_list | length }}
rejected-slave-list = {{ json_module.dumps(rejected_slave_list) }}
rejected-slave-list = {{ json_module.dumps(rejected_slave_list) }}
{% for frontend in frontend_section_list %}
monitor-base-url = ${monitor-conf-parameters:base-url}
{{ frontend }}-monitor-url = {{ '${' + frontend + ':connection-monitor_url}' }}
monitor-url = ${:monitor-base-url}/public/feeds
{% endfor -%}
monitor-user = ${monitor-instance-parameter:username}
{% for frontend in frontend_list -%}
monitor-password = ${monitor-instance-parameter:password}
#{{frontend}}-private-ipv4 = ${request-{{frontend}}:private-ipv4}
{% endfor -%}
#----------------------------
#----------------------------
#--
#--
...
@@ -149,8 +149,16 @@ extensions = jinja2.ext.do
...
@@ -149,8 +149,16 @@ extensions = jinja2.ext.do
extra-context =
extra-context =
section slave_information slave-information
section slave_information slave-information
[monitor-conf-parameters]
monitor-url-list +=
{% for frontend in frontend_section_list %}
{{ ' ${' + frontend + ':connection-monitor-base-url}' }}
{% endfor -%}
[buildout]
[buildout]
extends = {{ template_monitor }}
parts =
parts =
monitor-base
publish-slave-information
publish-slave-information
publish-information
publish-information
{% for part in part_list -%}
{% for part in part_list -%}
...
...
software/apache-frontend/instance.cfg
View file @
7d8082d6
...
@@ -48,3 +48,5 @@ extra-context =
...
@@ -48,3 +48,5 @@ extra-context =
raw template_publish_slave_information ${template-replicate-publish-slave-information:target}
raw template_publish_slave_information ${template-replicate-publish-slave-information:target}
# 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-custom-group-replicate
raw software_type RootSoftwareInstance-default-custom-personal-custom-group-replicate
raw template_monitor ${monitor2-template:rendered}
software/apache-frontend/templates/apache-custom-slave-list.cfg.in
View file @
7d8082d6
...
@@ -262,7 +262,7 @@ private-ipv4 = {{ local_ipv4 }}
...
@@ -262,7 +262,7 @@ private-ipv4 = {{ local_ipv4 }}
{% if extra_slave_instance_list -%}
{% if extra_slave_instance_list -%}
slave-instance-information-list = {{ json_module.dumps(slave_instance_information_list) }}
slave-instance-information-list = {{ json_module.dumps(slave_instance_information_list) }}
{% endif -%}
{% endif -%}
monitor
_url = {{ monitor
_url }}
monitor
-base-url = {{ monitor_base
_url }}
[buildout]
[buildout]
parts +=
parts +=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment