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
Łukasz Nowak
slapos.package
Commits
8f16b9c1
Commit
8f16b9c1
authored
Sep 03, 2015
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into logging
parents
587c5465
7436ece4
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
168 additions
and
36 deletions
+168
-36
playbook/imt-re6stnet.yml
playbook/imt-re6stnet.yml
+23
-0
playbook/imt-server.yml
playbook/imt-server.yml
+0
-8
playbook/install-script.yml
playbook/install-script.yml
+35
-15
playbook/roles/install-script/tasks/main.yml
playbook/roles/install-script/tasks/main.yml
+5
-0
playbook/roles/install-script/templates/install_unstable.j2
playbook/roles/install-script/templates/install_unstable.j2
+36
-0
playbook/roles/re6stnet/tasks/main.yml
playbook/roles/re6stnet/tasks/main.yml
+6
-1
playbook/roles/repository/tasks/main.yml
playbook/roles/repository/tasks/main.yml
+10
-2
playbook/roles/standalone-shared/templates/request-wendelin.j2
...ook/roles/standalone-shared/templates/request-wendelin.j2
+41
-4
playbook/roles/vm-bootstrap/files/format_hosts
playbook/roles/vm-bootstrap/files/format_hosts
+1
-1
playbook/roles/vm-bootstrap/tasks/rerun.yml
playbook/roles/vm-bootstrap/tasks/rerun.yml
+6
-0
playbook/settings/imt.yml
playbook/settings/imt.yml
+3
-3
playbook/wendelin-standalone.yml
playbook/wendelin-standalone.yml
+2
-2
No files found.
playbook/imt-re6stnet.yml
View file @
8f16b9c1
...
...
@@ -16,5 +16,28 @@
private
:
no
default
:
"
noname"
-
name
:
"
interface_name"
prompt
:
"
What
is
the
interface
used
by
re6st:"
private
:
no
default
:
"
noname"
post_tasks
:
-
name
:
Add default
lineinfile
:
dest=/etc/re6stnet/re6stnet.conf line="default"
-
name
:
Max Clients
lineinfile
:
dest=/etc/re6stnet/re6stnet.conf line="max-clients 1"
-
name
:
Client count
lineinfile
:
dest=/etc/re6stnet/re6stnet.conf line="client-count 0"
-
name
:
Include interface
lineinfile
:
dest=/etc/re6stnet/re6stnet.conf line="client-count {{ interface_name }}"
when
:
interface_name != "noname"
-
name
:
restart re6st-node service
service
:
name=re6st-node state=restarted enabled=yes
roles
:
-
re6stnet
playbook/imt-server.yml
View file @
8f16b9c1
...
...
@@ -6,11 +6,6 @@
-
settings/imt.yml
vars_prompt
:
-
name
:
"
re6sttoken"
prompt
:
"
If
you
have
re6st
token
if
you
have
(ignore
if
you
already
have
a
configured
re6st):"
private
:
no
default
:
"
notoken"
-
name
:
"
computer_name"
prompt
:
"
What
is
this
computer
name?
(ignore
if
you
already
have
a
configured
re6st
and
slapos):"
private
:
no
...
...
@@ -22,8 +17,5 @@
default
:
"
notoken"
roles
:
-
{
role
:
re6stnet
,
package_state
:
present
}
-
{
role
:
slapos
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
ntp
,
package_state
:
present
}
playbook/install-script.yml
View file @
8f16b9c1
...
...
@@ -11,7 +11,9 @@
command
:
mkdir -p {{ base_path }}/{{ item }}
with_items
:
-
install/gnet/
-
install/unstable/gnet/
-
install/imt/
-
install/unstable/imt/
-
name
:
generate scripts
template
:
src=roles/install-script/templates/base_setup.j2 dest={{ base_path }}/install/base-setup mode=0666
...
...
@@ -36,18 +38,36 @@
copy
:
src=roles/install-script/files/index.html dest={{ base_path }}/install/imt/index.html mode=0666
roles
:
-
{
role
:
"
install-script"
,
playbook_yml
:
"
slapos.yml"
,
script_path
:
"
install/slapos"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
re6stnet.yml"
,
script_path
:
"
install/re6st"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
vifib.yml"
,
script_path
:
"
install/vifib"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
vifib-shuttle.yml"
,
script_path
:
"
install/vifib-shuttle"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
erp5-standalone.yml"
,
script_path
:
"
install/erp5-standalone"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
wendelin-standalone.yml"
,
script_path
:
"
install/wendelin-standalone"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
slapos-test-node.yml"
,
script_path
:
"
install/slapos-test-node"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
gnet-re6stnet.yml"
,
script_path
:
"
install/gnet/re6st"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
gnet-server.yml"
,
script_path
:
"
install/gnet/slapos"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
imt-server-update.yml"
,
script_path
:
"
install/imt/slapos-update"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
imt-server.yml"
,
script_path
:
"
install/imt/slapos"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
imt-vm-bootstrap.yml"
,
script_path
:
"
install/imt/vm-bootstrap"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
imt-vm-cloudera-manager.yml"
,
script_path
:
"
install/imt/vm-cloudera-manager"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
imt-re6stnet.yml"
,
script_path
:
"
install/imt/re6st"
}
-
{
role
:
"
install-script"
,
playbook_yml
:
"
test-suite.yml"
,
script_path
:
"
install/test-suite"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
slapos.yml"
,
script_path
:
"
install/slapos"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
re6stnet.yml"
,
script_path
:
"
install/re6st"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
vifib.yml"
,
script_path
:
"
install/vifib"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
vifib-shuttle.yml"
,
script_path
:
"
install/vifib-shuttle"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
erp5-standalone.yml"
,
script_path
:
"
install/erp5-standalone"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
wendelin-standalone.yml"
,
script_path
:
"
install/wendelin-standalone"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
slapos-test-node.yml"
,
script_path
:
"
install/slapos-test-node"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
gnet-re6stnet.yml"
,
script_path
:
"
install/gnet/re6st"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
gnet-server.yml"
,
script_path
:
"
install/gnet/slapos"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
imt-server-update.yml"
,
script_path
:
"
install/imt/slapos-update"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
imt-server.yml"
,
script_path
:
"
install/imt/slapos"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
imt-vm-bootstrap.yml"
,
script_path
:
"
install/imt/vm-bootstrap"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
imt-vm-cloudera-manager.yml"
,
script_path
:
"
install/imt/vm-cloudera-manager"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
imt-re6stnet.yml"
,
script_path
:
"
install/imt/re6st"
}
-
{
role
:
"
install-script"
,
channel
:
"
stable"
,
playbook_yml
:
"
test-suite.yml"
,
script_path
:
"
install/test-suite"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
slapos.yml"
,
script_path
:
"
install/unstable/slapos"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
re6stnet.yml"
,
script_path
:
"
install/unstable/re6st"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
vifib.yml"
,
script_path
:
"
install/unstable/vifib"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
vifib-shuttle.yml"
,
script_path
:
"
install/unstable/vifib-shuttle"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
erp5-standalone.yml"
,
script_path
:
"
install/unstable/erp5-standalone"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
wendelin-standalone.yml"
,
script_path
:
"
install/unstable/wendelin-standalone"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
slapos-test-node.yml"
,
script_path
:
"
install/unstable/slapos-test-node"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
gnet-re6stnet.yml"
,
script_path
:
"
install/unstable/gnet/re6st"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
gnet-server.yml"
,
script_path
:
"
install/unstable/gnet/slapos"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
imt-server-update.yml"
,
script_path
:
"
install/unstable/imt/slapos-update"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
imt-server.yml"
,
script_path
:
"
install/unstable/imt/slapos"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
imt-vm-bootstrap.yml"
,
script_path
:
"
install/unstable/imt/vm-bootstrap"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
imt-vm-bootstrap.yml"
,
script_path
:
"
install/imt-dev-bootstrap"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
imt-vm-cloudera-manager.yml"
,
script_path
:
"
install/unstable/imt/vm-cloudera-manager"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
imt-re6stnet.yml"
,
script_path
:
"
install/unstable/imt/re6st"
}
-
{
role
:
"
install-script"
,
channel
:
"
unstable"
,
playbook_yml
:
"
test-suite.yml"
,
script_path
:
"
install/unstable/test-suite"
}
playbook/roles/install-script/tasks/main.yml
View file @
8f16b9c1
---
-
name
:
generate scripts
template
:
src=install.j2 dest={{ base_path }}/{{ script_path }} mode=0666
when
:
channel == "stable"
-
name
:
generate scripts
template
:
src=install_unstable.j2 dest={{ base_path }}/{{ script_path }} mode=0666
when
:
channel == "unstable"
-
name
:
Set ansible playbook on scripts
lineinfile
:
dest={{ base_path }}/{{ script_path }} line="ansible-playbook {{ playbook_yml }} -i hosts --connection=local" state=present
playbook/roles/install-script/templates/install_unstable.j2
0 → 100644
View file @
8f16b9c1
#!/bin/bash
set
-e
#### Setup Ansible and load few libraries #####
BASE_SETUP_SCRIPT_MD5
={{
base_setup.stat.md5
}}
type
wget
>
/dev/null 2>&1
||
{
echo
>
&2
"I require wget but it's not installed. Aborting."
;
exit
1
;
}
wget
--no-check-certificate
https://deploy.erp5.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
# Include Additional Functions
if
[
!
-f
/etc/opt/slapcache.cfg
]
;
then
slapcache-conf
fi
sed
-i
"s/key = slapos-global-key/key = slapos-global-unstable-key/g"
/etc/opt/slapcache.cfg
DFILE
=
"/tmp/tmpplaybook_unstable
$(
basename
$0
)
.
$$
/"
TFILE
=
"archive.tar.gz"
mkdir
-p
$DFILE
cd
$DFILE
slapcache-download
--destination
=
$TFILE
tar
-xzvf
$TFILE
rm
$TFILE
clear
echo
"Starting Ansible playbook:"
playbook/roles/re6stnet/tasks/main.yml
View file @
8f16b9c1
---
-
name
:
Check if configuration exists already
stat
:
path=/etc/re6stnet/re6stnet.conf
register
:
re6stnet_conf
...
...
@@ -6,6 +7,10 @@
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
--token
{{
re6sttoken
}}
-r
title
{{
computer_name
}}
-d
/etc/re6stnet"
when
:
re6stnet_conf.stat.exists == False and "{{ re6sttoken }}" != "notoken" and "{{ computer_name }}" != "noname"
-
name
:
Check if configuration exists already
stat
:
path=/etc/re6stnet/re6stnet.conf
register
:
recheck_re6stnet_conf
-
name
:
Start re6st-node service
service
:
name=re6st-node state=started enabled=yes
when
:
re6stnet_conf.stat.exists == True
when
:
re
check_re
6stnet_conf.stat.exists == True
\ No newline at end of file
playbook/roles/repository/tasks/main.yml
View file @
8f16b9c1
---
-
name
:
Install Debian 8 repository key
apt_key
:
url={{ base_open_build_url }}/Debian_8.0/Release.key state=present
when
:
ansible_distribution == "Debian" and ansible_distribution_major_version == "8"
...
...
@@ -36,5 +36,13 @@
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
-
name
:
Install CentOS 7 RPM Key
rpm_key
:
state=present key=http://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_
CentOS-6
/repodata/repomd.xml.key
rpm_key
:
state=present key=http://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_
7
/repodata/repomd.xml.key
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
-
name
:
Install CentOS 6 Repository
get_url
:
url=http://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_CentOS-6/home:VIFIBnexedi.repo dest=/etc/yum.repos.d/slapos.repo mode=0440
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version == "6"
-
name
:
Install CentOS 6 RPM Key
rpm_key
:
state=present key=http://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_CentOS-6/repodata/repomd.xml.key
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version == "6"
\ No newline at end of file
playbook/roles/standalone-shared/templates/request-wendelin.j2
View file @
8f16b9c1
import json
software_url = '{{ software_release_url }}'
# Choose a SlapOS Node
# If you are deploying SlapOS Master with Webrunner, then computer_id is 'slaprunner'
computer_id = 'local_computer'
supply(software_url, computer_id)
parameter_dict = {
"timezone": "UTC",
"site-id": "erp5",
"bt5": "erp5_full_text_myisam_catalog erp5_configurator_standard erp5_wendelin_configurator",
"developer-list": ["zope"],
"inituser-login": "zope",
"inituser-password": "insecure",
"zope-partition-dict": {
"admin": {
"family": "admin",
"thread-amount": 4,
"port-base": 2220,
"instance-count": 1
},
"activities-node": {
"family": "activities",
"thread-amount": 4,
"instance-count": 1,
"timerserver-interval": 1,
"port-base": 2230
},
"distribution-node": {
"family": "distribution",
"thread-amount": 1,
"instance-count": 1,
"port-base": 2210,
"timerserver-interval": 1
}
}
}
# Choose a title
title = "instance-of-{{ playbook_name }}"
supply(software_url, computer_id)
request(software_url,
title,
filter_kw={'computer_guid': computer_id},
software_type='default',
partition_parameter_kw={}
software_type='create-erp5-site',
partition_parameter_kw={
'_': json.dumps(parameter_dict, sort_keys=True, indent=2),
}
)
playbook/roles/vm-bootstrap/files/format_hosts
View file @
8f16b9c1
...
...
@@ -4,7 +4,7 @@ import sys
print
sys
.
argv
[
1
:]
host_content
=
open
(
'/etc/hosts'
,
'r'
).
read
lines
()
host_content
=
open
(
'/etc/hosts'
,
'r'
).
read
()
hpath
=
sys
.
argv
[
1
]
domain
=
sys
.
argv
[
2
]
lines_entry
=
""
...
...
playbook/roles/vm-bootstrap/tasks/rerun.yml
View file @
8f16b9c1
...
...
@@ -8,6 +8,12 @@
job="bash -lc /usr/local/bin/vm-bootstrap-update >> /var/log/vm-bootstrap.log"
cron_file=ansible-vm-bootstrap user="root"
-
name
:
Add on reboot update on the VM
cron
:
name="reboot run vm bootstrap"
special_time=reboot
job="bash -lc /usr/local/bin/vm-bootstrap-update >> /var/log/vm-bootstrap.log"
cron_file=ansible-vm-bootstrap user="root"
-
name
:
Check if /opt/slapos.playbook already exists
file
:
path=/opt/slapos.playbook/ state=directory
...
...
playbook/settings/imt.yml
View file @
8f16b9c1
---
re6st_registry_url
:
http://
re6stnet.imt.vifib.com
/
slapos_master_url
:
https://slap.
tl.teralab-datascience.fr
/
re6st_registry_url
:
http://
slapos.tl.teralab-datascience.fr:8088
/
slapos_master_url
:
https://slap.
imt.vifib.com
/
slapos_web_master_url
:
https://slapos.tl.teralab-datascience.fr/
interface_name
:
lo
interface_name
:
lo
\ No newline at end of file
playbook/wendelin-standalone.yml
View file @
8f16b9c1
...
...
@@ -3,10 +3,10 @@
connection
:
local
vars
:
software_release_url
:
https://lab.n
exedi.cn/nexedi/slapos/raw/1.0.3
/software/wendelin/software.cfg
software_release_url
:
https://lab.n
ode.vifib.com/nexedi/slapos/raw/1.0.12
/software/wendelin/software.cfg
startup_playbook_id
:
wendelin-standalone.yml
playbook_name
:
wendelin
request_instance_template
:
request-wendelin.j2
roles
:
-
standalone-shared
-
standalone-shared
\ No newline at end of file
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