aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorpaulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com>2018-12-27 15:28:57 +0100
committerGitHub <noreply@github.com>2018-12-27 15:28:57 +0100
commite5697403dacf206a7fe99c2efa9fe03297785446 (patch)
treeb44454d0108182c3a489672edafd0c211cbaf103
parent62408b8cdb2d984c2e73a94bae4fef96b28d9c41 (diff)
parent65b86d1f9c763b4a0cbb29b76d8f21035ef703af (diff)
downloadansible-clever-e5697403dacf206a7fe99c2efa9fe03297785446.tar.gz
ansible-clever-e5697403dacf206a7fe99c2efa9fe03297785446.tar.zst
ansible-clever-e5697403dacf206a7fe99c2efa9fe03297785446.zip
Merge pull request #30 from paulrbr-fl/rename-entry-point
app: rename `clever_entry_point`. It's only used by Haskell apps
-rw-r--r--README.md3
-rw-r--r--defaults/main.yml2
-rw-r--r--dhall/Config.dhall6
-rw-r--r--dhall/mkConfig.dhall76
-rw-r--r--vars/main.yml4
5 files changed, 47 insertions, 44 deletions
diff --git a/README.md b/README.md
index f156f5c..9141b11 100644
--- a/README.md
+++ b/README.md
@@ -20,12 +20,13 @@ Variables for the application
20- `clever_token`: clever_cloud token, mandatory. 20- `clever_token`: clever_cloud token, mandatory.
21- `clever_secret`: clever_cloud secret, mandatory. 21- `clever_secret`: clever_cloud secret, mandatory.
22- `clever_app`: the id of the app to link, mandatory. 22- `clever_app`: the id of the app to link, mandatory.
23- `clever_entry_point`: the executable name to be executed by clever cloud, mandatory
24- `clever_env`: a dict of environment variables for the application (without add_ons one already available), optional. 23- `clever_env`: a dict of environment variables for the application (without add_ons one already available), optional.
25- `clever_base_env`: a dict set in vars/main.yml with safe default and mandatory variables for an app to be run on clever. ` clever_base_env | combine(clever_env)` is passed to `clever env` command 24- `clever_base_env`: a dict set in vars/main.yml with safe default and mandatory variables for an app to be run on clever. ` clever_base_env | combine(clever_env)` is passed to `clever env` command
26- `clever_addons`: a list of dict describing addons enabled for the application from which we would use information during deploy, optional.<br/> 25- `clever_addons`: a list of dict describing addons enabled for the application from which we would use information during deploy, optional.<br/>
27 Example: `{ name: pg, env_prefix: POSTGRESQL_ADDON }` 26 Example: `{ name: pg, env_prefix: POSTGRESQL_ADDON }`
28- `clever_app_tasks_file`: tasks file to be executed after environment and addons variables where gathered. Specific to an app, should be use to run migrations. Optional. 27- `clever_app_tasks_file`: tasks file to be executed after environment and addons variables where gathered. Specific to an app, should be use to run migrations. Optional.
28- `clever_haskell_entry_point`: the haskell executable name to be executed by clever cloud, optional.
29- _Obsolete_: `clever_entry_point`: Same as above but was replaced by `clever_haskell_entry_point` since v1.14 of this role.
29- `clever_domain`: the domain from which the application should be reachable, optional. 30- `clever_domain`: the domain from which the application should be reachable, optional.
30- _Obsolete_: `domain`: Same as above but was replaced by `clever_domain` since v1.4 of this role. 31- _Obsolete_: `domain`: Same as above but was replaced by `clever_domain` since v1.4 of this role.
31- `clever_syslog_server`: UDP Syslog server to be used as UDPSyslog drain for the application, optional. Example: `udp://198.51.100.51:12345`. 32- `clever_syslog_server`: UDP Syslog server to be used as UDPSyslog drain for the application, optional. Example: `udp://198.51.100.51:12345`.
diff --git a/defaults/main.yml b/defaults/main.yml
index fb0e30f..b1605c6 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -6,7 +6,7 @@ clever_app_root: "{{ app_root | default(playbook_dir + '/..') }}"
6clever_app_confdir: "{{ clever_app_root }}/.clever_cloud" 6clever_app_confdir: "{{ clever_app_root }}/.clever_cloud"
7clever_login_file: "{{ clever_app_confdir }}/login" 7clever_login_file: "{{ clever_app_confdir }}/login"
8 8
9clever_entry_point: "" 9clever_haskell_entry_point: "{{ clever_entry_point | default('') }}"
10clever_env: {} 10clever_env: {}
11 11
12clever_metrics: true 12clever_metrics: true
diff --git a/dhall/Config.dhall b/dhall/Config.dhall
index 01329a8..db063b7 100644
--- a/dhall/Config.dhall
+++ b/dhall/Config.dhall
@@ -1,4 +1,4 @@
1 let Addon = ./addon/Addon.dhall 1let Addon = ./addon/Addon.dhall
2 2
3in λ(Environment : Type) 3in λ(Environment : Type)
4 → { clever_app : 4 → { clever_app :
@@ -15,7 +15,7 @@ in λ(Environment : Type)
15 Text 15 Text
16 , clever_app_tasks_file : 16 , clever_app_tasks_file :
17 Text 17 Text
18 , clever_entry_point : 18 , clever_haskell_entry_point :
19 Text 19 Text
20 , clever_metrics : 20 , clever_metrics :
21 Bool 21 Bool
@@ -23,4 +23,4 @@ in λ(Environment : Type)
23 List Addon 23 List Addon
24 , clever_env : 24 , clever_env :
25 Environment 25 Environment
26 } 26 } \ No newline at end of file
diff --git a/dhall/mkConfig.dhall b/dhall/mkConfig.dhall
index 5040f1c..cf64bef 100644
--- a/dhall/mkConfig.dhall
+++ b/dhall/mkConfig.dhall
@@ -1,44 +1,44 @@
1 let Config = ./Config.dhall 1let Config = ./Config.dhall
2 2
3in let Vault = ./Vault.dhall 3in let Vault = ./Vault.dhall
4 4
5in let Addon = ./addon/Addon.dhall 5 in let Addon = ./addon/Addon.dhall
6 6
7in let Environment = ./environment/Environment.dhall 7 in let Environment = ./environment/Environment.dhall
8 8
9in let nonifyEmpty = 9 in let nonifyEmpty =
10 λ(opt : Optional Text) 10 λ(opt : Optional Text)
11 → Optional/fold Text opt Text (λ(x : Text) → x) "None" 11 → Optional/fold Text opt Text (λ(x : Text) → x) "None"
12 12
13in λ(vault : Vault) 13 in λ(vault : Vault)
14 → λ(app : Text) 14 → λ(app : Text)
15 → λ(entryPoint : Text) 15 → λ(entryPoint : Optional Text)
16 → λ(metrics : Bool) 16 → λ(metrics : Bool)
17 → λ(syslogServer : Optional Text) 17 → λ(syslogServer : Optional Text)
18 → λ(domain : Optional Text) 18 → λ(domain : Optional Text)
19 → λ(tasksFile : Optional Text) 19 → λ(tasksFile : Optional Text)
20 → λ(addons : List Addon) 20 → λ(addons : List Addon)
21 → { clever_app = 21 → { clever_app =
22 app 22 app
23 , clever_orga = 23 , clever_orga =
24 vault.organization 24 vault.organization
25 , clever_secret = 25 , clever_secret =
26 vault.secret 26 vault.secret
27 , clever_token = 27 , clever_token =
28 vault.token 28 vault.token
29 , clever_syslog_server = 29 , clever_syslog_server =
30 nonifyEmpty syslogServer 30 nonifyEmpty syslogServer
31 , clever_domain = 31 , clever_domain =
32 nonifyEmpty domain 32 nonifyEmpty domain
33 , clever_app_tasks_file = 33 , clever_app_tasks_file =
34 nonifyEmpty tasksFile 34 nonifyEmpty tasksFile
35 , clever_entry_point = 35 , clever_haskell_entry_point =
36 entryPoint 36 nonifyEmpty entryPoint
37 , clever_metrics = 37 , clever_metrics =
38 metrics 38 metrics
39 , clever_addons = 39 , clever_addons =
40 addons 40 addons
41 , clever_env = 41 , clever_env =
42 { FORCE_HTTPS = True } 42 { FORCE_HTTPS = True }
43 } 43 }
44 : Config Environment 44 : Config Environment \ No newline at end of file
diff --git a/vars/main.yml b/vars/main.yml
index 0bb52a9..adeac01 100644
--- a/vars/main.yml
+++ b/vars/main.yml
@@ -2,6 +2,8 @@
2# vars file for clever 2# vars file for clever
3clever_base_env: 3clever_base_env:
4 CACHE_DEPENDENCIES: "true" 4 CACHE_DEPENDENCIES: "true"
5 CC_RUN_COMMAND: "~/.local/bin/{{ clever_entry_point }}" 5 # Haskell only
6 # https://www.clever-cloud.com/doc/get-help/reference-environment-variables/#haskell
7 CC_RUN_COMMAND: "~/.local/bin/{{ clever_haskell_entry_point }}"
6 ENABLE_METRICS: "{{ clever_metrics | lower }}" 8 ENABLE_METRICS: "{{ clever_metrics | lower }}"
7 PORT: "8080" 9 PORT: "8080"