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
Lu Xu
slapos
Commits
edb35dcd
Commit
edb35dcd
authored
Jun 09, 2021
by
Lu Xu
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/hugo: Add Hugo software in slapos
parent
00607ab7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
152 additions
and
0 deletions
+152
-0
software/hugo/buildout.hash.cfg
software/hugo/buildout.hash.cfg
+18
-0
software/hugo/instance.cfg.in
software/hugo/instance.cfg.in
+96
-0
software/hugo/software.cfg
software/hugo/software.cfg
+38
-0
No files found.
software/hugo/buildout.hash.cfg
0 → 100644
View file @
edb35dcd
# 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).
[instance-cfg]
filename = instance.cfg.in
md5sum = 7d2365e488bdfaecb31970ab0261bc81
software/hugo/instance.cfg.in
0 → 100644
View file @
edb35dcd
[buildout]
parts =
publish-connection-parameter
stat-password
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = https://[$${hugo-wrapper:ip}]:$${hugo-wrapper:port}
env = ${gowork:env.sh}
#admin-user = $${admin-password:username}
#admin-password = $${admin-password:passwd}
[slap-configuration]
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}
configuration.ice-servers.json = [{"urls":["stun:turn-paris-rapidspace.api.nexedi.net:443"]}]
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
run = $${:var}/run
services = $${:etc}/service
data = $${:srv}/data
groups = $${:srv}/groups
recordings = $${:srv}/recordings
[hugo-ssl]
recipe = plone.recipe.command
cert-file = $${directory:data}/cert.pem
key-file = $${directory:data}/key.pem
command = ${openssl:location}/bin/openssl req -newkey rsa:2048 -batch -new -x509 -days 3650 -nodes -keyout "$${:key-file}" -out "$${:cert-file}"
update-command =
stop-on-error = true
[admin-password]
recipe = slapos.cookbook:generate.password
storage-path = $${directory:data}/.passwd
username = admin
[stat-password]
recipe = slapos.recipe.template:jinja2
template = inline:
$${admin-password:username}:$${admin-password:passwd}
rendered = $${directory:data}/passwd
[ice-servers.json]
recipe = slapos.recipe.template:jinja2
template = inline:
$${slap-configuration:configuration.ice-servers.json}
rendered = $${directory:data}/ice-servers.json
[groups-json]
recipe = slapos.recipe.template:jinja2
template = inline:{
"public":true,
"op": [{"username":"$${admin-password:username}","password":"$${admin-password:passwd}"}],
"other": [],
"presenter": [{"username": "", "password": "nexedi"}]
}
rendered = $${directory:groups}/public.json
[hugo-wrapper]
recipe = slapos.recipe.template:jinja2
port = 1313
ip = $${slap-configuration:ipv6-random}
template =
inline:#!/bin/sh
ulimit -n $(ulimit -Hn)
exec ${gowork:bin}/hugo \
-static ${hugo-get:location}/static \
-recordings $${directory:recordings} \
-groups $${directory:groups} \
-data $${directory:data} \
-http [$${:ip}]:$${:port} \
-turn ""
rendered = $${directory:services}/hugo
depends =
$${ice-servers.json:recipe}
$${groups-json:recipe}
$${hugo-ssl:recipe}
software/hugo/software.cfg
0 → 100644
View file @
edb35dcd
[buildout]
extends =
../../component/golang/buildout.cfg
../../component/openssl/buildout.cfg
../../stack/slapos.cfg
buildout.hash.cfg
parts =
slapos-cookbook
gowork
instance-cfg
[hugo-get]
<= go-git-package
go.importpath = github.com/gohugoio/hugo
repository = https://github.com/gohugoio/hugo.git
# revision = nxd-v1.0.3-1-g2c11cedc
[gowork]
install =
${hugo-get:location}:./...
[gowork.goinstall]
depends_gitfetch =
${hugo-get:recipe}
command = set -e
. ${gowork:env.sh}
cd ${hugo-get:location}
export GO111MODULE=on
export FULLVERSION=$(git describe --tags)
go build ${gowork:buildflags} -o ${gowork:bin}/hugo
chmod -R u+w .
[instance-cfg]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
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