Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F8321744
phabricator.sls
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
phabricator.sls
View Options
# -------------------------------------------------------------
# Salt — Provision Docker engine
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2018-09-06
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{%
set
has_selinux
=
salt
[
'grains.get'
](
'selinux:enabled'
,
False
)
%}
{%
set
containers
=
pillar
[
'docker_containers'
][
grains
[
'id'
]]
%}
{%
for
instance
,
container
in
containers
[
'phabricator'
]
.items
()
%}
{%
set
create_container
=
"skip_container"
not
in
container
or
not
container
[
'skip_container'
]
%}
# -------------------------------------------------------------
# Storage directory
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/srv/phabricator/
{{
instance
}}
:
file.directory
:
-
user
:
431
-
group
:
433
-
makedirs
:
True
{%
if
has_selinux
%}
selinux_context_
{{
instance
}}
_data
:
selinux.fcontext_policy_present
:
-
name
:
/srv/phabricator/
{{
instance
}}
-
sel_type
:
container_file_t
selinux_context_
{{
instance
}}
_data_applied
:
selinux.fcontext_policy_applied
:
-
name
:
/srv/phabricator/
{{
instance
}}
{%
endif
%}
# -------------------------------------------------------------
# Container
#
# /!\ DEVCENTRAL DEPLOYMENT ISSUE /!\
#
# We've currently a chicken or egg problem here: the zr
# credentials source is the Nasqueron Phabricator instance,
# DevCentral. As such, we can't provision it through this block.
#
# This is blocked by secrets migration to Vault.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{%
if
create_container
%}
{{
instance
}}
:
docker_container.running
:
-
detach
:
True
-
interactive
:
True
-
image
:
nasqueron/phabricator
-
binds
:
-
/srv/phabricator/
{{
instance
}}
/conf:/opt/phabricator/conf
-
/srv/phabricator/
{{
instance
}}
/repo:/var/repo
-
environment
:
PHABRICATOR_URL
:
https://
{{
container
[
'host'
]
}}
PHABRICATOR_TITLE
:
{{
container
[
'title'
]
}}
PHABRICATOR_DOMAIN
:
{{
container
[
'host'
]
}}
PHABRICATOR_ALT_FILE_DOMAIN
:
https://
{{
container
[
'static_host'
]
}}
DB_USER
:
{{
salt
[
'zr.get_username'
](
container
[
'credentials'
][
'mysql'
])
}}
DB_PASS
:
{{
salt
[
'zr.get_password'
](
container
[
'credentials'
][
'mysql'
])
}}
PHABRICATOR_STORAGE_NAMESPACE
:
{{
container
[
'storage'
][
'namespace'
]
}}
{%
if
container
[
'mailer'
]
==
'sendgrid'
%}
PHABRICATOR_USE_SENDGRID
:
1
PHABRICATOR_SENDGRID_APIUSER
:
{{
salt
[
'zr.get_username'
](
container
[
'credentials'
][
'sendgrid'
])
}}
PHABRICATOR_SENDGRID_APIKEY
:
{{
salt
[
'zr.get_password'
](
container
[
'credentials'
][
'sendgrid'
])
}}
{%
elif
container
[
'mailer'
]
==
'mailgun'
%}
PHABRICATOR_USE_MAILGUN
:
1
PHABRICATOR_MAILGUN_APIKEY
:
{{
salt
[
'zr.get_token'
](
container
[
'credentials'
][
'mailgun'
])
}}
{%
endif
%}
-
links
:
{{
container
[
'mysql_link'
]
}}
:mysql
-
ports
:
-
80
-
port_bindings
:
-
{{
container
[
'app_port'
]
}}
:80
{%
endif
%}
{%
endfor
%}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 13, 16:50 (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2548376
Default Alt Text
phabricator.sls (3 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment