This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
63 lines (41 loc) · 1.86 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Trinidad sandbox extension
======
# DESCRIPTION
Trinidad's management console and REST api.
This extension adds a management console to a Trinidad's instance moreover a rest api to access the applications running on top of it.
# INSTALL
jruby -S gem install trinidad_sandbox_extension
# CONFIGURATION
The extension has to be added within the section "extensions" into the Trinidad's configuration file:
---
extensions:
sandbox:
This extension is also a Sinatra web application running on top of Trinidad, so any application configuration parameter is also valid here.
For instance, we can modify the context path where is running the console:
---
extensions:
sandbox:
context_path: management # by default the context path is sandbox
It also supports basic authentication, we'll have to specify the username and password within our section:
---
extensions:
sandbox:
username: manager
password: XXXXXXX
We can also use the console in readonly mode, so users can see the applications deployed but they cannot deploy new ones or modify them:
---
extensions:
sandbox:
readonly: true
# FEATURES
The console as well as the REST api allow to list all the applications managed by that Trinidad's instance and start/stop them.
By security reasons the sandbox application is not listed nor can be stopped.
# GIT DEPLOYMENT
The sandbox console also allows to deploy new applications into Trinidad via Git. By default it uses ssh keys to access to the repository with the user `git`.
We can also use git hooks to deploy applications via a POST-Receive callback.
In this case we use a token for authentication that must be set in the configuration, then we'll use an url like we show bellow in our hook:
---
extensions:
sandbox:
deploy_token: ULTRA_SECRET_TOKEN
POST-Receive url: http://host/sandbox/deploy?deploy_token=ULTRA_SECRET_TOKEN