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
Rafael Monnerat
slapos.package
Commits
09ef7332
Commit
09ef7332
authored
May 08, 2016
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
0be3dc11
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
234 additions
and
4 deletions
+234
-4
install-ansible-from-source
install-ansible-from-source
+18
-0
install-slapos-from-source
install-slapos-from-source
+42
-0
obs/slapos/prepare_slapos_build.sh
obs/slapos/prepare_slapos_build.sh
+4
-3
obs/slapos/slapos-node/slapos/buildout.cfg.in
obs/slapos/slapos-node/slapos/buildout.cfg.in
+3
-1
obs/slapos/templates/PKGBUILD
obs/slapos/templates/PKGBUILD
+23
-0
obs/slapos/templates/debian/control
obs/slapos/templates/debian/control
+1
-0
obs/slapos/templates/slapos-node_1.3.15+1.0.20+4.dsc
obs/slapos/templates/slapos-node_1.3.15+1.0.20+4.dsc
+12
-0
obs/slapos/templates/slapos.spec
obs/slapos/templates/slapos.spec
+131
-0
No files found.
install-ansible-from-source
0 → 100644
View file @
09ef7332
#!/bin/bash
echo
"Make sure git and python-setuptools are installed!"
mkdir
-p
/opt/ansible-installation
cd
/opt/ansible-installation
git clone git://github.com/ansible/ansible.git
--recursive
cd
ansible
source
./hacking/env-setup
sudo
easy_install pip
sudo
pip
install
paramiko PyYAML Jinja2 httplib2 six
echo
"127.0.0.1"
>
~/ansible_hosts
install-slapos-from-source
0 → 100644
View file @
09ef7332
mkdir -p /opt/slapos/log/
cd /opt/slapos/
echo "[buildout]
extends = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/1.0.17:/component/slapos/buildout.cfg
" > buildout.cfg
unset PYTHONPATH
unset PYTHONDONTWRITEBYTECODE
unset CONFIG_SITE
# Bootstrap SlapOS
python -S -c 'import urllib2;print urllib2.urlopen("https://raw.github.com/buildout/buildout/1/bootstrap/bootstrap.py").read()' | python -S -
Warning:Depending on your distribution you might need to
replace python by python2 in the last command. This happens when your
distribution considers that the standard python is the 3.x branch.
bin/buildout
cat < EOF > /etc/cron.d/slapos
MAILTO=""
# Run "Installation/Destruction of Software Releases" and "Deploy/Start/Stop Partitions" once per minute
* * * * * root /opt/slapos/bin/slapos node software --verbose --logfile=/opt/slapos/log/slapos-node-software.log > /dev/null 2>&1
* * * * * root /opt/slapos/bin/slapos node instance --promise-timeout 20 --verbose --logfile=/opt/slapos/log/slapos-node-instance.log > /dev/null 2>&1
# Run "Destroy Partitions to be destroyed" once per hour
0 * * * * root /opt/slapos/bin/slapos node report --maximal_delay=3600 --verbose --logfile=/opt/slapos/log/slapos-node-report.log > /dev/null 2>&1
# Run "Check/add IPs and so on" once per hour
0 * * * * root /opt/slapos/bin/slapos node format >> /opt/slapos/log/slapos-node-format.log 2>&1
# Run "Booting" on every system start
@reboot root /opt/slapos/bin/slapos node boot >> /opt/slapos/log/slapos-node-format.log 2>&1
# Run "Collect" once a minute
* * * * * root /opt/slapos/bin/slapos node collect >> /opt/slapos/log/slapos-node-collect.log 2>&1
EOF
obs/slapos/prepare_slapos_build.sh
View file @
09ef7332
...
...
@@ -37,7 +37,7 @@ function prepare_template_files
function
prepare_download_cache
{
cd
$CURRENT_DIRECTORY
/
$SLAPOS_DIRECTORY
/slapos/
rm
-rf
build/
#
rm -rf build/
bash offline.sh
||
(
echo
"Impossible to build SlapOS, exiting."
&&
exit
1
)
# Go back to starting point
cd
$CURRENT_DIRECTORY
...
...
@@ -100,12 +100,13 @@ function obs_upload
}
prepare_template_files
#
prepare_template_files
prepare_download_cache
#
prepare_download_cache
prepare_tarball
prepare_deb_packaging
obs_upload
obs/slapos/slapos-node/slapos/buildout.cfg.in
View file @
09ef7332
...
...
@@ -67,7 +67,7 @@ post-install =
# prepared to be upload.
#url = http://www.openssl.org/source/openssl-1.0.2d.tar.gz
#url = http://ftp.vim.org/security/openssl/openssl-1.0.2d.tar.gz
url = http://www.openssl.org/source/openssl-1.0.2
e
.tar.gz
url = http://www.openssl.org/source/openssl-1.0.2
f
.tar.gz
prefix = %TARGET_DIRECTORY%/parts/${:_buildout_section_name_}
make-options +=
...
...
@@ -123,3 +123,5 @@ configure-options =
cliff = 1.4.5
slapos.core = 1.3.15
zc.buildout = 2.5.0.post1
zc.recipe.egg = 2.0.3.post1
obs/slapos/templates/PKGBUILD
0 → 100644
View file @
09ef7332
# Maintainer: Rafael Monnerat <rafael@nexedi.com>
pkgname
=
slapos-node
pkgver
=
1.3.15+1.0.20+4
pkgdesc
=
"Slapos node"
pkgrel
=
1
arch
=(
'x86_64'
'i686'
)
url
=
"http://www.slapos.org"
license
=(
'GPL'
)
depends
=(
'gcc'
'make'
'patch'
'wget'
'python2'
'python2-distribute'
'bridge-utils'
)
makedepends
=(
'gcc'
'make'
'patch'
'wget'
'python2'
'python2-distribute'
'chrpath'
'inetutils'
)
install
=
'slapos-node.install'
source
=(
${
pkgname
}
_
${
pkgver
}
.tar.gz
)
md5sums
=(
%SOURCEMD5
)
build
()
{
cd
"
${
srcdir
}
/
${
pkgname
}
_
${
pkgver
}
"
make
PYTHON
=
python2
}
package
()
{
cd
"
${
srcdir
}
/
${
pkgname
}
_
${
pkgver
}
"
make
DESTDIR
=
"
$pkgdir
/"
install
}
obs/slapos/templates/debian/control
View file @
09ef7332
...
...
@@ -21,6 +21,7 @@ Depends: ${misc:Depends},
uml-utilities,
# slapgrid-sr needed by most recipes
libc6-dev | libc-dev,
libssl-dev,
gcc | c-compiler,
g++ | c++-compiler,
make,
...
...
obs/slapos/templates/slapos-node_1.3.15+1.0.20+4.dsc
0 → 100644
View file @
09ef7332
Format: 1.0
Source: slapos-node
Binary: slapos-node
Architecture: any
Version: 1.3.15+1.0.20+4-1
Maintainer: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Homepage: http://www.slapos.org
Standards-Version: 3.9.2
Build-Depends: debhelper (>= 4.1.16), chrpath, po-debconf, wget, python, python-dev, python-setuptools
Files:
1c2803e4693c74042985d753c9c3ba53 73736102 slapos-node_1.3.15+1.0.20+4.orig.tar.gz
1c2803e4693c74042985d753c9c3ba53 6102 slapos-node_1.3.15+1.0.20+4-1.diff.tar.gz
\ No newline at end of file
obs/slapos/templates/slapos.spec
0 → 100644
View file @
09ef7332
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
%define slapversion 1.0.20
%define version 1.3.15
%define unmangled_version 1.3.15
%define unmangled_version 1.3.15
%define release_number 4
Summary:Client-side to deploy applications with SlapOS
Name: slapos.node
Version:%{slapversion}
Release:%{release_number}
License:GPL
Group: Application/Network
Source0: slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}.tar.gz
URL: http://www.slapos.org/
Vendor: Vifib
Packager: Arnaud Fontaine <arnaud.fontaine@nexedi.com>, Cédric Le Ninivin <cedric.leninivin@tiolive.com>, Cédric de Saint Martin <cedric.dsm@nexedi.com>, Rafael Monnerat <rafael@nexedi.com>
%if 0%{?suse_version}
%if 0%{?suse_version} == 1210
BuildRequires: gcc-c++, make, patch, wget, python, python-devel, chrpath, python-distribute, openssl-devel, python-xml
Requires: bridge-utils, python, gcc-c++, make, patch, wget, python-distribute, python-xml
%else
BuildRequires: gcc-c++, make, patch, wget, python, python-devel, chrpath, python-setuptools, openssl-devel, python-xml
Requires: bridge-utils, python, gcc-c++, make, patch, wget, python-setuptools, python-xml
%endif
%else
BuildRequires: gcc-c++, make, patch, wget, python, python-devel, chrpath, python-setuptools, openssl-devel
Requires: bridge-utils, python, gcc-c++, make, patch, wget, python-setuptools
%endif
AutoReqProv: no
Conflicts: firewalld
%description
Client-side to deploy applications with SlapOS
SlapOS allows one to turn any application into SaaS (Service as a System),
PaaS (Platform as a Service) or IaaS (Infrastructure as a Service) without
loosing your freedom. SlapOS defines two types of servers: SlapOS server and
SlapOS node.
.
This package contains libraries and tools to deploy a node.
.
Slapformat prepares a SlapOS node before running slapgrid. It then generates
a report and sends the information to the configured SlapOS master.
.
Slapgrid allows you to easily deploy instances of software based on buildout
profiles.
%prep
rm -rf $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}
zcat $RPM_SOURCE_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}.tar.gz | tar -xvf -
%build
cd $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}
make
%install
cd $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/etc/cron.d/
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/template/slapos-node.cron.d $RPM_BUILD_ROOT/etc/cron.d/slapos-node
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/template/slapos-node.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/slapos.logrotate.conf
mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/
mkdir -p $RPM_BUILD_ROOT/opt/slapos/log
rm -rf $RPM_BUILD_ROOT/opt/slapos/eggs/setuptools-*.egg/setuptools/tests/test_easy_install.py
%files
/opt/slapos
/etc/cron.d/slapos-node
/etc/logrotate.d/slapos.logrotate.conf
/etc/opt
/etc/systemd
/etc/systemd/system
/etc/firewalld
/usr/bin/slapos
/usr/sbin/slapos-tweak
%defattr(-,root,root)
%pre
if [ -f /etc/openvpn/vifib.conf ]; then
cp -f /etc/openvpn/vifib.conf /etc/openvpn/vifib.backup.conf
mkdir -p /etc/openvpn/vifib-keys
cp -rf /etc/openvpn/vifib-keys /etc/openvpn/vifib-backup-keys
sed -i "s/\/etc\/openvpn\/vifib-keys/\/etc\/openvpn\/vifib-backup-keys/g" /etc/openvpn/vifib.backup.conf
fi
%post
echo """To generate slapos configuration run 'slapos node register'"""
%preun
if [ -f /etc/openvpn/vifib.conf ]; then
cp -f /etc/openvpn/vifib.conf /etc/openvpn/vifib.backup.conf
cp -rf /etc/openvpn/vifib-keys/ /etc/openvpn/vifib-backup-keys
sed -i "s/\/etc\/openvpn\/vifib-keys/\/etc\/openvpn\/vifib-backup-keys/g" /etc/openvpn/vifib.backup.conf
fi
%postun
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