Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
slapos
Commits
978c6900
Commit
978c6900
authored
Jan 31, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced _ with - in option keys
parent
69b8c08a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
20 deletions
+20
-20
slapos/recipe/postgres/__init__.py
slapos/recipe/postgres/__init__.py
+3
-3
slapos/recipe/slapconfiguration.py
slapos/recipe/slapconfiguration.py
+4
-4
software/postgres/instance.cfg.in
software/postgres/instance.cfg.in
+4
-4
software/postgres/software.cfg
software/postgres/software.cfg
+1
-1
stack/lapp/buildout.cfg
stack/lapp/buildout.cfg
+1
-1
stack/lapp/postgres/instance-postgres.cfg.in
stack/lapp/postgres/instance-postgres.cfg.in
+7
-7
No files found.
slapos/recipe/postgres/__init__.py
View file @
978c6900
...
...
@@ -70,7 +70,7 @@ class Recipe(GenericBaseRecipe):
"""
def
_options
(
self
,
options
):
options
[
'url'
]
=
'postgresql://%(superuser)s:%(password)s@[%(ipv6
_
random)s]:%(port)s/%(dbname)s'
%
options
options
[
'url'
]
=
'postgresql://%(superuser)s:%(password)s@[%(ipv6
-
random)s]:%(port)s/%(dbname)s'
%
options
def
install
(
self
):
...
...
@@ -159,11 +159,11 @@ class Recipe(GenericBaseRecipe):
'host all all ::1/128 md5'
,
]
ipv4_netmask_bits
=
self
.
options
.
get
(
'ipv4
_netmask_
bits'
,
'32'
)
ipv4_netmask_bits
=
self
.
options
.
get
(
'ipv4
-netmask-
bits'
,
'32'
)
for
ip
in
ipv4
:
cfg_lines
.
append
(
'host all all %s/%s md5'
%
(
ip
,
ipv4_netmask_bits
))
ipv6_netmask_bits
=
self
.
options
.
get
(
'ipv6
_netmask_
bits'
,
'128'
)
ipv6_netmask_bits
=
self
.
options
.
get
(
'ipv6
-netmask-
bits'
,
'128'
)
for
ip
in
ipv6
:
cfg_lines
.
append
(
'host all all %s/%s md5'
%
(
ip
,
ipv6_netmask_bits
))
...
...
slapos/recipe/slapconfiguration.py
View file @
978c6900
...
...
@@ -64,9 +64,9 @@ class Recipe(object):
Set of IPv4 addresses.
ipv6
Set of IPv6 addresses.
ipv4
_
random
ipv4
-
random
One of the IPv4 addresses.
ipv6
_
random
ipv6
-
random
One of the IPv6 addresses.
tap
Set of TAP interfaces.
...
...
@@ -116,9 +116,9 @@ class Recipe(object):
# also export single ip values for those recipes that don't support sets.
if
ipv4_set
:
options
[
'ipv4
_
random'
]
=
list
(
ipv4_set
)[
0
]
options
[
'ipv4
-
random'
]
=
list
(
ipv4_set
)[
0
]
if
ipv6_set
:
options
[
'ipv6
_
random'
]
=
list
(
ipv6_set
)[
0
]
options
[
'ipv6
-
random'
]
=
list
(
ipv6_set
)[
0
]
options
[
'tap'
]
=
tap_set
options
[
'configuration'
]
=
parameter_dict
...
...
software/postgres/instance.cfg.in
View file @
978c6900
...
...
@@ -32,11 +32,11 @@ recipe = slapos.cookbook:postgres
# Options
ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere
ipv6
_netmask_
bits = 0
ipv6
-netmask-
bits = 0
ipv4 = $${instance-parameters:ipv4}
# listen to connections from anywhere
ipv4
_netmask_
bits = 0
ipv6
_random = $${instance-parameters:ipv6_
random}
ipv4
-netmask-
bits = 0
ipv6
-random = $${instance-parameters:ipv6-
random}
superuser = postgres
password = $${gen-passwd:passwd}
port = 5432
...
...
@@ -64,7 +64,7 @@ bytes = 16
[postgres-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directories:promises}/postgres
hostname = $${instance-parameters:ipv6
_
random}
hostname = $${instance-parameters:ipv6
-
random}
port = $${postgres-instance:port}
...
...
software/postgres/software.cfg
View file @
978c6900
...
...
@@ -17,7 +17,7 @@ parts =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
md5sum =
2c54a291ed61910f69a35a6db414c051
md5sum =
d8b833a2054b82b6031a9420008b58fd
mode = 0644
...
...
stack/lapp/buildout.cfg
View file @
978c6900
...
...
@@ -87,7 +87,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres.cfg.in
output = ${buildout:directory}/instance-postgres.cfg
md5sum =
67c7772b80f82642f0f7d12793698374
md5sum =
a2370d9a23e436166b20203f66412608
mode = 0644
[instance-postgres-import]
...
...
stack/lapp/postgres/instance-postgres.cfg.in
View file @
978c6900
...
...
@@ -134,9 +134,9 @@ config-file = $${directory:stunnel-conf}/stunnel.conf
key-file = $${directory:stunnel-conf}/stunnel.key
cert-file = $${directory:stunnel-conf}/stunnel.crt
pid-file = $${basedirectory:run}/stunnel.pid
local-host = $${instance-parameters:ipv4
_
random}
local-host = $${instance-parameters:ipv4
-
random}
local-port = $${postgres-instance:port}
remote-host = $${instance-parameters:ipv6
_
random}
remote-host = $${instance-parameters:ipv6
-
random}
remote-port = 6446
client = false
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
...
...
@@ -174,11 +174,11 @@ crl = $${directory:ca-dir}/crl/
recipe = slapos.cookbook:postgres
ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere
ipv6
_netmask_
bits = 0
ipv6
-netmask-
bits = 0
ipv4 = $${instance-parameters:ipv4}
# listen to connections from anywhere
ipv4
_netmask_
bits = 0
ipv6
_random = $${instance-parameters:ipv6_
random}
ipv4
-netmask-
bits = 0
ipv6
-random = $${instance-parameters:ipv6-
random}
superuser = postgres
password = $${postgres-passwd:passwd}
port = 5432
...
...
@@ -233,7 +233,7 @@ path = $${directory:report}/slapmonitor-xml
[postgres-promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/postgres
hostname = $${instance-parameters:ipv6
_
random}
hostname = $${instance-parameters:ipv6
-
random}
port = $${postgres-instance:port}
...
...
@@ -244,7 +244,7 @@ port = $${postgres-instance:port}
[urls]
recipe = slapos.cookbook:publish
url = $${postgres-instance:url}
ip = $${instance-parameters:ipv6
_
random}
ip = $${instance-parameters:ipv6
-
random}
#----------------
...
...
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