Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
Mynij
slapos-mynij-dev
Commits
7d82b9ff
Commit
7d82b9ff
authored
Jun 24, 2021
by
Stefane Fermigier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add mynij-proxy.
parent
7afe71af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
152 additions
and
0 deletions
+152
-0
software/mynij-proxy/buildout.hash.cfg
software/mynij-proxy/buildout.hash.cfg
+17
-0
software/mynij-proxy/instance.cfg.in
software/mynij-proxy/instance.cfg.in
+64
-0
software/mynij-proxy/software.cfg
software/mynij-proxy/software.cfg
+71
-0
No files found.
software/mynij-proxy/buildout.hash.cfg
0 → 100644
View file @
7d82b9ff
# 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-profile]
filename = instance.cfg.in
md5sum = 4b37ff50a356dd25342075e1b6fec757
software/mynij-proxy/instance.cfg.in
0 → 100644
View file @
7d82b9ff
[buildout]
parts =
# monitor-base
publish-connection-parameter
mynij-proxy-promise
# Define egg directories to be the one from Software Release
# (/opt/slapgrid/...)
# Always the same.
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true
extends = {{ template_monitor }}
[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}
# Create all needed directories, depending on your needs
[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
# Executables put here will be started but not monitored (for startup scripts)
script = ${:etc}/run/
# Executables put here will be started and monitored (for daemons)
service = ${:etc}/service
# Path of the log directory used by our service (see [helloweb])
log = ${:var}/log
plugins = ${:etc}/plugins
[mynij-proxy-service]
# Actual script that starts the service:
# This recipe will try to "exec" the command-line after separating parameters.
recipe = slapos.cookbook:wrapper
command-line =
{{ gunicorn_bin }} --bind [${:host}]:${:port} app:app
host = ${slap-configuration:ipv6-random}
port = 3001
wrapper-path = ${directory:service}/mynij-proxy
[mynij-proxy-promise]
<= monitor-promise-base
module = check_port_listening
name = mynij-proxy-port-listening.py
config-hostname= ${mynij-proxy-service:host}
config-port = ${mynij-proxy-service:port}
# Publish all the parameters needed for the user to connect to the instance.
# It can be anything: URL(s), password(s), or arbitrary parameters.
# Here we'll just echo back the entered name as instance parameter
[publish-connection-parameter]
recipe = slapos.cookbook:publish
<= monitor-publish
url = http://[${mynij-proxy-service:host}]:${mynij-proxy-service:port}
software/mynij-proxy/software.cfg
0 → 100644
View file @
7d82b9ff
[buildout]
extends =
# buildout.hash.cfg is used for automated hash calculation of managed
# instance files by calling update-hash
buildout.hash.cfg
# "slapos" stack describes basic things needed for 99.9% of SlapOS Software
# Releases
../../component/git/buildout.cfg
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
# Extend here component profiles, like openssl, apache, mariadb, curl...
# Or/and extend a stack (lamp, tomcat) that does most of the work for you
# In this example we extend from helloweb component.
# ../../component/component1/buildout.cfg
# ../../component/component2/buildout.cfg
; ../../component/helloweb/buildout.cfg
parts =
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
# in 99,9% of Slapos Software Releases)
slapos-cookbook
mynij-proxy-develop
mynij-proxy-eggs
instance-profile
[python]
part = python3
[jinja-template]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
mode = 0644
[mynij-proxy-eggs]
recipe = zc.recipe.egg
eggs =
gunicorn
minij-proxy
scripts =
gunicorn
[mynij-proxy-repository]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/abilian/mynij-proxy.git
branch = main
git-executable = ${git:location}/bin/git
# revision = 0b5ff71a2ede76499e81659aed392057ae910917
[mynij-proxy-develop]
recipe = zc.recipe.egg:develop
setup = ${mynij-proxy-repository:location}
# Download instance.cfg.in (buildout profile used to deployment of instance),
# replace all ${foo:bar} parameters by real values, and change $${foo:bar} to
# ${foo:bar}
# The recipe, template and mode are fetched from jijna-template
[instance-profile]
# The <= is buildout verb to use defined template
<= jinja-template
rendered = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do
context =
section buildout buildout
key mynij_proxy_location mynij-proxy-repository:location
raw gunicorn_bin ${buildout:bin-directory}/gunicorn
raw template_monitor ${monitor2-template:rendered}
[versions]
gunicorn = 20.1.0
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