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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
slapos.package
Commits
a6e9add6
Commit
a6e9add6
authored
Jul 01, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify erp5-standalone and wendeling-standalone
parent
4c2d4f6e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
63 additions
and
86 deletions
+63
-86
playbook/erp5-standalone.yml
playbook/erp5-standalone.yml
+5
-3
playbook/roles/erp5-standalone/files/erp5-startup
playbook/roles/erp5-standalone/files/erp5-startup
+0
-10
playbook/roles/erp5-standalone/tasks/main.yml
playbook/roles/erp5-standalone/tasks/main.yml
+2
-26
playbook/roles/standalone-shared/tasks/main.yml
playbook/roles/standalone-shared/tasks/main.yml
+27
-1
playbook/roles/standalone-shared/templates/request-erp5.j2
playbook/roles/standalone-shared/templates/request-erp5.j2
+5
-2
playbook/roles/standalone-shared/templates/request-wendelin.j2
...ook/roles/standalone-shared/templates/request-wendelin.j2
+14
-0
playbook/roles/standalone-shared/templates/start-script.j2
playbook/roles/standalone-shared/templates/start-script.j2
+6
-0
playbook/roles/wendelin-standalone/files/wendelin-startup
playbook/roles/wendelin-standalone/files/wendelin-startup
+0
-9
playbook/roles/wendelin-standalone/meta/main.yml
playbook/roles/wendelin-standalone/meta/main.yml
+0
-3
playbook/roles/wendelin-standalone/tasks/main.yml
playbook/roles/wendelin-standalone/tasks/main.yml
+0
-30
playbook/wendelin-standalone.yml
playbook/wendelin-standalone.yml
+4
-2
No files found.
playbook/erp5-standalone.yml
View file @
a6e9add6
...
@@ -3,8 +3,10 @@
...
@@ -3,8 +3,10 @@
connection
:
local
connection
:
local
vars
:
vars
:
software_release_url
:
https://lab.nexedi.cn/nexedi/slapos/raw/erp5-cluster-0.1/software/erp5/software.cfg
software_release_url
:
https://lab.nexedi.cn/nexedi/slapos/raw/erp5-cluster-0.1.1/software/erp5/software.cfg
startup_playbook_id
:
erp5-standalone.yml
playbook_name
:
erp5
request_instance_template
:
request-erp5-cluster.j2
roles
:
roles
:
-
erp5-standalone
-
standalone-shared
playbook/roles/erp5-standalone/files/erp5-startup
deleted
100644 → 0
View file @
4c2d4f6e
#!/bin/bash
# Reruns the ansible playbook, does nothing else
PLAYBOOK_ROOT
=
/opt/slapos.playbook/playbook/
PLAYBOOK_FILE
=
erp5-standalone.yml
cd
$PLAYBOOK_ROOT
# cd into the playbook directory
echo
"Starting Ansible playbook:"
ansible-playbook
$PLAYBOOK_FILE
-i
hosts
--connection
=
local
playbook/roles/erp5-standalone/tasks/main.yml
View file @
a6e9add6
---
---
-
name
:
Supply erp5 software release
shell
:
slapos supply {{ software_release_url }} local_computer
-
name
:
create partition script
-
name
:
create partition script
copy
:
src=request-erp5-cluster
dest=/tmp/playbook-request-erp5-cluster mode=700
template
:
src=request-instance.j2
dest=/tmp/playbook-request-erp5-cluster mode=700
-
name
:
Request ERP5 Cluster
-
name
:
Supply and
Request ERP5 Cluster
shell
:
cat /tmp/playbook-request-erp5-cluster | slapos console
shell
:
cat /tmp/playbook-request-erp5-cluster | slapos console
-
name
:
Add startup script
copy
:
src=erp5-startup dest=/usr/local/bin/erp5-startup mode=755
-
name
:
Add to rc.local
lineinfile
:
dest=/etc/rc.local insertbefore=BOF
line='bash /usr/local/bin/erp5-startup &'
state=present
-
name
:
Get slapos.playbook directory name
shell
:
cd /tmp/tmpplaybookerp5-standalone.*/slapos.playbook.git/playbook/; echo $(pwd)/
register
:
tmp_dir
-
name
:
Check if /opt/slapos.playbook already exists
stat
:
path=/opt/slapos.playbook/
register
:
playbook_state
-
name
:
Copy slapos.playbook
copy
:
src={{ tmp_dir.stdout }} dest=/opt/slapos.playbook/
when
:
playbook_state.stat.exists == False
playbook/roles/standalone-shared/tasks/main.yml
View file @
a6e9add6
---
---
-
name
:
create partition script
template
:
src={{ request_instance_template }} dest=/tmp/playbook-request-{{ playbook_name }} mode=700
-
name
:
Supply and Request ERP5 Cluster
shell
:
/tmp/playbook-request-{{ playbook_name }} | slapos console
-
name
:
create erp5-show
-
name
:
create erp5-show
copy
:
src=erp5-show dest=/usr/local/bin/erp5-show mode=755
copy
:
src=erp5-show dest=/usr/local/bin/erp5-show mode=755
-
name
:
Add startup script
copy
:
src={{ playbook_name }}-startup dest=/usr/local/bin/{{ playbook_name }}-startup mode=755
-
name
:
Add to rc.local
lineinfile
:
dest=/etc/rc.local insertbefore=BOF
line='bash /usr/local/bin/{{ playbook_name }}-startup &'
state=present
-
name
:
Get slapos.playbook directory name
shell
:
cd /tmp/tmpplaybookerp5-standalone.*/slapos.playbook.git/playbook/; echo $(pwd)/
register
:
tmp_dir
-
name
:
Check if /opt/slapos.playbook already exists
stat
:
path=/opt/slapos.playbook/
register
:
playbook_state
-
name
:
Copy slapos.playbook
copy
:
src={{ tmp_dir.stdout }} dest=/opt/slapos.playbook/
when
:
playbook_state.stat.exists == False
playbook/roles/
erp5-standalone/files/request-erp5-cluster
→
playbook/roles/
standalone-shared/templates/request-erp5.j2
View file @
a6e9add6
import json
import json
software_url = 'https://lab.nexedi.cn/nexedi/slapos/raw/erp5-cluster-0.1/software/erp5/software.cfg'
software_url = '{{ software_release_url }}'
# Choose a SlapOS Node
# Choose a SlapOS Node
# If you are deploying SlapOS Master with Webrunner, then computer_id is 'slaprunner'
# If you are deploying SlapOS Master with Webrunner, then computer_id is 'slaprunner'
computer_id = 'local_computer'
computer_id = 'local_computer'
supply(software_url, computer_id)
parameter_dict = {
parameter_dict = {
"timezone": "UTC",
"timezone": "UTC",
"site-id": "erp5",
"site-id": "erp5",
...
@@ -33,7 +36,7 @@ parameter_dict = {
...
@@ -33,7 +36,7 @@ parameter_dict = {
}
}
# Choose a title
# Choose a title
title = "instance-of-
erp5-cluster
"
title = "instance-of-
{{ playbook_name }}
"
request(software_url,
request(software_url,
title,
title,
...
...
playbook/roles/
wendelin-standalone/files/request-wendelin
→
playbook/roles/
standalone-shared/templates/request-wendelin.j2
View file @
a6e9add6
import json
software_url = '{{ software_release_url }}'
# copied from the request-erp5-cluster script, only changed the url to point to wendelin
software_url = 'https://lab.nexedi.cn/nexedi/slapos/raw/1.0.2/software/wendelin/software.cfg'
# Choose a SlapOS Node
# If you are deploying SlapOS Master with Webrunner, then computer_id is 'slaprunner'
computer_id = 'local_computer'
computer_id = 'local_computer'
parameter_dict = {
}
# Choose a title
# Choose a title
title = "instance-of-wendelin"
title = "instance-of-{{ playbook_name }}"
supply(software_url, computer_id)
request(software_url,
request(software_url,
title,
title,
...
...
playbook/roles/standalone-shared/templates/start-script.j2
0 → 100644
View file @
a6e9add6
#!/bin/bash
# Reruns the ansible playbook, does nothing else
cd
/opt/slapos.playbook/playbook/
ansible-playbook
{{
startup_playbook_id
}}
-i
hosts
--connection
=
local
playbook/roles/wendelin-standalone/files/wendelin-startup
deleted
100644 → 0
View file @
4c2d4f6e
#!/bin/bash
# Reruns the ansible playbook, does nothing else
PLAYBOOK_ROOT
=
/opt/slapos.playbook/
PLAYBOOK_FILE
=
wendelin-standalone.yml
cd
$PLAYBOOK_ROOT
# cd into the playbook directory
ansible-playbook
$PLAYBOOK_FILE
-i
hosts
--connection
=
local
playbook/roles/wendelin-standalone/meta/main.yml
deleted
100644 → 0
View file @
4c2d4f6e
---
dependencies
:
-
slapos-proxy
playbook/roles/wendelin-standalone/tasks/main.yml
deleted
100644 → 0
View file @
4c2d4f6e
---
-
name
:
Supply wendelin software release
shell
:
slapos supply {{ software_release_url }} local_computer
-
name
:
create partition script
copy
:
src=request-wendelin dest=/tmp/playbook-request-wendelin mode=700
-
name
:
Request Wendelin instance
shell
:
cat /tmp/playbook-request-wendelin | slapos console
-
name
:
Add startup script
copy
:
src=wendelin-startup dest=/usr/local/bin/wendelin-startup mode=755
-
name
:
Add to rc.local
lineinfile
:
dest=/etc/rc.local insertbefore=BOF
line='bash /usr/local/bin/wendelin-startup &'
state=present
-
name
:
Get slapos.playbook directory name
shell
:
cd /tmp/tmpplaybookwendelin-standalone.*/slapos.playbook.git/playbook/; echo $(pwd)/
register
:
tmp_dir
-
name
:
Check if /opt/slapos.playbook already exists
stat
:
path=/opt/slapos.playbook/
register
:
playbook_state
-
name
:
Copy slapos.playbook
copy
:
src={{ tmp_dir.stdout }} dest=/opt/slapos.playbook/
when
:
playbook_state.stat.exists == False
playbook/wendelin-standalone.yml
View file @
a6e9add6
...
@@ -3,8 +3,10 @@
...
@@ -3,8 +3,10 @@
connection
:
local
connection
:
local
vars
:
vars
:
software_release_url
:
https://lab.nexedi.cn/nexedi/slapos/raw/1.0.1/software/wendelin/software.cfg
software_release_url
:
https://lab.nexedi.cn/nexedi/slapos/raw/1.0.3/software/wendelin/software.cfg
startup_playbook_id
:
wendelin-standalone.yml
playbook_name
:
wendelin
request_instance_template
:
request-wendelin.j2
roles
:
roles
:
-
wendelin-standalone
-
standalone-shared
-
standalone-shared
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