aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--dhall/Config.dhall2
-rw-r--r--tasks/deploy.yml8
3 files changed, 13 insertions, 1 deletions
diff --git a/README.md b/README.md
index 469667b..7a4557b 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,7 @@ It handles the publication over git, as well as domain names, environment variab
13Requirements 13Requirements
14------------ 14------------
15 15
16This role requires `clever-tools` version `2.6.1` or higher.
16 17
17Role Variables 18Role Variables
18-------------- 19--------------
@@ -35,9 +36,10 @@ Variables for the application
35- _Obsolete_: `clever_metrics`: metrics used to be disabled by default. Now they are enabled by default and can be explicitly disabled with `clever_disable_metrics`. 36- _Obsolete_: `clever_metrics`: metrics used to be disabled by default. Now they are enabled by default and can be explicitly disabled with `clever_disable_metrics`.
36- `clever_disable_metrics`: a boolean to disable metrics support. Optional, default to `false`. 37- `clever_disable_metrics`: a boolean to disable metrics support. Optional, default to `false`.
37- `clever_env_output_file`: as a post deploy task you might need to retrieve the full Clever environment configuration (i.e. with addon env variables). If this variable is set to a filename then the env will be retrieved after a successful deploy inside this file. Optional. 38- `clever_env_output_file`: as a post deploy task you might need to retrieve the full Clever environment configuration (i.e. with addon env variables). If this variable is set to a filename then the env will be retrieved after a successful deploy inside this file. Optional.
39- `clever_build_flavor`: an optional text value used to configure the size of the dedicated build instance (for instance `S` or `XL`). If not defined, it delegates to clever cloud default behaviour. Setting `disabled` disables the dedicated build instance altogether.
38 40
39Variables specific to deployment, default should be fine: 41Variables specific to deployment, default should be fine:
40- `clever_cli_version`: Version of clever cli tools, default to `0.9.3`. 42- `clever_cli_version`: Version of clever cli tools, default to `2.6.1`.
41- `clever_user_path`: Path relative to ansible_user home dir where cli tools and helpers are installed default to `.local/bin`. 43- `clever_user_path`: Path relative to ansible_user home dir where cli tools and helpers are installed default to `.local/bin`.
42- `clever_app_root`: Path of the application to deploy, default to `app_root` if defined or `"{{ playbook_dir }}/.."`, ie ansible directory in the root of the application. 44- `clever_app_root`: Path of the application to deploy, default to `app_root` if defined or `"{{ playbook_dir }}/.."`, ie ansible directory in the root of the application.
43- `clever_app_confdir`: Path where to store clever cloud data specific to this application, default to `"{{ clever_app_root }}/.clever_cloud"` 45- `clever_app_confdir`: Path where to store clever cloud data specific to this application, default to `"{{ clever_app_root }}/.clever_cloud"`
diff --git a/dhall/Config.dhall b/dhall/Config.dhall
index 1b9388e..e092e2c 100644
--- a/dhall/Config.dhall
+++ b/dhall/Config.dhall
@@ -15,6 +15,7 @@ let Config =
15 , clever_disable_metrics : Bool 15 , clever_disable_metrics : Bool
16 , clever_addons : List Addon 16 , clever_addons : List Addon
17 , clever_env : Environment 17 , clever_env : Environment
18 , clever_build_flavor : Optional Text
18 } 19 }
19 20
20let mkConfig = 21let mkConfig =
@@ -32,6 +33,7 @@ let mkConfig =
32 , clever_disable_metrics = False 33 , clever_disable_metrics = False
33 , clever_addons = [] : List Addon 34 , clever_addons = [] : List Addon
34 , clever_env = {=} 35 , clever_env = {=}
36 , clever_build_flavor = None Text
35 } 37 }
36 : Config {} 38 : Config {}
37 39
diff --git a/tasks/deploy.yml b/tasks/deploy.yml
index 751d78f..ca1e54a 100644
--- a/tasks/deploy.yml
+++ b/tasks/deploy.yml
@@ -16,6 +16,14 @@
16 DOMAIN: "{{ clever_domain | default(domain) }}" 16 DOMAIN: "{{ clever_domain | default(domain) }}"
17 CONFIGURATION_FILE: "{{ clever_login_file }}" 17 CONFIGURATION_FILE: "{{ clever_login_file }}"
18 18
19- name: Configure Build Instance
20 when: clever_build_flavor is defined
21 command: "clever scale --build-flavor {{ clever_build_flavor }}"
22 args:
23 chdir: "{{ clever_app_root }}"
24 environment:
25 CONFIGURATION_FILE: "{{ clever_login_file }}"
26
19- name: Push Environment 27- name: Push Environment
20 shell: "clever env import --json < {{ clever_app_confdir }}/env" 28 shell: "clever env import --json < {{ clever_app_confdir }}/env"
21 args: 29 args: