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
Eric Zheng
slapos
Commits
feee614d
Commit
feee614d
authored
Jan 09, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 1.0
Conflicts: stack/slapos.cfg
parents
cac1bba1
8bc27e68
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
90 additions
and
50 deletions
+90
-50
CHANGES.rst
CHANGES.rst
+5
-0
setup.py
setup.py
+1
-1
slapos/recipe/check_url_available/__init__.py
slapos/recipe/check_url_available/__init__.py
+3
-0
slapos/recipe/check_url_available/template/check_url.in
slapos/recipe/check_url_available/template/check_url.in
+12
-1
software/agent/software.cfg
software/agent/software.cfg
+7
-7
software/apache-frontend/software.cfg
software/apache-frontend/software.cfg
+8
-8
software/gitlab/software.cfg
software/gitlab/software.cfg
+4
-0
software/kvm/software.cfg
software/kvm/software.cfg
+1
-1
software/monitor/instance-monitor.cfg.jinja2
software/monitor/instance-monitor.cfg.jinja2
+0
-12
software/monitor/software.cfg
software/monitor/software.cfg
+7
-1
software/neoppod/software-common.cfg
software/neoppod/software-common.cfg
+2
-2
software/re6stnet/software.cfg
software/re6stnet/software.cfg
+7
-7
software/slaprunner/common.cfg
software/slaprunner/common.cfg
+1
-1
software/slaprunner/software.cfg
software/slaprunner/software.cfg
+1
-1
software/slaprunner/template/runner-export.sh.jinja2
software/slaprunner/template/runner-export.sh.jinja2
+3
-2
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+2
-2
stack/monitor/instance-monitor.cfg.jinja2.in
stack/monitor/instance-monitor.cfg.jinja2.in
+23
-1
stack/slapos.cfg
stack/slapos.cfg
+3
-3
No files found.
CHANGES.rst
View file @
feee614d
Changes
=======
1.0.45 (2017-01-09)
-------------------
* recipe: set default timeout of check url promise to 20 seconds
1.0.44 (2016-12-30)
-------------------
...
...
setup.py
View file @
feee614d
...
...
@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import
glob
import
os
version
=
'1.0.4
4
'
version
=
'1.0.4
5
'
name
=
'slapos.cookbook'
long_description
=
open
(
"README.rst"
).
read
()
+
"
\
n
"
+
\
open
(
"CHANGES.rst"
).
read
()
+
"
\
n
"
...
...
slapos/recipe/check_url_available/__init__.py
View file @
feee614d
...
...
@@ -26,6 +26,7 @@
##############################################################################
from
slapos.recipe.librecipe
import
GenericBaseRecipe
import
sys
import
os
class
Recipe
(
GenericBaseRecipe
):
"""
...
...
@@ -33,12 +34,14 @@ class Recipe(GenericBaseRecipe):
"""
def
install
(
self
):
timeout_file
=
os
.
path
.
join
(
os
.
getcwd
(),
'etc/promise_timeout'
)
config
=
{
'url'
:
self
.
options
[
'url'
],
'shell_path'
:
self
.
options
[
'dash_path'
],
'curl_path'
:
self
.
options
[
'curl_path'
],
'check_secure'
:
self
.
options
.
get
(
'check-secure'
,
0
),
'http_code'
:
self
.
options
.
get
(
'http_code'
,
'200'
),
'time_out'
:
self
.
options
.
get
(
'timeout-file-path'
,
timeout_file
),
}
# XXX-Cedric in this script, curl won't check certificate
...
...
slapos/recipe/check_url_available/template/check_url.in
View file @
feee614d
...
...
@@ -3,13 +3,24 @@
# BEWARE: It will be overwritten automatically
URL="%(url)s"
F_TIMEOUT="%(time_out)s"
TIMEOUT=20
if [ -z "$URL" ]; then
echo "No URL specified." >&2
exit 3
fi
CODE=$(%(curl_path)s -g -k -sL $URL -w %%{http_code} --max-time 10 -o /dev/null)
if [ -s "$F_TIMEOUT" ]; then
TIMEOUT=$(cat $F_TIMEOUT)
result=$(echo $TIMEOUT | grep -E ^[0-9]+$)
if [ -z $result ]; then
# Not an integer
TIMEOUT=20
fi
fi
CODE=$(%(curl_path)s -g -k -sL $URL -w %%{http_code} --max-time $TIMEOUT -o /dev/null)
if [ $? -eq 3 ]; then
echo "URL malformed: $URL." >&2
...
...
software/agent/software.cfg
View file @
feee614d
...
...
@@ -51,29 +51,29 @@ pycrypto = 2.6.1
pycurl = 7.43.0
slapos.recipe.download = 1.0
slapos.recipe.template = 2.8
slapos.toolbox = 0.6
2
slapos.toolbox = 0.6
3
smmap = 0.9.0
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
GitPython = 2.0.8
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
atomize = 0.2.0
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
feedparser = 5.2.1
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
lockfile = 0.12.2
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
paramiko = 2.0.1
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
rpdb = 0.1.5
software/apache-frontend/software.cfg
View file @
feee614d
...
...
@@ -15,7 +15,7 @@ plone.recipe.command = 1.1
pycrypto = 2.6.1
rdiff-backup = 1.0.5
slapos.recipe.template = 2.8
slapos.toolbox = 0.6
2
slapos.toolbox = 0.6
3
smmap = 0.9.0
numpy = 1.11.2
...
...
@@ -34,29 +34,29 @@ erp5.util = 0.4.46
passlib = 1.6.5
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
GitPython = 2.0.8
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
atomize = 0.2.0
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
feedparser = 5.2.1
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
lockfile = 0.12.2
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
paramiko = 2.0.1
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
pycurl = 7.43.0
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
rpdb = 0.1.5
software/gitlab/software.cfg
View file @
feee614d
...
...
@@ -62,6 +62,10 @@ parts =
[slapos.cookbook-repository]
revision = 571d6514f7290e8faa9439c4b86aa2f6c87df261
[git]
# TODO stop using custom git revision once git 2.11 is supported by Gitlab
url = https://www.kernel.org/pub/software/scm/git/git-2.10.2.tar.xz
md5sum = 3cd1dca37be60668f482545716923b72
############################
# Software compilation #
...
...
software/kvm/software.cfg
View file @
feee614d
...
...
@@ -5,7 +5,7 @@ extends = common.cfg
# XXX - use websockify = 0.5.1 for compatibility with kvm frontend
websockify = 0.5.1
slapos.toolbox = 0.6
2
slapos.toolbox = 0.6
3
erp5.util = 0.4.46
apache-libcloud = 1.1.0
collective.recipe.environment = 0.2.0
...
...
software/monitor/instance-monitor.cfg.jinja2
View file @
feee614d
...
...
@@ -10,7 +10,6 @@ parts =
monitor-collect-csv-wrapper
fluentd-wrapper
monitor-base
promise-check-slapgrid
publish-connection-information
...
...
@@ -106,17 +105,6 @@ recipe = slapos.cookbook:publish
monitor-setup-url = https://monitor.app.officejs.com/#page=settings_configurator&url=${publish:monitor-url}&username=${publish:monitor-user}&password=${publish:monitor-password}
server_log_url = ${publish:monitor-base-url}/${slap-configuration:private-hash}/
[promise-check-slapgrid]
recipe = collective.recipe.template
error-log-file = ${buildout:directory}/.slapgrid-${slap-connection:partition-id}-error.log
input = inline:#!/bin/sh
if [ -f "${:error-log-file}" ]; then
>&2 cat ${:error-log-file}
exit 1
fi
output = ${monitor-directory:promises}/slapgrid-${slap-connection:partition-id}-status
mode = 700
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id}
...
...
software/monitor/software.cfg
View file @
feee614d
...
...
@@ -32,7 +32,7 @@ mode = 0644
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-monitor.cfg.jinja2
destination = ${buildout:directory}/template-base-monitor.cfg
md5sum =
ec16fdaa0e6e13dcc7d3007908182c20
md5sum =
20738a1b16de234e8bb7e88c822552b9
mode = 0644
[template-monitor-distributor]
...
...
@@ -90,6 +90,12 @@ eggs +=
scripts =
networkbench
onetimedownload
monitor.bootstrap
monitor.collect
monitor.runpromise
monitor.genstatus
monitor.genrss
monitor.configwrite
[fluentd]
gems +=
...
...
software/neoppod/software-common.cfg
View file @
feee614d
...
...
@@ -113,8 +113,8 @@ transaction = 1.7.0
zdaemon = 4.1.0
zodbpickle = 0.6.0
zodbtools = 0.0.0.dev3
# Required by slapos.toolbox = 0.6
2
slapos.toolbox = 0.6
2
# Required by slapos.toolbox = 0.6
3
slapos.toolbox = 0.6
3
PyRSS2Gen = 1.1
apache-libcloud = 1.2.1
atomize = 0.2.0
...
...
software/re6stnet/software.cfg
View file @
feee614d
...
...
@@ -115,15 +115,15 @@ plone.recipe.command = 1.1
pycrypto = 2.6.1
pycurl = 7.43.0
slapos.recipe.template = 2.7
slapos.toolbox = 0.6
2
slapos.toolbox = 0.6
3
smmap = 0.9.0
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
GitPython = 2.0.8
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
atomize = 0.2.0
# Required by:
...
...
@@ -131,11 +131,11 @@ atomize = 0.2.0
backports.ssl-match-hostname = 3.4.0.2
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
feedparser = 5.1.3
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
lockfile = 0.12.2
# Required by:
...
...
@@ -143,10 +143,10 @@ lockfile = 0.12.2
miniupnpc = 1.9
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
paramiko = 2.0.1
# Required by:
# slapos.toolbox = 0.6
2
# slapos.toolbox = 0.6
3
rpdb = 0.1.5
software/slaprunner/common.cfg
View file @
feee614d
...
...
@@ -84,7 +84,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/template/runner-export.sh.jinja2
download-only = true
md5sum =
e2d472ade09c11c70dbea080932e80bd
md5sum =
2e96b9daa5cd20fc77e9573a9ce3fe52
filename = runner-export.sh.jinja2
mode = 0644
...
...
software/slaprunner/software.cfg
View file @
feee614d
...
...
@@ -17,7 +17,7 @@ gunicorn = 19.4.5
prettytable = 0.7.2
pycurl = 7.43.0
slapos.recipe.template = 2.9
slapos.toolbox = 0.6
2
slapos.toolbox = 0.6
3
smmap = 0.9.0
# Required by:
...
...
software/slaprunner/template/runner-export.sh.jinja2
View file @
feee614d
...
...
@@ -72,8 +72,9 @@ remove_tmp_files () {
}
trap remove_tmp_files EXIT
cd $srv_directory
# Getting files from runner backup directory, as instance backup files may be
# explicitely excluded from the backup, using the srv/exporter.exclude
cd {{ directory['backup'] }}
backup_directory_path=$(find . -path "./runner/instance/slappart*/srv/backup/*" -type f)
# If no backup found, it's over
...
...
stack/monitor/buildout.cfg
View file @
feee614d
...
...
@@ -96,7 +96,7 @@ recipe = slapos.recipe.template:jinja2
filename = template-monitor.cfg
template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in
rendered = ${buildout:directory}/template-monitor.cfg
md5sum =
5b6b7a96bfa1e0ca83310caa48ed7b2
0
md5sum =
04b4555615c48fb615dd452294c185e
0
context =
key apache_location apache:location
key gzip_location gzip:location
...
...
@@ -125,5 +125,5 @@ depends =
PyRSS2Gen = 1.1
cns.recipe.symlink = 0.2.3
pycurl = 7.43.0
slapos.toolbox = 0.6
2
slapos.toolbox = 0.6
3
stack/monitor/instance-monitor.cfg.jinja2.in
View file @
feee614d
...
...
@@ -138,6 +138,7 @@ logrotate-folder = ${logrotate:logrotate-entries}
promise-runner = {{ monitor_runpromise }}
promise-folder = ${directory:promises}
monitor-promise-folder = ${monitor-directory:promises}
promises-timeout-file = ${monitor-promise-timeout-file:file}
pid-file = ${monitor-directory:pids}/monitor-bootstrap.pid
public-path-list =
...
...
@@ -152,6 +153,7 @@ parameter-file-path = ${monitor-instance-parameter:configuration-file-path}
parameter-list =
raw monitor-user ${monitor-instance-parameter:username}
htpasswd monitor-password ${monitor-htpassword-file:password-file} ${monitor-instance-parameter:username} ${httpd-monitor-htpasswd:htpasswd-path}
file promise-timeout ${monitor-promise-timeout-file:file}
${monitor-instance-parameter:instance-configuration}
# htpasswd entry: htpasswd key password-file username htpasswd-file
...
...
@@ -161,6 +163,14 @@ python = {{ python_with_eggs }}
promise-output-file = ${directory:monitor}/monitor-bootstrap-status
[monitor-promise-timeout-file]
recipe = plone.recipe.command
file = ${directory:etc}/promise_timeout
command =
if [ ! -s "${:file}" ]; then
echo "20" > ${:file}
fi
[monitor-conf]
recipe = slapos.recipe.template:jinja2
template = {{ monitor_conf_template }}
...
...
@@ -390,6 +400,17 @@ input = inline:#!{{ dash_executable_location }}
output = ${directory:promises}/monitor-bootstrap-status
mode = 700
[promise-check-slapgrid]
recipe = collective.recipe.template
error-log-file = ${buildout:directory}/.slapgrid-${slap-connection:partition-id}-error.log
input = inline:#!/bin/sh
if [ -f "${:error-log-file}" ]; then
>&2 cat ${:error-log-file}
exit 1
fi
output = ${monitor-directory:promises}/buildout-${slap-connection:partition-id}-status
mode = 700
[monitor-base]
# create dependencies between required monitor parts
recipe = plone.recipe.command
...
...
@@ -407,6 +428,7 @@ depends =
${monitor-httpd-promise:filename}
${monitor-status2rss-cron-entry:name}
${monitor-bootstrap-promise:file}
${promise-check-slapgrid:output}
[monitor-publish]
monitor-base-url = ${publish:monitor-base-url}
...
...
stack/slapos.cfg
View file @
feee614d
...
...
@@ -133,7 +133,7 @@ pytz = 2016.7
requests = 2.11.1
setuptools = 19.6.2
six = 1.10.0
slapos.cookbook = 1.0.4
4
slapos.cookbook = 1.0.4
5
slapos.core = 1.3.18
slapos.extension.strip = 0.1
slapos.libnetworkcache = 0.14.5
...
...
@@ -164,11 +164,11 @@ functools32 = 3.2.3.post2
ipaddress = 1.0.17
# Required by:
# slapos.cookbook==1.0.4
4
# slapos.cookbook==1.0.4
5
jsonschema = 2.5.1
# Required by:
# slapos.cookbook==1.0.4
4
# slapos.cookbook==1.0.4
5
lock-file = 2.0
# Required by:
...
...
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