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
3dca0ff0
Commit
3dca0ff0
authored
Apr 21, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Includes re6st-conf, slapos node register and imt config
parent
33d4a8dd
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
14 deletions
+95
-14
install/slapos.sh
install/slapos.sh
+6
-1
playbook/slapos/imtserver.yml
playbook/slapos/imtserver.yml
+34
-0
playbook/slapos/roles/package/tasks/main.yml
playbook/slapos/roles/package/tasks/main.yml
+5
-11
playbook/slapos/roles/re6stnet/tasks/main.yml
playbook/slapos/roles/re6stnet/tasks/main.yml
+11
-0
playbook/slapos/roles/repository/tasks/main.yml
playbook/slapos/roles/repository/tasks/main.yml
+9
-1
playbook/slapos/roles/slapos/tasks/main.yml
playbook/slapos/roles/slapos/tasks/main.yml
+11
-0
playbook/slapos/site.yml
playbook/slapos/site.yml
+19
-1
No files found.
install/slapos.sh
View file @
3dca0ff0
...
...
@@ -17,7 +17,7 @@ GetDistro
# Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``export FORCE=yes``
if
[[
!
${
DISTRO
}
=
~
(
wheezy
)
]]
;
then
if
[[
!
${
DISTRO
}
=
~
(
wheezy
|trusty|rhel7
)
]]
;
then
echo
"WARNING: this script has not been tested on
$DISTRO
"
if
[[
"
$FORCE
"
!=
"yes"
]]
;
then
die
$LINENO
"If you wish to run this script anyway run with FORCE=yes"
...
...
@@ -66,6 +66,11 @@ fi
is_package_installed ansible
||
install_package ansible
if
is_ubuntu
&&
[[
$DISTRO
==
"trusty"
]]
;
then
is_package_installed python-apt
||
install_package python-apt
is_package_installed python-pycurl
||
install_package python-pycurl
fi
exit
rm
-rf
/tmp/
$PLAYBOOK_FILENAME
/tmp/
$PLAYBOOK_BASE_FOLDER
wget
$PLAYBOOK_REPOSITORY_URL
-O
/tmp/
$PLAYBOOK_FILENAME
...
...
playbook/slapos/imtserver.yml
0 → 100644
View file @
3dca0ff0
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
roles
:
-
repository
-
package
-
re6stnet
-
slapos
vars
:
re6st_registry_url
:
http://re6stnet.imt.vifib.com/
base_open_build_url
:
http://download.opensuse.org/repositories/home:/VIFIBnexedi/
package_dict
:
re6st-node
:
latest
slapos-node
:
latest
slapos_master_url
:
https://slap.imt.vifib.com/
slapos_web_master_url
:
https://imt.vifib.com/
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
default
:
"
noname"
-
name
:
"
slapostoken"
prompt
:
"
If
you
have
slapos
token
if
you
have
(ignore
if
you
already
have
a
configured
slapos):"
private
:
no
default
:
"
notoken"
playbook/slapos/roles/package/tasks/main.yml
View file @
3dca0ff0
-
name
:
Install slapos-node on Debian
apt
:
name=slapos-node state=present update_cache=yes cache_valid_time=3600
when
:
ansible_os_family == "Debian"
-
name
:
Install re6stnet on Debian
apt
:
name=re6stnet state=present update_cache=yes cache_valid_time=3600
-
name
:
Install packages using apt
apt
:
name={{ item.key }} state={{ item.value }} update_cache=yes cache_valid_time=3600
when
:
ansible_os_family == "Debian"
with_dict
:
package_dict
-
name
:
Install re6stnet on CentOS
yum
:
name=re6st-node state=present
when
:
ansible_os_family == "RedHat"
-
name
:
Install slapos on CentOS
yum
:
name=slapos-node state=present
yum
:
name={{ item }} state={{ item.value.state }}
when
:
ansible_os_family == "RedHat"
with_dict
:
package_dict
playbook/slapos/roles/re6stnet/tasks/main.yml
0 → 100644
View file @
3dca0ff0
-
name
:
Check if configuration exists already
stat
:
path=/etc/re6stnet/re6stnet.conf
register
:
re6stnet_conf
-
name
:
Configure Re6st with re6st-conf
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
:
Start re6st-node service
service
:
name=re6st-node state=started enabled=yes
when
:
re6stnet_conf.stat.exists == True
playbook/slapos/roles/repository/tasks/main.yml
View file @
3dca0ff0
...
...
@@ -15,10 +15,18 @@
apt_repository
:
repo='deb {{ base_open_build_url }}/Debian_6.0/ ./' state=present
when
:
ansible_distribution == "Debian" and ansible_distribution_major_version == "6"
-
name
:
Install Ubuntu 14.04 repository key
apt_key
:
url={{ base_open_build_url }}/xUbuntu_14.04/Release.key state=present
when
:
ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04"
-
name
:
Install Ubuntu 14.04 repository
apt_repository
:
repo='deb {{ base_open_build_url }}/xUbuntu_14.04/ ./' state=present
when
:
ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04"
-
name
:
Install CentOS 7 Repository
get_url
:
url=http://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_7/home:VIFIBnexedi.repo dest=/etc/yum.repos.d/slapos.repo mode=0440
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
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
\ No newline at end of file
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
playbook/slapos/roles/slapos/tasks/main.yml
0 → 100644
View file @
3dca0ff0
-
name
:
Check if configuration exists already
stat
:
path=/etc/opt/slapos/slapos.cfg
register
:
slapos_cfg
-
name
:
Configure SlapOS with slapos node register
shell
:
"
slapos
node
register
--token
{{
slapostoken
}}
--master-url
{{
slapos_master_url
}}
--master-url-web
{{
slapos_web_master_url
}}
{{
computer_name
}}"
when
:
slapos_cfg.stat.exists == False and "{{ slapostoken }}" != "notoken" and "{{ computer_name }}" != "noname"
-
name
:
Run slapos format for initial bootstrap
service
:
"
slapos
node
format
--now"
when
:
slapos_cfg.stat.exists == False and "{{ slapostoken }}" != "notoken" and "{{ computer_name }}" != "noname"
playbook/slapos/site.yml
View file @
3dca0ff0
...
...
@@ -4,4 +4,22 @@
roles
:
-
repository
-
package
-
re6stnet
vars
:
re6st_registry_url
:
https://re6stnet.nexedi.com/
base_open_build_url
:
http://download.opensuse.org/repositories/home:/VIFIBnexedi/
package_list
:
-
re6st-node
-
slapos-node
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
default
:
"
noname"
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