Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
Mynij
slapos-mynij-dev
Commits
2d05ad6c
Commit
2d05ad6c
authored
Aug 27, 2012
by
Antoine Catton
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lxc'
Conflicts: setup.py
parents
a54461cd
a7c0ff1e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
59 deletions
+9
-59
setup.py
setup.py
+0
-1
slapos/recipe/template.py
slapos/recipe/template.py
+0
-46
software/lxc/instance-lxc.cfg
software/lxc/instance-lxc.cfg
+2
-5
software/lxc/lxc.conf.in
software/lxc/lxc.conf.in
+5
-5
software/lxc/software.cfg
software/lxc/software.cfg
+2
-2
No files found.
setup.py
View file @
2d05ad6c
...
...
@@ -130,7 +130,6 @@ setup(name=name,
'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe'
,
'stunnel = slapos.recipe.stunnel:Recipe'
,
'symbolic.link = slapos.recipe.symbolic_link:Recipe'
,
'template = slapos.recipe.template:Recipe'
,
'testnode = slapos.recipe.testnode:Recipe'
,
'tidstorage = slapos.recipe.tidstorage:Recipe'
,
'urlparse = slapos.recipe._urlparse:Recipe'
,
...
...
slapos/recipe/template.py
deleted
100644 → 0
View file @
a54461cd
##############################################################################
#
# 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.
#
##############################################################################
import
os
from
slapos.recipe.librecipe
import
GenericBaseRecipe
class
Recipe
(
GenericBaseRecipe
):
def
install
(
self
):
mapping
=
self
.
options
.
copy
()
for
key
in
(
'output'
,
'template'
,
'recipe'
,
'mode'
):
if
key
in
mapping
:
del
mapping
[
key
]
with
open
(
self
.
options
[
'output'
],
'w'
)
as
output
,
\
open
(
self
.
options
[
'template'
],
'r'
)
as
template
:
output
.
write
(
template
.
read
()
%
mapping
)
if
'mode'
in
self
.
options
:
os
.
chmod
(
self
.
options
[
'output'
],
int
(
self
.
options
[
'mode'
],
8
))
return
[
self
.
options
[
'output'
],
]
software/lxc/instance-lxc.cfg
View file @
2d05ad6c
...
...
@@ -57,14 +57,11 @@ path = ${tar:location}/bin/:${gzip:location}/bin/:${bzip2:location}/bin/:${xz-ut
archive = true
[lxc-conf]
recipe = slapos.
cookbook:
template
template
= ${lxc-conf-in:location}/${lxc-conf-in:filename}
recipe = slapos.
recipe.
template
url
= ${lxc-conf-in:location}/${lxc-conf-in:filename}
output = $${rootdirectory:etc}/lxc.conf
bridge = !!BRIDGE_NAME!!
interface = lxc$${slap-network-information:network-interface}
name = $${uuid:uuid}
rootfs = $${rootfs:downloaded-file}
requested = $${slap-connection:requested}
[passwd]
recipe = slapos.cookbook:pwgen
...
...
software/lxc/lxc.conf.in
View file @
2d05ad6c
#
%(requested)s
#
${slap-connection:requested}
lxc.utsname =
%(name)s
lxc.utsname =
${uuid:uuid}
lxc.network.type = veth
lxc.network.link =
%(bridge)s
lxc.network.veth.pair =
%(interface)s
lxc.network.link =
${:bridge}
lxc.network.veth.pair =
${:interface}
lxc.network.name = eth0
lxc.network.flags = up
...
...
@@ -24,6 +24,6 @@ lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
lxc.cgroup.devices.allow = c 254:0 rwm
lxc.rootfs =
%(rootfs)s
lxc.rootfs =
${rootfs:downloaded-file}
lxc.cap.drop = sys_module sys_time sys_chroot mknod
software/lxc/software.cfg
View file @
2d05ad6c
...
...
@@ -36,7 +36,7 @@ mode = 0644
[template-lxc]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-lxc.cfg
md5sum =
27b9c3a9013beda84b336ea603e306bf
md5sum =
056912602caa71a2af9fcae97ee6dfb9
output = ${buildout:directory}/template-lxc.cfg
mode = 0644
...
...
@@ -44,7 +44,7 @@ mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
filename = lxc.conf.in
md5sum =
e47acb30a9783d2f264b51b3c46262ae
md5sum =
b25334fc369e4e0f608bc64f14b0315d
download-only = true
[slapos-toolbox]
...
...
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