Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
Lisa Casino
slapos.package
Commits
454e88c2
Commit
454e88c2
authored
Jan 09, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automate SlapOS master Installation.
/reviewed-on
!36
parent
8f6fe0be
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
24 deletions
+51
-24
playbook/roles/standalone-shared/templates/request-slapos-master-frontend.j2
...dalone-shared/templates/request-slapos-master-frontend.j2
+26
-0
playbook/roles/standalone-shared/templates/request-slapos-master.j2
...oles/standalone-shared/templates/request-slapos-master.j2
+23
-23
playbook/slapos-master-standalone.yml
playbook/slapos-master-standalone.yml
+2
-1
No files found.
playbook/roles/standalone-shared/templates/request-slapos-master-frontend.j2
0 → 100644
View file @
454e88c2
computer_id = 'local_computer'
frontend_software_release_url = '{{ frontend_software_release_url }}'
supply(frontend_software_release_url, computer_id)
# frontend master partition
request(software_release=frontend_software_release_url, partition_reference='{{ frontend_master_reference }}')
# frontend slave partition
backend_url = None
try:
backend_url = open('{{ backend_url_path }}', 'r').read()
except Exception:
pass
if backend_url is not None:
request(
software_release=frontend_software_release_url,
partition_reference='{{ frontend_slave_reference }}',
shared=True,
partition_parameter_kw={
'url': backend_url,
'type': 'zope',
'custom_domain': '{{ ansible_default_ipv4.address }}',
'server-alias': '*',
'https-only': 'true'
}
)
playbook/roles/standalone-shared/templates/request-slapos-master.j2
View file @
454e88c2
...
...
@@ -10,16 +10,20 @@ supply(software_url, computer_id)
parameter_dict = {
"timezone": "UTC",
"site-id": "erp5",
"bt5": "erp5_full_text_myisam_catalog slapos_configurator",
"developer-list": ["zope"],
"inituser-login": "zope",
"inituser-password": "insecure",
"bt5": "{{ bt5_list }}",
"zope-partition-dict": {
"admin": {
"family": "admin",
"thread-amount": 4,
"port-base": 2220,
"instance-count": 1
},
"activities-node": {
"family": "activities",
"thread-amount":
3
,
"thread-amount":
4
,
"instance-count": 1,
"timerserver-interval": 1
"timerserver-interval": 1,
"port-base": 2230
},
"distribution-node": {
"family": "distribution",
...
...
@@ -28,31 +32,21 @@ parameter_dict = {
"port-base": 2210,
"timerserver-interval": 1
},
"admin-node": {
"family": "admin",
"thread-amount": 1,
"instance-count": 1,
"port-base": 2220
},
"web-node": {
"family": "web",
"thread-amount": 2,
"instance-count": 1,
"port-base": 22
3
0
"port-base": 22
4
0
},
"service-slapos": {
"family": "service",
"thread-amount": 2,
"instance-count": 1,
"port-base": 22
4
0,
"port-base": 22
5
0,
"ssl-authentication": True,
"backend-path": "/%(site-id)s/portal_slap"
}
},
"mariadb": {
"test-database-amount": 0
},
"zodb-software-type": "zeo"
}
}
ca_path = '/etc/slapos-ssl'
...
...
@@ -61,11 +55,17 @@ parameter_dict["shared-certificate-authority-path"] = ca_path
# Choose a title
title = "instance-of-{{ playbook_name }}"
request(software_url,
erp5_instance =
request(software_url,
title,
filter_kw={'computer_guid': computer_id},
software_type='
create-erp5-site
',
software_type='
default
',
partition_parameter_kw={
'_': json.dumps(parameter_dict, sort_keys=True, indent=2),
}
)
).getConnectionParameterDict()
if '_' in erp5_instance:
backend_dict = json.loads(erp5_instance['_'])
if 'family-admin-v6' in backend_dict:
backend_url = str(backend_dict['family-admin-v6'])
open('{{ backend_url_path }}', 'w').write(backend_url)
playbook/slapos-master-standalone.yml
View file @
454e88c2
...
...
@@ -3,7 +3,8 @@
connection
:
local
vars
:
software_release_url
:
https://lab.node.vifib.com/nexedi/slapos/raw/1.0.21/software/slapos-master/software.cfg
software_release_url
:
https://lab.node.vifib.com/nexedi/slapos/raw/1.0.56/software/slapos-master/software.cfg
bt5_list
:
erp5_full_text_myisam_catalog slapos_configurator
startup_playbook_id
:
slapos-master-standalone.yml
playbook_name
:
slapos-master
request_instance_template
:
request-slapos-master.j2
...
...
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