Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
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
Kirill Smelkov
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
Hide 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):
...
@@ -70,7 +70,7 @@ class Recipe(GenericBaseRecipe):
"""
"""
def
_options
(
self
,
options
):
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
):
def
install
(
self
):
...
@@ -159,11 +159,11 @@ class Recipe(GenericBaseRecipe):
...
@@ -159,11 +159,11 @@ class Recipe(GenericBaseRecipe):
'host all all ::1/128 md5'
,
'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
:
for
ip
in
ipv4
:
cfg_lines
.
append
(
'host all all %s/%s md5'
%
(
ip
,
ipv4_netmask_bits
))
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
:
for
ip
in
ipv6
:
cfg_lines
.
append
(
'host all all %s/%s md5'
%
(
ip
,
ipv6_netmask_bits
))
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):
...
@@ -64,9 +64,9 @@ class Recipe(object):
Set of IPv4 addresses.
Set of IPv4 addresses.
ipv6
ipv6
Set of IPv6 addresses.
Set of IPv6 addresses.
ipv4
_
random
ipv4
-
random
One of the IPv4 addresses.
One of the IPv4 addresses.
ipv6
_
random
ipv6
-
random
One of the IPv6 addresses.
One of the IPv6 addresses.
tap
tap
Set of TAP interfaces.
Set of TAP interfaces.
...
@@ -116,9 +116,9 @@ class Recipe(object):
...
@@ -116,9 +116,9 @@ class Recipe(object):
# also export single ip values for those recipes that don't support sets.
# also export single ip values for those recipes that don't support sets.
if
ipv4_set
:
if
ipv4_set
:
options
[
'ipv4
_
random'
]
=
list
(
ipv4_set
)[
0
]
options
[
'ipv4
-
random'
]
=
list
(
ipv4_set
)[
0
]
if
ipv6_set
:
if
ipv6_set
:
options
[
'ipv6
_
random'
]
=
list
(
ipv6_set
)[
0
]
options
[
'ipv6
-
random'
]
=
list
(
ipv6_set
)[
0
]
options
[
'tap'
]
=
tap_set
options
[
'tap'
]
=
tap_set
options
[
'configuration'
]
=
parameter_dict
options
[
'configuration'
]
=
parameter_dict
...
...
software/postgres/instance.cfg.in
View file @
978c6900
...
@@ -32,11 +32,11 @@ recipe = slapos.cookbook:postgres
...
@@ -32,11 +32,11 @@ recipe = slapos.cookbook:postgres
# Options
# Options
ipv6 = $${instance-parameters:ipv6}
ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere
# listen to connections from anywhere
ipv6
_netmask_
bits = 0
ipv6
-netmask-
bits = 0
ipv4 = $${instance-parameters:ipv4}
ipv4 = $${instance-parameters:ipv4}
# listen to connections from anywhere
# listen to connections from anywhere
ipv4
_netmask_
bits = 0
ipv4
-netmask-
bits = 0
ipv6
_random = $${instance-parameters:ipv6_
random}
ipv6
-random = $${instance-parameters:ipv6-
random}
superuser = postgres
superuser = postgres
password = $${gen-passwd:passwd}
password = $${gen-passwd:passwd}
port = 5432
port = 5432
...
@@ -64,7 +64,7 @@ bytes = 16
...
@@ -64,7 +64,7 @@ bytes = 16
[postgres-promise]
[postgres-promise]
recipe = slapos.cookbook:check_port_listening
recipe = slapos.cookbook:check_port_listening
path = $${directories:promises}/postgres
path = $${directories:promises}/postgres
hostname = $${instance-parameters:ipv6
_
random}
hostname = $${instance-parameters:ipv6
-
random}
port = $${postgres-instance:port}
port = $${postgres-instance:port}
...
...
software/postgres/software.cfg
View file @
978c6900
...
@@ -17,7 +17,7 @@ parts =
...
@@ -17,7 +17,7 @@ parts =
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
output = ${buildout:directory}/instance.cfg
md5sum =
2c54a291ed61910f69a35a6db414c051
md5sum =
d8b833a2054b82b6031a9420008b58fd
mode = 0644
mode = 0644
...
...
stack/lapp/buildout.cfg
View file @
978c6900
...
@@ -87,7 +87,7 @@ mode = 0644
...
@@ -87,7 +87,7 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres.cfg.in
url = ${:_profile_base_location_}/postgres/instance-postgres.cfg.in
output = ${buildout:directory}/instance-postgres.cfg
output = ${buildout:directory}/instance-postgres.cfg
md5sum =
67c7772b80f82642f0f7d12793698374
md5sum =
a2370d9a23e436166b20203f66412608
mode = 0644
mode = 0644
[instance-postgres-import]
[instance-postgres-import]
...
...
stack/lapp/postgres/instance-postgres.cfg.in
View file @
978c6900
...
@@ -134,9 +134,9 @@ config-file = $${directory:stunnel-conf}/stunnel.conf
...
@@ -134,9 +134,9 @@ config-file = $${directory:stunnel-conf}/stunnel.conf
key-file = $${directory:stunnel-conf}/stunnel.key
key-file = $${directory:stunnel-conf}/stunnel.key
cert-file = $${directory:stunnel-conf}/stunnel.crt
cert-file = $${directory:stunnel-conf}/stunnel.crt
pid-file = $${basedirectory:run}/stunnel.pid
pid-file = $${basedirectory:run}/stunnel.pid
local-host = $${instance-parameters:ipv4
_
random}
local-host = $${instance-parameters:ipv4
-
random}
local-port = $${postgres-instance:port}
local-port = $${postgres-instance:port}
remote-host = $${instance-parameters:ipv6
_
random}
remote-host = $${instance-parameters:ipv6
-
random}
remote-port = 6446
remote-port = 6446
client = false
client = false
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
...
@@ -174,11 +174,11 @@ crl = $${directory:ca-dir}/crl/
...
@@ -174,11 +174,11 @@ crl = $${directory:ca-dir}/crl/
recipe = slapos.cookbook:postgres
recipe = slapos.cookbook:postgres
ipv6 = $${instance-parameters:ipv6}
ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere
# listen to connections from anywhere
ipv6
_netmask_
bits = 0
ipv6
-netmask-
bits = 0
ipv4 = $${instance-parameters:ipv4}
ipv4 = $${instance-parameters:ipv4}
# listen to connections from anywhere
# listen to connections from anywhere
ipv4
_netmask_
bits = 0
ipv4
-netmask-
bits = 0
ipv6
_random = $${instance-parameters:ipv6_
random}
ipv6
-random = $${instance-parameters:ipv6-
random}
superuser = postgres
superuser = postgres
password = $${postgres-passwd:passwd}
password = $${postgres-passwd:passwd}
port = 5432
port = 5432
...
@@ -233,7 +233,7 @@ path = $${directory:report}/slapmonitor-xml
...
@@ -233,7 +233,7 @@ path = $${directory:report}/slapmonitor-xml
[postgres-promise]
[postgres-promise]
recipe = slapos.cookbook:check_port_listening
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/postgres
path = $${basedirectory:promises}/postgres
hostname = $${instance-parameters:ipv6
_
random}
hostname = $${instance-parameters:ipv6
-
random}
port = $${postgres-instance:port}
port = $${postgres-instance:port}
...
@@ -244,7 +244,7 @@ port = $${postgres-instance:port}
...
@@ -244,7 +244,7 @@ port = $${postgres-instance:port}
[urls]
[urls]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
url = $${postgres-instance:url}
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