Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.playbook
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.playbook
Commits
254b0cf9
Commit
254b0cf9
authored
May 14, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create erp5-standalone.
parent
99e16acc
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
140 additions
and
0 deletions
+140
-0
build_install_folder
build_install_folder
+2
-0
install/erp5-standalone
install/erp5-standalone
+23
-0
playbook/erp5-standalone.yml
playbook/erp5-standalone.yml
+7
-0
playbook/roles/erp5-standalone/files/erp5-show
playbook/roles/erp5-standalone/files/erp5-show
+3
-0
playbook/roles/erp5-standalone/files/request-erp5-cluster
playbook/roles/erp5-standalone/files/request-erp5-cluster
+59
-0
playbook/roles/erp5-standalone/meta/main.yml
playbook/roles/erp5-standalone/meta/main.yml
+3
-0
playbook/roles/erp5-standalone/tasks/main.yml
playbook/roles/erp5-standalone/tasks/main.yml
+16
-0
playbook/roles/slapos-proxy/meta/main.yml
playbook/roles/slapos-proxy/meta/main.yml
+3
-0
playbook/roles/slapos-proxy/tasks/main.yml
playbook/roles/slapos-proxy/tasks/main.yml
+24
-0
No files found.
build_install_folder
View file @
254b0cf9
...
...
@@ -12,6 +12,8 @@ def render(yml_name, relative_url):
render("slapos.yml", "install/slapos")
render("re6stnet.yml", "install/re6st")
render("erp5-standalone.yml", "install/erp5-standalone")
# gnet
render("gnet-re6stnet.yml", "install/gnet/re6st")
...
...
install/erp5-standalone
0 → 100644
View file @
254b0cf9
#!/bin/bash
PLAYBOOK_REPOSITORY_URL
=
https://lab.nexedi.cn/rafael/slapos.playbook/repository/archive.tar.gz?ref
=
master
PLAYBOOK_FILE
=
erp5-standalone.yml
#### Setup Ansible and load few libraries #####
BASE_SETUP_SCRIPT_MD5
=
e2c9b43ccff6e606ad25cd1df0e2705f
wget
--no-check-certificate
https://deploy.nexedi.cn/base-setup
-O
/tmp/base-setup
if
[
"
`
md5sum
/tmp/base-setup |
cut
-f1
-d
\
`
"
!=
"
$BASE_SETUP_SCRIPT_MD5
"
]
;
then
echo
"ERROR: base-setup has wrong md5
`
md5sum
/tmp/base-setup |
cut
-f1
-d
\
`
!=
$BASE_SETUP_SCRIPT_MD5
"
exit
1
fi
source
/tmp/base-setup
download_playbook
$PLAYBOOK_REPOSITORY_URL
echo
"Starting Ansible playbook:"
ansible-playbook
$PLAYBOOK_FILE
-i
hosts
--connection
=
local
\ No newline at end of file
playbook/erp5-standalone.yml
0 → 100644
View file @
254b0cf9
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
roles
:
-
erp5-standalone
playbook/roles/erp5-standalone/files/erp5-show
0 → 100644
View file @
254b0cf9
#!/bin/bash
slapos proxy show
-u
/opt/slapos/slapproxy.db
playbook/roles/erp5-standalone/files/request-erp5-cluster
0 → 100644
View file @
254b0cf9
import json
software_url = 'http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/slapos-master-cluster:/software/slapos-master/software.cfg'
# Choose a SlapOS Node
# If you are deploying SlapOS Master with Webrunner, then computer_id is 'slaprunner'
computer_id = 'local_computer'
parameter_dict = {
"timezone": "UTC",
"site-id": "erp5",
"bt5": "erp5_full_text_myisam_catalog slapos_configurator",
"zope-partition-dict": {
"activities-node": {
"family": "activities",
"thread-amount": 4,
"instance-count": 1,
"timerserver-interval": 1,
"computer-guid": computer_id,
},
"distribution-node": {
"family": "distribution",
"thread-amount": 1,
"instance-count": 1,
"computer-guid": computer_id,
"port-base": 2210,
"timerserver-interval": 1,
},
},
"mariadb-computer-guid": computer_id,
"mariadb": {
"test-database-amount": 0
},
"zodb-software-type": "zeo",
"zodb-computer-guid": computer_id,
"zodb": {
"root": {
"cache-size": 1500,
"storage-dict": {
"client": {
"cache-size": "100MB"
}
}
}
}
}
# Choose a title
title = "instance-of-erp5-cluster"
request(software_url,
title,
filter_kw={'computer_guid': computer_id},
software_type='create-erp5-site',
partition_parameter_kw={
'_': json.dumps(parameter_dict, sort_keys=True, indent=2),
}
)
playbook/roles/erp5-standalone/meta/main.yml
0 → 100644
View file @
254b0cf9
---
dependencies
:
-
slapos-proxy
playbook/roles/erp5-standalone/tasks/main.yml
0 → 100644
View file @
254b0cf9
---
-
name
:
Add ipv6 to lo interface
shell
:
ip -6 addr add 2001::1/64 dev lo
ignore_errors
:
True
-
name
:
Supply erp5 software release
shell
:
slapos supply http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/erp5-cluster:/software/erp5/software.cfg local_computer
-
name
:
create partition script
copy
:
src=request-erp5-cluster dest=/tmp/playbook-request-erp5-cluster mode=700
-
name
:
create erp5-show
copy
:
src=erp5-show dest=/usr/local/bin/erp5-show mode=755
-
name
:
Request ERP5 Cluster
shell
:
cat /tmp/playbook-request-erp5-cluster | slapos console
playbook/roles/slapos-proxy/meta/main.yml
0 → 100644
View file @
254b0cf9
---
dependencies
:
-
{
role
:
repository
}
playbook/roles/slapos-proxy/tasks/main.yml
0 → 100644
View file @
254b0cf9
-
name
:
Install packages using apt
apt
:
name=slapos-node state=present update_cache=yes cache_valid_time=3600
when
:
ansible_os_family == "Debian"
-
name
:
Install re6stnet on CentOS
yum
:
name=slapos.node state=present update_cache=yes
when
:
ansible_os_family == "RedHat"
-
name
:
Check if configuration exists already
stat
:
path=/etc/opt/slapos/slapos.cfg
register
:
slapos_cfg
-
name
:
Configure SlapOS with slapos configure local
shell
:
"
slapos
configure
local"
when
:
slapos_cfg.stat.exists == False
-
name
:
Wait for proxy
wait_for
:
host=127.0.0.1 port=8080 delay=10
-
name
:
Run slapos format for initial bootstrap
service
:
"
slapos
node
format
--now"
when
:
slapos_cfg.stat.exists == False
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