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
7b6e9fe7
Commit
7b6e9fe7
authored
Apr 24, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganise a bit
parent
19036781
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
99 additions
and
80 deletions
+99
-80
install/base-setup
install/base-setup
+67
-0
install/slapos.sh
install/slapos.sh
+13
-71
playbook/README.md
playbook/README.md
+0
-0
playbook/group_vars/all
playbook/group_vars/all
+0
-0
playbook/hosts
playbook/hosts
+0
-0
playbook/imtserver.yml
playbook/imtserver.yml
+0
-5
playbook/site.yml
playbook/site.yml
+19
-4
playbook/tasks/package.yml
playbook/tasks/package.yml
+0
-0
playbook/tasks/re6stnet.yml
playbook/tasks/re6stnet.yml
+0
-0
playbook/tasks/repository.yml
playbook/tasks/repository.yml
+0
-0
playbook/tasks/slapos.yml
playbook/tasks/slapos.yml
+0
-0
No files found.
install/base-setup
0 → 100644
View file @
7b6e9fe7
#!/bin/bash
wget
--no-check-certificate
https://lab.nexedi.cn/rafael/slapos.playbook/raw/master/install/function-common
-O
/tmp/function-common
source
/tmp/function-common
# Determine what system we are running on. This provides ``os_VENDOR``,
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
# and ``DISTRO``
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|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"
fi
fi
if
is_fedora
&&
[[
$DISTRO
==
"rhel7"
]]
;
then
# RHEL requires EPEL for many Open Stack dependencies
# NOTE: We always remove and install latest -- some environments
# use snapshot images, and if EPEL version updates they break
# unless we update them to latest version.
if
sudo
yum repolist enabled epel |
grep
-q
'epel'
;
then
uninstall_package epel-release
||
true
fi
# This trick installs the latest epel-release from a bootstrap
# repo, then removes itself (as epel-release installed the
# "real" repo).
#
# You would think that rather than this, you could use
# $releasever directly in .repo file we create below. However
# RHEL gives a $releasever of "6Server" which breaks the path;
# see https://bugzilla.redhat.com/show_bug.cgi?id=1150759
cat
<<
EOF
| sudo tee /etc/yum.repos.d/epel-bootstrap.repo
[epel-bootstrap]
name=Bootstrap EPEL
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=
\$
basearch
failovermethod=priority
enabled=0
gpgcheck=0
EOF
# Enable a bootstrap repo. It is removed after finishing
# the epel-release installation.
yum-config-manager
--enable
epel-bootstrap
yum_install epel-release
||
\
die
$LINENO
"Error installing EPEL repo, cannot continue"
# EPEL rpm has installed it's version
rm
-f
/etc/yum.repos.d/epel-bootstrap.repo
# ... and also optional to be enabled
is_package_installed yum-utils
||
install_package yum-utils
yum-config-manager
--enable
rhel-7-server-optional-rpms
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
install/slapos.sh
View file @
7b6e9fe7
...
...
@@ -4,82 +4,24 @@
PLAYBOOK_REPOSITORY_URL
=
https://lab.nexedi.cn/rafael/slapos.playbook/repository/archive.tar.gz?ref
=
master
PLAYBOOK_BASE_FOLDER
=
slapos.playbook.git
PLAYBOOK_RELATIVE_URL
=
$PLAYBOOK_BASE_FOLDER
/playbook/slapos
PLAYBOOK_FILENAME
=
slapos.playbook.git.master.tar.gz
wget
--no-check-certificate
https://lab.nexedi.cn/rafael/slapos.playbook/raw/master/install/
function-common
-O
/tmp/function-common
wget
--no-check-certificate
https://lab.nexedi.cn/rafael/slapos.playbook/raw/master/install/
base-setup
-O
/tmp/base-setup
source
/tmp/
function-common
source
/tmp/
base-setup
# Determine what system we are running on. This provides ``os_VENDOR``,
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
# and ``DISTRO``
GetDistro
function
download_playbook
{
DFILE
=
"/tmp/tmp
$(
basename
$0
)
.
$$
/"
TFILE
=
"archive.tar.gz"
cd
$DFILE
wget
$1
-O
$TFILE
tar
-xzvf
$TFILE
rm
$TFILE
cd
*
/playbook
}
# 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|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"
fi
fi
if
is_fedora
&&
[[
$DISTRO
==
"rhel7"
]]
;
then
# RHEL requires EPEL for many Open Stack dependencies
# NOTE: We always remove and install latest -- some environments
# use snapshot images, and if EPEL version updates they break
# unless we update them to latest version.
if
sudo
yum repolist enabled epel |
grep
-q
'epel'
;
then
uninstall_package epel-release
||
true
fi
# This trick installs the latest epel-release from a bootstrap
# repo, then removes itself (as epel-release installed the
# "real" repo).
#
# You would think that rather than this, you could use
# $releasever directly in .repo file we create below. However
# RHEL gives a $releasever of "6Server" which breaks the path;
# see https://bugzilla.redhat.com/show_bug.cgi?id=1150759
cat
<<
EOF
| sudo tee /etc/yum.repos.d/epel-bootstrap.repo
[epel-bootstrap]
name=Bootstrap EPEL
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=
\$
basearch
failovermethod=priority
enabled=0
gpgcheck=0
EOF
# Enable a bootstrap repo. It is removed after finishing
# the epel-release installation.
yum-config-manager
--enable
epel-bootstrap
yum_install epel-release
||
\
die
$LINENO
"Error installing EPEL repo, cannot continue"
# EPEL rpm has installed it's version
rm
-f
/etc/yum.repos.d/epel-bootstrap.repo
# ... and also optional to be enabled
is_package_installed yum-utils
||
install_package yum-utils
yum-config-manager
--enable
rhel-7-server-optional-rpms
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
cd
/tmp
&&
tar
-xzvf
$PLAYBOOK_FILENAME
cd
/tmp/
$PLAYBOOK_RELATIVE_URL
download_playbook
$PLAYBOOK_REPOSITORY_URL
clear
echo
"Staring ansible..."
ansible-playbook s
ite
.yml
-i
hosts
--connection
=
local
ansible-playbook s
lapos
.yml
-i
hosts
--connection
=
local
playbook/
slapos/
README.md
→
playbook/README.md
View file @
7b6e9fe7
File moved
playbook/
slapos/
group_vars/all
→
playbook/group_vars/all
View file @
7b6e9fe7
File moved
playbook/
slapos/
hosts
→
playbook/hosts
View file @
7b6e9fe7
File moved
playbook/
slapos/
imtserver.yml
→
playbook/imtserver.yml
View file @
7b6e9fe7
-
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/
...
...
playbook/s
lapos/s
ite.yml
→
playbook/site.yml
View file @
7b6e9fe7
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
roles
:
-
repository
-
package
-
re6stnet
vars
:
re6st_registry_url
:
https://re6stnet.nexedi.com/
...
...
@@ -13,6 +9,10 @@
-
re6st-node
-
slapos-node
slapos_master_url
:
https://slap.vifib.com/
slapos_web_master_url
:
https://slapos.vifib.com/
vars_prompt
:
-
name
:
"
re6sttoken"
prompt
:
"
If
you
have
re6st
token
if
you
have
(ignore
if
you
already
have
a
configured
re6st):"
...
...
@@ -23,3 +23,18 @@
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"
# tasks:
# - include: tasks/repository.yml
#
# - include: tasks/package.yml
#
# - include: tasks/re6stnet.yml
#
# - include: tasks/slapos.yml
#
playbook/
slapos/roles/package/tasks/main
.yml
→
playbook/
tasks/package
.yml
View file @
7b6e9fe7
File moved
playbook/
slapos/roles/re6stnet/tasks/main
.yml
→
playbook/
tasks/re6stnet
.yml
View file @
7b6e9fe7
File moved
playbook/
slapos/roles/repository/tasks/main
.yml
→
playbook/
tasks/repository
.yml
View file @
7b6e9fe7
File moved
playbook/
slapos/roles/slapos/tasks/main
.yml
→
playbook/
tasks/slapos
.yml
View file @
7b6e9fe7
File moved
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