From 96f02eb1f426c16c631598c80bec4bc0e60f75c1 Mon Sep 17 00:00:00 2001 From: Clement Delafargue Date: Fri, 19 Jun 2020 15:39:22 +0200 Subject: Add support for scalability configuration Closes #52 --- tasks/deploy.yml | 14 ++++++++++++++ tasks/setup.yml | 1 + 2 files changed, 15 insertions(+) (limited to 'tasks') diff --git a/tasks/deploy.yml b/tasks/deploy.yml index ca1e54a..c567981 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml @@ -24,6 +24,20 @@ environment: CONFIGURATION_FILE: "{{ clever_login_file }}" +- name: Configure Scalability + when: clever_scaling is defined + command: "{{ ansible_env.HOME }}/{{ clever_user_path }}/clever-set-scalability.sh" + args: + chdir: "{{ clever_app_root }}" + environment: + CONFIGURATION_FILE: "{{ clever_login_file }}" + INSTANCES: "{{ clever_scaling.instances.fixed | default ('') }}" + MIN_INSTANCES: "{{ clever_scaling.instances.min | default('') }}" + MAX_INSTANCES: "{{ clever_scaling.instances.max | default('') }}" + FLAVOR: "{{ clever_scaling.flavor.fixed | default('') }}" + MIN_FLAVOR: "{{ clever_scaling.flavor.min | default('') }}" + MAX_FLAVOR: "{{ clever_scaling.flavor.max | default('') }}" + - name: Push Environment shell: "clever env import --json < {{ clever_app_confdir }}/env" args: diff --git a/tasks/setup.yml b/tasks/setup.yml index a2d5b90..8a11772 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -29,3 +29,4 @@ with_items: - clever-set-domain.sh - clever-set-drain.sh + - clever-set-scalability.sh -- cgit v1.2.3