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
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
Tom Niget
slapos
Commits
2d95f3ec
Commit
2d95f3ec
authored
Aug 07, 2024
by
Tom Niget
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/mattermost: add initial support
parent
42083eea
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
888 additions
and
0 deletions
+888
-0
software/mattermost/buildout.hash.cfg
software/mattermost/buildout.hash.cfg
+25
-0
software/mattermost/instance.cfg.in
software/mattermost/instance.cfg.in
+117
-0
software/mattermost/mattermost-config-file.json.in
software/mattermost/mattermost-config-file.json.in
+668
-0
software/mattermost/software.cfg
software/mattermost/software.cfg
+78
-0
No files found.
software/mattermost/buildout.hash.cfg
0 → 100644
View file @
2d95f3ec
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template]
filename = instance.cfg.in
md5sum =
[mattermost-config-file]
filename = mattermost-config-file.json.in
md5sum =
[instance-profile]
filename = instance.cfg.in
software/mattermost/instance.cfg.in
0 → 100644
View file @
2d95f3ec
[buildout]
extends =
{{ template_monitor }}
parts =
directory
publish-connection-parameter
service-postgresql
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
[slap-configuration]
# apache-frontend reads from from a part named [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
srv = ${:home}/srv
service = ${:etc}/service
promise = ${:etc}/promise
mattermost-dir = ${:srv}/mattermost
mattermost-import-dir = ${:mattermost-dir}/import
mattermost-export-dir = ${:mattermost-dir}/export
mattermost-plugins-dir = ${:mattermost-dir}/plugins
mattermost-client-plugins-dir = ${:mattermost-dir}/client-plugins
mattermost-data-dir = ${:mattermost-dir}/data
mattermost-logs-dir = ${:var}/log
[mattermost]
ipv6 = ${instance-parameter:ipv6-random}
port = 8065
url = http://[${:ipv6}]:${:port}
import-dir = ${directory:mattermost-import-dir}
export-dir = ${directory:mattermost-export-dir}
plugins-dir = ${directory:mattermost-plugins-dir}
client-plugins-dir = ${directory:mattermost-client-plugins-dir}
data-dir = ${directory:mattermost-data-dir}
logs-dir = ${directory:mattermost-logs-dir}
recipe = slapos.cookbook:wrapper
command-line =
bash -c "ulimit -n 49152; cd {{ mattermost_homepath }}/server; exec {{ mattermost_bin }} -c ${mattermost-config-file:output} server"
wrapper-path = ${directory:service}/mattermost
[config-file]
recipe = slapos.recipe.template:jinja2
url = {{ buildout['parts-directory'] }}/${:_buildout_section_name_}/${:_buildout_section_name_}.json.in
output = ${directory:etc}/${:_buildout_section_name_}.json
extensions = jinja2.ext.do
[check-port-listening-promise]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/${:_buildout_section_name_}
[mattermost-config-file]
<= config-file
#output = ${directory:etc}/mattermost.json
context =
section mattermost mattermost
section pgsql service-postgresql
[service-postgresql]
recipe = slapos.cookbook:postgres
bin = {{ postgresql_location }}/bin
services= ${directory:service}
dbname = mattermost_production
# NOTE db name must match to what was used in KVM on lab.nexedi.com (restore script grants access to this user)
superuser = mattermost-psql
# no password - pgsql will listen only on unix sockets (see below) thus access
# is protected with filesystem-level permissions.
# ( besides, if we use slapos.cookbook:generate.password and do `password = ...`
# the password is stored in plain text in .installed and thus becomes insecure )
password=
pgdata-directory = ${directory:srv}/postgresql
# empty addresses - listen only on unix socket
ipv4 =
ipv6 =
port =
depend =
${promise-postgresql:recipe}
[promise-postgresql]
<= monitor-promise-base
promise = check_command_execute
name = promise-postgresql.py
config-command =
{{ postgresql_location }}/bin/psql \
-h ${service-postgresql:pgdata-directory} \
-U ${service-postgresql:superuser} \
-d ${service-postgresql:dbname} \
-c '\q'
[publish-connection-parameter]
recipe = slapos.cookbook:publish
mattermost-url = ${mattermost:url}
software/mattermost/mattermost-config-file.json.in
0 → 100644
View file @
2d95f3ec
This diff is collapsed.
Click to expand it.
software/mattermost/software.cfg
0 → 100644
View file @
2d95f3ec
[buildout]
extends =
../../component/golang/buildout.cfg
../../component/openssl/buildout.cfg
../../component/postgresql/buildout.cfg
../../stack/monitor/buildout.cfg
../../stack/slapos.cfg
../../component/defaults.cfg
buildout.hash.cfg
parts =
slapos-cookbook
instance-profile
mattermost-config-file
postgresql
gowork
[nodejs]
<= nodejs-18.18.0
[gowork]
mattermost-bin = ${:bin}/mattermost
mattermost-homepath = ${mattermost:homepath}
[go_github.com_mattermost_mattermost]
<= go-git-package
go.importpath = github.com/mattermost/mattermost
repository = https://github.com/mattermost/mattermost
revision = v9.5.6
[mattermost]
recipe = plone.recipe.command
command = bash -c "
ulimit -n 8096 &&
. ${gowork:env.sh} &&
mkdir -p ${gowork:bin} &&
cd ${:homepath}/webapp &&
make dist &&
cd ${:homepath}/server &&
export MM_NO_DOCKER=true &&
make setup-go-work prepackaged-binaries validate-go-version client &&
make build-linux-amd64
"
#command = bash -c "
# ulimit -n 8096 &&
# . ${gowork:env.sh} &&
# mkdir -p ${gowork:bin} &&
# cd ${:homepath}/webapp &&
# make dist &&
# cd ${:homepath}/server &&
# export MM_NO_DOCKER=true &&
# make setup-go-work prepackaged-binaries validate-go-version client &&
# make build-linux-amd64 &&
# make package-linux-amd64 &&
# tar -xvzf dist/mattermost*.tar.gz
# "
homepath = ${go_github.com_mattermost_mattermost:location}
stop-on-error = true
[download-file-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[mattermost-config-file]
<= download-file-base
[instance-profile]
recipe = slapos.recipe.template:jinja2
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do
context =
section buildout buildout
key mattermost_bin gowork:mattermost-bin
key mattermost_homepath gowork:mattermost-homepath
key template_monitor monitor2-template:output
key postgresql_location postgresql:location
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