Commit 03c8aa2d by Edward Zarecor

Merge pull request #2691 from edx/e0d/change-name-coursediscover

E0d/change name coursediscover
parents 2c9c9336 156d712a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# From the root of configuration: # From the root of configuration:
# #
# docker build -f docker/build/course-discovery/Dockerfile . # docker build -f docker/build/discovery/Dockerfile .
# #
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible # This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo. # with the currently checked-out configuration repo.
...@@ -10,19 +10,19 @@ ...@@ -10,19 +10,19 @@
FROM edxops/trusty-common:latest FROM edxops/trusty-common:latest
MAINTAINER edxops MAINTAINER edxops
ENV COURSE_DISCOVERY_VERSION=master ENV DISCOVERY_VERSION=master
ENV REPO_OWNER=edx ENV REPO_OWNER=edx
ADD . /edx/app/edx_ansible/edx_ansible ADD . /edx/app/edx_ansible/edx_ansible
WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
COPY docker/build/course-discovery/ansible_overrides.yml / COPY docker/build/discovery/ansible_overrides.yml /
RUN sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook course_discovery.yml \ RUN sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook discovery.yml \
-c local -i '127.0.0.1,' \ -c local -i '127.0.0.1,' \
-t 'install,assets,devstack:install' \ -t 'install,assets,devstack:install' \
--extra-vars="@/ansible_overrides.yml" \ --extra-vars="@/ansible_overrides.yml" \
--extra-vars="COURSE_DISCOVERY_VERSION=$COURSE_DISCOVERY_VERSION" \ --extra-vars="DISCOVERY_VERSION=$DISCOVERY_VERSION" \
--extra-vars="COMMON_GIT_PATH=$REPO_OWNER" --extra-vars="COMMON_GIT_PATH=$REPO_OWNER"
USER root USER root
......
---
discovery_gunicorn_host: 0.0.0.0
DISCOVERY_MYSQL: 'db'
DISCOVERY_DJANGO_SETTINGS_MODULE: 'course_discovery.settings.devstack'
DISCOVERY_ELASTICSEARCH_HOST: 'es'
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
# structure under /home/me # structure under /home/me
# #
# |-- edx-src # |-- edx-src
# | |-- course-discovery # | |-- discovery
# | |-- cs_comments_service # | |-- cs_comments_service
# | |-- edx_course_discovery # | |-- edx_discovery
# | |-- edx-platform # | |-- edx-platform
# | |-- xqueue # | |-- xqueue
......
- name: Deploy Course Discovery - name: Deploy Discovery
hosts: all hosts: all
sudo: True sudo: True
gather_facts: True gather_facts: True
...@@ -7,6 +7,6 @@ ...@@ -7,6 +7,6 @@
serial: "{{ serial_count }}" serial: "{{ serial_count }}"
roles: roles:
- nginx - nginx
- role: course_discovery - role: discovery
nginx_default_sites: nginx_default_sites:
- course_discovery - discovery
\ No newline at end of file \ No newline at end of file
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
ENABLE_DATADOG: False ENABLE_DATADOG: False
ENABLE_SPLUNKFORWARDER: False ENABLE_SPLUNKFORWARDER: False
ENABLE_NEWRELIC: False ENABLE_NEWRELIC: False
CLUSTER_NAME: 'course-discovery' CLUSTER_NAME: 'discovery'
roles: roles:
- aws - aws
- role: nginx - role: nginx
nginx_default_sites: nginx_default_sites:
- course-discovery - discovery
- course_discovery - discovery
- role: datadog - role: datadog
when: COMMON_ENABLE_DATADOG when: COMMON_ENABLE_DATADOG
- role: splunkforwarder - role: splunkforwarder
......
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://github.com/edx/configuration/wiki
# code style: https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Defaults for role course_discovery
#
COURSE_DISCOVERY_GIT_IDENTITY: !!null
# depends upon Newrelic being enabled via COMMON_ENABLE_NEWRELIC
# and a key being provided via NEWRELIC_LICENSE_KEY
COURSE_DISCOVERY_NEWRELIC_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ course_discovery_service_name }}"
COURSE_DISCOVERY_PIP_EXTRA_ARGS: "-i {{ COMMON_PYPI_MIRROR_URL }}"
COURSE_DISCOVERY_NGINX_PORT: 18381
COURSE_DISCOVERY_SSL_NGINX_PORT: 48381
COURSE_DISCOVERY_DEFAULT_DB_NAME: 'course_discovery'
COURSE_DISCOVERY_MYSQL: 'localhost'
# MySQL usernames are limited to 16 characters
COURSE_DISCOVERY_MYSQL_USER: 'course_discov001'
COURSE_DISCOVERY_MYSQL_PASSWORD: 'password'
COURSE_DISCOVERY_DATABASES:
# rw user
default:
ENGINE: 'django.db.backends.mysql'
NAME: '{{ COURSE_DISCOVERY_DEFAULT_DB_NAME }}'
USER: '{{ COURSE_DISCOVERY_MYSQL_USER }}'
PASSWORD: '{{ COURSE_DISCOVERY_MYSQL_PASSWORD }}'
HOST: '{{ COURSE_DISCOVERY_MYSQL }}'
PORT: '3306'
ATOMIC_REQUESTS: true
CONN_MAX_AGE: 60
COURSE_DISCOVERY_ELASTICSEARCH_HOST: 'localhost'
COURSE_DISCOVERY_ES_INDEX: 'course_discovery'
COURSE_DISCOVERY_ELASTICSEARCH:
host: '{{ COURSE_DISCOVERY_ELASTICSEARCH_HOST }}'
index: '{{ COURSE_DISCOVERY_ES_INDEX }}'
COURSE_DISCOVERY_DB_ADMIN_USER: 'root'
COURSE_DISCOVERY_DB_ADMIN_PASSWORD: ''
COURSE_DISCOVERY_MYSQL_MATCHER: 'localhost'
COURSE_DISCOVERY_MEMCACHE: [ 'memcache' ]
COURSE_DISCOVERY_CACHES:
default:
BACKEND: 'django.core.cache.backends.memcached.MemcachedCache'
KEY_PREFIX: 'default'
LOCATION: '{{ COURSE_DISCOVERY_MEMCACHE }}'
COURSE_DISCOVERY_VERSION: "master"
COURSE_DISCOVERY_DJANGO_SETTINGS_MODULE: "course_discovery.settings.production"
COURSE_DISCOVERY_URL_ROOT: 'http://course_discovery:18381'
COURSE_DISCOVERY_OAUTH_URL_ROOT: 'http://127.0.0.1:8000'
COURSE_DISCOVERY_SECRET_KEY: 'Your secret key here'
COURSE_DISCOVERY_TIME_ZONE: 'UTC'
COURSE_DISCOVERY_LANGUAGE_CODE: 'en-us'
# Used to automatically configure OAuth2 Client
COURSE_DISCOVERY_SOCIAL_AUTH_EDX_OIDC_KEY : 'course_discovery-key'
COURSE_DISCOVERY_SOCIAL_AUTH_EDX_OIDC_SECRET : 'course_discovery-secret'
COURSE_DISCOVERY_SOCIAL_AUTH_REDIRECT_IS_HTTPS: false
COURSE_DISCOVERY_PLATFORM_NAME: 'Your Platform Name Here'
COURSE_DISCOVERY_ECOMMERCE_API_URL: 'https://replace-me/'
COURSE_DISCOVERY_SERVICE_CONFIG:
SECRET_KEY: '{{ COURSE_DISCOVERY_SECRET_KEY }}'
TIME_ZONE: '{{ COURSE_DISCOVERY_TIME_ZONE }}'
LANGUAGE_CODE: '{{ COURSE_DISCOVERY_LANGUAGE_CODE }}'
SOCIAL_AUTH_EDX_OIDC_KEY: '{{ COURSE_DISCOVERY_SOCIAL_AUTH_EDX_OIDC_KEY }}'
SOCIAL_AUTH_EDX_OIDC_SECRET: '{{ COURSE_DISCOVERY_SOCIAL_AUTH_EDX_OIDC_SECRET }}'
SOCIAL_AUTH_EDX_OIDC_ID_TOKEN_DECRYPTION_KEY: '{{ COURSE_DISCOVERY_SOCIAL_AUTH_EDX_OIDC_SECRET }}'
SOCIAL_AUTH_EDX_OIDC_URL_ROOT: '{{ COURSE_DISCOVERY_OAUTH_URL_ROOT }}/oauth2'
SOCIAL_AUTH_REDIRECT_IS_HTTPS: '{{ COURSE_DISCOVERY_SOCIAL_AUTH_REDIRECT_IS_HTTPS }}'
STATIC_ROOT: "{{ COMMON_DATA_DIR }}/{{ course_discovery_service_name }}/staticfiles"
# db config
DATABASE_OPTIONS:
connect_timeout: 10
DATABASES: '{{ COURSE_DISCOVERY_DATABASES }}'
ELASTICSEARCH: '{{ COURSE_DISCOVERY_ELASTICSEARCH }}'
CACHES: '{{ COURSE_DISCOVERY_CACHES }}'
PLATFORM_NAME: '{{ COURSE_DISCOVERY_PLATFORM_NAME }}'
ECOMMERCE_API_URL: '{{ COURSE_DISCOVERY_ECOMMERCE_API_URL }}'
COURSE_DISCOVERY_REPOS:
- PROTOCOL: "{{ COMMON_GIT_PROTOCOL }}"
DOMAIN: "{{ COMMON_GIT_MIRROR }}"
PATH: "{{ COMMON_GIT_PATH }}"
REPO: course-discovery.git
VERSION: "{{ COURSE_DISCOVERY_VERSION }}"
DESTINATION: "{{ course_discovery_code_dir }}"
SSH_KEY: "{{ COURSE_DISCOVERY_GIT_IDENTITY }}"
COURSE_DISCOVERY_GUNICORN_WORKERS: "2"
COURSE_DISCOVERY_GUNICORN_EXTRA: ""
COURSE_DISCOVERY_GUNICORN_EXTRA_CONF: ""
COURSE_DISCOVERY_GUNICORN_WORKER_CLASS: "gevent"
COURSE_DISCOVERY_HOSTNAME: '~^((stage|prod)-)?course-discovery.*'
nginx_course_discovery_gunicorn_hosts:
- 127.0.0.1
#
# vars are namespace with the module name.
#
course_discovery_role_name: course_discovery
course_discovery_venv_dir: "{{ course_discovery_home }}/venvs/{{ course_discovery_service_name }}"
course_discovery_environment:
DJANGO_SETTINGS_MODULE: "{{ COURSE_DISCOVERY_DJANGO_SETTINGS_MODULE }}"
COURSE_DISCOVERY_CFG: "{{ COMMON_CFG_DIR }}/{{ course_discovery_service_name }}.yml"
PATH: "{{ course_discovery_venv_dir }}/bin:{{ ansible_env.PATH }}"
course_discovery_migration_environment:
DJANGO_SETTINGS_MODULE: "{{ COURSE_DISCOVERY_DJANGO_SETTINGS_MODULE }}"
COURSE_DISCOVERY_CFG: "{{ COMMON_CFG_DIR }}/{{ course_discovery_service_name }}.yml"
PATH: "{{ course_discovery_venv_dir }}/bin:{{ ansible_env.PATH }}"
DB_MIGRATION_USER: "{{ COMMON_MYSQL_MIGRATE_USER }}"
DB_MIGRATION_PASS: "{{ COMMON_MYSQL_MIGRATE_PASS }}"
course_discovery_service_name: "course_discovery"
course_discovery_user: "{{ course_discovery_service_name }}"
course_discovery_home: "{{ COMMON_APP_DIR }}/{{ course_discovery_service_name }}"
course_discovery_code_dir: "{{ course_discovery_home }}/{{ course_discovery_service_name }}"
course_discovery_gunicorn_host: "127.0.0.1"
course_discovery_gunicorn_port: 8381
course_discovery_gunicorn_timeout: 300
course_discovery_log_dir: "{{ COMMON_LOG_DIR }}/{{ course_discovery_service_name }}"
#
# OS packages
#
course_discovery_debian_pkgs:
- libmysqlclient-dev
- libssl-dev
course_discovery_redhat_pkgs: []
#!/usr/bin/env bash
# {{ ansible_managed }}
{% set course_discovery_venv_bin = course_discovery_home + "/venvs/" + course_discovery_service_name + "/bin" %}
{% if COMMON_ENABLE_NEWRELIC_APP %}
{% set executable = course_discovery_venv_bin + '/newrelic-admin run-program ' + course_discovery_venv_bin + '/gunicorn' %}
{% else %}
{% set executable = course_discovery_venv_bin + '/gunicorn' %}
{% endif %}
{% if COMMON_ENABLE_NEWRELIC_APP %}
export NEW_RELIC_APP_NAME="{{ COURSE_DISCOVERY_NEWRELIC_APPNAME }}"
export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"
{% endif -%}
source {{ course_discovery_home }}/course_discovery_env
{{ executable }} -c {{ course_discovery_home }}/course_discovery_gunicorn.py {{ COURSE_DISCOVERY_GUNICORN_EXTRA }} course_discovery.wsgi:application
"""
gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
{{ ansible_managed }}
"""
timeout = {{ course_discovery_gunicorn_timeout }}
bind = "{{ course_discovery_gunicorn_host }}:{{ course_discovery_gunicorn_port }}"
pythonpath = "{{ course_discovery_code_dir }}"
workers = {{ COURSE_DISCOVERY_GUNICORN_WORKERS }}
worker_class = "{{ COURSE_DISCOVERY_GUNICORN_WORKER_CLASS }}"
{{ COURSE_DISCOVERY_GUNICORN_EXTRA_CONF }}
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://github.com/edx/configuration/wiki
# code style: https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Defaults for role discovery
#
DISCOVERY_GIT_IDENTITY: !!null
# depends upon Newrelic being enabled via COMMON_ENABLE_NEWRELIC
# and a key being provided via NEWRELIC_LICENSE_KEY
DISCOVERY_NEWRELIC_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ discovery_service_name }}"
DISCOVERY_PIP_EXTRA_ARGS: "-i {{ COMMON_PYPI_MIRROR_URL }}"
DISCOVERY_NGINX_PORT: 18381
DISCOVERY_SSL_NGINX_PORT: 48381
DISCOVERY_DEFAULT_DB_NAME: 'discovery'
DISCOVERY_MYSQL: 'localhost'
# MySQL usernames are limited to 16 characters
DISCOVERY_MYSQL_USER: 'discov001'
DISCOVERY_MYSQL_PASSWORD: 'password'
DISCOVERY_DATABASES:
# rw user
default:
ENGINE: 'django.db.backends.mysql'
NAME: '{{ DISCOVERY_DEFAULT_DB_NAME }}'
USER: '{{ DISCOVERY_MYSQL_USER }}'
PASSWORD: '{{ DISCOVERY_MYSQL_PASSWORD }}'
HOST: '{{ DISCOVERY_MYSQL }}'
PORT: '3306'
ATOMIC_REQUESTS: true
CONN_MAX_AGE: 60
DISCOVERY_ELASTICSEARCH_HOST: 'localhost'
DISCOVERY_ES_INDEX: 'discovery'
DISCOVERY_ELASTICSEARCH:
host: '{{ DISCOVERY_ELASTICSEARCH_HOST }}'
index: '{{ DISCOVERY_ES_INDEX }}'
DISCOVERY_DB_ADMIN_USER: 'root'
DISCOVERY_DB_ADMIN_PASSWORD: ''
DISCOVERY_MYSQL_MATCHER: 'localhost'
DISCOVERY_MEMCACHE: [ 'memcache' ]
DISCOVERY_CACHES:
default:
BACKEND: 'django.core.cache.backends.memcached.MemcachedCache'
KEY_PREFIX: 'default'
LOCATION: '{{ DISCOVERY_MEMCACHE }}'
DISCOVERY_VERSION: "master"
DISCOVERY_DJANGO_SETTINGS_MODULE: "course_discovery.settings.production"
DISCOVERY_URL_ROOT: 'http://discovery:18381'
DISCOVERY_OAUTH_URL_ROOT: 'http://127.0.0.1:8000'
DISCOVERY_SECRET_KEY: 'Your secret key here'
DISCOVERY_TIME_ZONE: 'UTC'
DISCOVERY_LANGUAGE_CODE: 'en-us'
# Used to automatically configure OAuth2 Client
DISCOVERY_SOCIAL_AUTH_EDX_OIDC_KEY : 'discovery-key'
DISCOVERY_SOCIAL_AUTH_EDX_OIDC_SECRET : 'discovery-secret'
DISCOVERY_SOCIAL_AUTH_REDIRECT_IS_HTTPS: false
DISCOVERY_PLATFORM_NAME: 'Your Platform Name Here'
DISCOVERY_ECOMMERCE_API_URL: 'https://replace-me/'
DISCOVERY_SERVICE_CONFIG:
SECRET_KEY: '{{ DISCOVERY_SECRET_KEY }}'
TIME_ZONE: '{{ DISCOVERY_TIME_ZONE }}'
LANGUAGE_CODE: '{{ DISCOVERY_LANGUAGE_CODE }}'
SOCIAL_AUTH_EDX_OIDC_KEY: '{{ DISCOVERY_SOCIAL_AUTH_EDX_OIDC_KEY }}'
SOCIAL_AUTH_EDX_OIDC_SECRET: '{{ DISCOVERY_SOCIAL_AUTH_EDX_OIDC_SECRET }}'
SOCIAL_AUTH_EDX_OIDC_ID_TOKEN_DECRYPTION_KEY: '{{ DISCOVERY_SOCIAL_AUTH_EDX_OIDC_SECRET }}'
SOCIAL_AUTH_EDX_OIDC_URL_ROOT: '{{ DISCOVERY_OAUTH_URL_ROOT }}/oauth2'
SOCIAL_AUTH_REDIRECT_IS_HTTPS: '{{ DISCOVERY_SOCIAL_AUTH_REDIRECT_IS_HTTPS }}'
STATIC_ROOT: "{{ COMMON_DATA_DIR }}/{{ discovery_service_name }}/staticfiles"
# db config
DATABASE_OPTIONS:
connect_timeout: 10
DATABASES: '{{ DISCOVERY_DATABASES }}'
ELASTICSEARCH: '{{ DISCOVERY_ELASTICSEARCH }}'
CACHES: '{{ DISCOVERY_CACHES }}'
PLATFORM_NAME: '{{ DISCOVERY_PLATFORM_NAME }}'
ECOMMERCE_API_URL: '{{ DISCOVERY_ECOMMERCE_API_URL }}'
DISCOVERY_REPOS:
- PROTOCOL: "{{ COMMON_GIT_PROTOCOL }}"
DOMAIN: "{{ COMMON_GIT_MIRROR }}"
PATH: "{{ COMMON_GIT_PATH }}"
REPO: course-discovery.git
VERSION: "{{ DISCOVERY_VERSION }}"
DESTINATION: "{{ discovery_code_dir }}"
SSH_KEY: "{{ DISCOVERY_GIT_IDENTITY }}"
DISCOVERY_GUNICORN_WORKERS: "2"
DISCOVERY_GUNICORN_EXTRA: ""
DISCOVERY_GUNICORN_EXTRA_CONF: ""
DISCOVERY_GUNICORN_WORKER_CLASS: "gevent"
DISCOVERY_HOSTNAME: '~^((stage|prod)-)?discovery.*'
nginx_discovery_gunicorn_hosts:
- 127.0.0.1
#
# vars are namespace with the module name.
#
discovery_role_name: discovery
discovery_venv_dir: "{{ discovery_home }}/venvs/{{ discovery_service_name }}"
discovery_environment:
DJANGO_SETTINGS_MODULE: "{{ DISCOVERY_DJANGO_SETTINGS_MODULE }}"
# rename should synch with app
COURSE_DISCOVERY_CFG: "{{ COMMON_CFG_DIR }}/{{ discovery_service_name }}.yml"
PATH: "{{ discovery_venv_dir }}/bin:{{ ansible_env.PATH }}"
discovery_migration_environment:
DJANGO_SETTINGS_MODULE: "{{ DISCOVERY_DJANGO_SETTINGS_MODULE }}"
# rename should synch with app
COURSE_DISCOVERY_CFG: "{{ COMMON_CFG_DIR }}/{{ discovery_service_name }}.yml"
PATH: "{{ discovery_venv_dir }}/bin:{{ ansible_env.PATH }}"
DB_MIGRATION_USER: "{{ COMMON_MYSQL_MIGRATE_USER }}"
DB_MIGRATION_PASS: "{{ COMMON_MYSQL_MIGRATE_PASS }}"
discovery_service_name: "discovery"
discovery_user: "{{ discovery_service_name }}"
discovery_home: "{{ COMMON_APP_DIR }}/{{ discovery_service_name }}"
discovery_code_dir: "{{ discovery_home }}/{{ discovery_service_name }}"
discovery_gunicorn_host: "127.0.0.1"
discovery_gunicorn_port: 8381
discovery_gunicorn_timeout: 300
discovery_log_dir: "{{ COMMON_LOG_DIR }}/{{ discovery_service_name }}"
#
# OS packages
#
discovery_debian_pkgs:
- libmysqlclient-dev
- libssl-dev
discovery_redhat_pkgs: []
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT # license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
# #
## ##
# Role includes for role course_discovery # Role includes for role discovery
# #
# Example: # Example:
# #
...@@ -22,11 +22,11 @@ dependencies: ...@@ -22,11 +22,11 @@ dependencies:
- common - common
- supervisor - supervisor
- role: edx_service - role: edx_service
edx_service_name: "{{ course_discovery_service_name }}" edx_service_name: "{{ discovery_service_name }}"
edx_service_config: "{{ COURSE_DISCOVERY_SERVICE_CONFIG }}" edx_service_config: "{{ DISCOVERY_SERVICE_CONFIG }}"
edx_service_repos: "{{ COURSE_DISCOVERY_REPOS }}" edx_service_repos: "{{ DISCOVERY_REPOS }}"
edx_service_user: "{{ course_discovery_user }}" edx_service_user: "{{ discovery_user }}"
edx_service_home: "{{ course_discovery_home }}" edx_service_home: "{{ discovery_home }}"
edx_service_packages: edx_service_packages:
debian: "{{ course_discovery_debian_pkgs }}" debian: "{{ discovery_debian_pkgs }}"
redhat: "{{ course_discovery_redhat_pkgs }}" redhat: "{{ discovery_redhat_pkgs }}"
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# #
# #
# #
# Tasks for role course_discovery # Tasks for role discovery
# #
# Overview: # Overview:
# #
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
- name: add gunicorn configuration file - name: add gunicorn configuration file
template: template:
src: edx/app/course_discovery/course_discovery_gunicorn.py.j2 src: edx/app/discovery/discovery_gunicorn.py.j2
dest: "{{ course_discovery_home }}/course_discovery_gunicorn.py" dest: "{{ discovery_home }}/discovery_gunicorn.py"
sudo_user: "{{ course_discovery_user }}" sudo_user: "{{ discovery_user }}"
tags: tags:
- install - install
- install:configuration - install:configuration
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
- install:system-requirements - install:system-requirements
- name: install python3.5 - name: install python3.5
apt: pkg={{ item }} apt:
name: "{{ item }}"
with_items: with_items:
- python3.5 - python3.5
- python3.5-dev - python3.5-dev
...@@ -47,10 +48,10 @@ ...@@ -47,10 +48,10 @@
- install:system-requirements - install:system-requirements
- name: build virtualenv - name: build virtualenv
command: "virtualenv --python=python3.5 {{ course_discovery_venv_dir }}" command: "virtualenv --python=python3.5 {{ discovery_venv_dir }}"
args: args:
creates: "{{ course_discovery_venv_dir }}/bin/pip" creates: "{{ discovery_venv_dir }}/bin/pip"
sudo_user: "{{ course_discovery_user }}" sudo_user: "{{ discovery_user }}"
tags: tags:
- install - install
- install:system-requirements - install:system-requirements
...@@ -58,9 +59,9 @@ ...@@ -58,9 +59,9 @@
- name: install application requirements - name: install application requirements
command: make requirements command: make requirements
args: args:
chdir: "{{ course_discovery_code_dir }}" chdir: "{{ discovery_code_dir }}"
sudo_user: "{{ course_discovery_user }}" sudo_user: "{{ discovery_user }}"
environment: "{{ course_discovery_environment }}" environment: "{{ discovery_environment }}"
tags: tags:
- install - install
- install:app-requirements - install:app-requirements
...@@ -68,17 +69,17 @@ ...@@ -68,17 +69,17 @@
- name: install development requirements - name: install development requirements
command: make local-requirements command: make local-requirements
args: args:
chdir: "{{ course_discovery_code_dir }}" chdir: "{{ discovery_code_dir }}"
sudo_user: "{{ course_discovery_user }}" sudo_user: "{{ discovery_user }}"
environment: "{{ course_discovery_environment }}" environment: "{{ discovery_environment }}"
tags: tags:
- devstack - devstack
- devstack:install - devstack:install
- name: wait for database - name: wait for database
wait_for: wait_for:
host: "{{ COURSE_DISCOVERY_DATABASES.default.HOST }}" host: "{{ DISCOVERY_DATABASES.default.HOST }}"
port: "{{ COURSE_DISCOVERY_DATABASES.default.PORT }}" port: "{{ DISCOVERY_DATABASES.default.PORT }}"
delay: 2 delay: 2
tags: tags:
- migrate - migrate
...@@ -86,10 +87,10 @@ ...@@ -86,10 +87,10 @@
- name: create databases - name: create databases
mysql_db: mysql_db:
login_host: "{{ COURSE_DISCOVERY_DATABASES.default.HOST }}" login_host: "{{ DISCOVERY_DATABASES.default.HOST }}"
login_user: "{{ COURSE_DISCOVERY_DB_ADMIN_USER }}" login_user: "{{ DISCOVERY_DB_ADMIN_USER }}"
login_password: "{{ COURSE_DISCOVERY_DB_ADMIN_PASSWORD }}" login_password: "{{ DISCOVERY_DB_ADMIN_PASSWORD }}"
db: "{{ COURSE_DISCOVERY_DEFAULT_DB_NAME }}" db: "{{ DISCOVERY_DEFAULT_DB_NAME }}"
state: present state: present
encoding: utf8 encoding: utf8
tags: tags:
...@@ -98,16 +99,16 @@ ...@@ -98,16 +99,16 @@
- name: create database users - name: create database users
mysql_user: mysql_user:
login_host: "{{ COURSE_DISCOVERY_DATABASES.default.HOST }}" login_host: "{{ DISCOVERY_DATABASES.default.HOST }}"
login_user: "{{ COURSE_DISCOVERY_DB_ADMIN_USER }}" login_user: "{{ DISCOVERY_DB_ADMIN_USER }}"
login_password: "{{ COURSE_DISCOVERY_DB_ADMIN_PASSWORD }}" login_password: "{{ DISCOVERY_DB_ADMIN_PASSWORD }}"
name: "{{ item.name }}" name: "{{ item.name }}"
host: "{{ COURSE_DISCOVERY_MYSQL_MATCHER }}" host: "{{ DISCOVERY_MYSQL_MATCHER }}"
password: "{{ item.password }}" password: "{{ item.password }}"
priv: "{{ COURSE_DISCOVERY_DEFAULT_DB_NAME }}.*:ALL" priv: "{{ DISCOVERY_DEFAULT_DB_NAME }}.*:ALL"
with_items: with_items:
- name: "{{ COURSE_DISCOVERY_DATABASES.default.USER }}" - name: "{{ DISCOVERY_DATABASES.default.USER }}"
password: "{{ COURSE_DISCOVERY_DATABASES.default.PASSWORD }}" password: "{{ DISCOVERY_DATABASES.default.PASSWORD }}"
- name: "{{ COMMON_MYSQL_MIGRATE_USER }}" - name: "{{ COMMON_MYSQL_MIGRATE_USER }}"
password: "{{ COMMON_MYSQL_MIGRATE_PASS }}" password: "{{ COMMON_MYSQL_MIGRATE_PASS }}"
tags: tags:
...@@ -117,9 +118,9 @@ ...@@ -117,9 +118,9 @@
- name: migrate database - name: migrate database
command: make migrate command: make migrate
args: args:
chdir: "{{ course_discovery_code_dir }}" chdir: "{{ discovery_code_dir }}"
sudo_user: "{{ course_discovery_user }}" sudo_user: "{{ discovery_user }}"
environment: "{{ course_discovery_migration_environment }}" environment: "{{ discovery_migration_environment }}"
when: migrate_db is defined and migrate_db|lower == "yes" when: migrate_db is defined and migrate_db|lower == "yes"
tags: tags:
- migrate - migrate
...@@ -127,8 +128,8 @@ ...@@ -127,8 +128,8 @@
- name: write out the supervisor wrapper - name: write out the supervisor wrapper
template: template:
src: "edx/app/course_discovery/course_discovery.sh.j2" src: "edx/app/discovery/discovery.sh.j2"
dest: "{{ course_discovery_home }}/{{ course_discovery_service_name }}.sh" dest: "{{ discovery_home }}/{{ discovery_service_name }}.sh"
mode: 0650 mode: 0650
owner: "{{ supervisor_user }}" owner: "{{ supervisor_user }}"
group: "{{ common_web_user }}" group: "{{ common_web_user }}"
...@@ -138,8 +139,8 @@ ...@@ -138,8 +139,8 @@
- name: write supervisord config - name: write supervisord config
template: template:
src: "edx/app/supervisor/conf.d.available/course_discovery.conf.j2" src: "edx/app/supervisor/conf.d.available/discovery.conf.j2"
dest: "{{ supervisor_available_dir }}/{{ course_discovery_service_name }}.conf" dest: "{{ supervisor_available_dir }}/{{ discovery_service_name }}.conf"
owner: "{{ supervisor_user }}" owner: "{{ supervisor_user }}"
group: "{{ common_web_user }}" group: "{{ common_web_user }}"
mode: 0644 mode: 0644
...@@ -149,8 +150,8 @@ ...@@ -149,8 +150,8 @@
- name: write devstack script - name: write devstack script
template: template:
src: "edx/app/course_discovery/devstack.sh.j2" src: "edx/app/discovery/devstack.sh.j2"
dest: "{{ course_discovery_home }}/devstack.sh" dest: "{{ discovery_home }}/devstack.sh"
owner: "{{ supervisor_user }}" owner: "{{ supervisor_user }}"
group: "{{ common_web_user }}" group: "{{ common_web_user }}"
mode: 0744 mode: 0744
...@@ -158,12 +159,12 @@ ...@@ -158,12 +159,12 @@
- devstack - devstack
- devstack:install - devstack:install
- name: setup the course_discovery env file - name: setup the discovery env file
template: template:
src: "./{{ course_discovery_home }}/{{ course_discovery_service_name }}_env.j2" src: "./{{ discovery_home }}/{{ discovery_service_name }}_env.j2"
dest: "{{ course_discovery_home }}/course_discovery_env" dest: "{{ discovery_home }}/discovery_env"
owner: "{{ course_discovery_user }}" owner: "{{ discovery_user }}"
group: "{{ course_discovery_user }}" group: "{{ discovery_user }}"
mode: 0644 mode: 0644
tags: tags:
- install - install
...@@ -171,8 +172,8 @@ ...@@ -171,8 +172,8 @@
- name: enable supervisor script - name: enable supervisor script
file: file:
src: "{{ supervisor_available_dir }}/{{ course_discovery_service_name }}.conf" src: "{{ supervisor_available_dir }}/{{ discovery_service_name }}.conf"
dest: "{{ supervisor_cfg_dir }}/{{ course_discovery_service_name }}.conf" dest: "{{ supervisor_cfg_dir }}/{{ discovery_service_name }}.conf"
state: link state: link
force: yes force: yes
when: not disable_edx_services when: not disable_edx_services
...@@ -189,8 +190,8 @@ ...@@ -189,8 +190,8 @@
- name: create symlinks from the venv bin dir - name: create symlinks from the venv bin dir
file: file:
src: "{{ course_discovery_venv_dir }}/bin/{{ item }}" src: "{{ discovery_venv_dir }}/bin/{{ item }}"
dest: "{{ COMMON_BIN_DIR }}/{{ item.split('.')[0] }}.course_discovery" dest: "{{ COMMON_BIN_DIR }}/{{ item.split('.')[0] }}.discovery"
state: link state: link
with_items: with_items:
- python - python
...@@ -202,8 +203,8 @@ ...@@ -202,8 +203,8 @@
- name: create symlinks from the repo dir - name: create symlinks from the repo dir
file: file:
src: "{{ course_discovery_code_dir }}/{{ item }}" src: "{{ discovery_code_dir }}/{{ item }}"
dest: "{{ COMMON_BIN_DIR }}/{{ item.split('.')[0] }}.course_discovery" dest: "{{ COMMON_BIN_DIR }}/{{ item.split('.')[0] }}.discovery"
state: link state: link
with_items: with_items:
- manage.py - manage.py
...@@ -214,9 +215,9 @@ ...@@ -214,9 +215,9 @@
- name: run collectstatic - name: run collectstatic
command: make static command: make static
args: args:
chdir: "{{ course_discovery_code_dir }}" chdir: "{{ discovery_code_dir }}"
sudo_user: "{{ course_discovery_user }}" sudo_user: "{{ discovery_user }}"
environment: "{{ course_discovery_environment }}" environment: "{{ discovery_environment }}"
tags: tags:
- assets - assets
- assets:gather - assets:gather
...@@ -226,28 +227,32 @@ ...@@ -226,28 +227,32 @@
state: restarted state: restarted
supervisorctl_path: "{{ supervisor_ctl }}" supervisorctl_path: "{{ supervisor_ctl }}"
config: "{{ supervisor_cfg }}" config: "{{ supervisor_cfg }}"
name: "{{ course_discovery_service_name }}" name: "{{ discovery_service_name }}"
when: not disable_edx_services when: not disable_edx_services
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
tags: tags:
- manage - manage
- manage:start - manage:start
- name: Copying nginx configs for course_discovery - name: Copying nginx configs for discovery
template: > template:
src=edx/app/nginx/sites-available/course_discovery.j2 src: "edx/app/nginx/sites-available/discovery.j2"
dest={{ nginx_sites_available_dir }}/course_discovery dest: "{{ nginx_sites_available_dir }}/discovery"
owner=root group={{ common_web_user }} mode=0640 owner: root
group: "{{ common_web_user }}"
mode: 0640
notify: reload nginx notify: reload nginx
tags: tags:
- install - install
- install:vhosts - install:vhosts
- name: Creating nginx config links for course_discovery - name: Creating nginx config links for discovery
file: > file:
src={{ nginx_sites_available_dir }}/course_discovery src: "{{ nginx_sites_available_dir }}/discovery"
dest={{ nginx_sites_enabled_dir }}/course_discovery dest: "{{ nginx_sites_enabled_dir }}/discovery"
state=link owner=root group=root state: link
owner: root
group: root
notify: reload nginx notify: reload nginx
tags: tags:
- install - install
......
...@@ -2,29 +2,30 @@ ...@@ -2,29 +2,30 @@
# {{ ansible_managed }} # {{ ansible_managed }}
source {{ course_discovery_home }}/course_discovery_env source {{ discovery_home }}/discovery_env
COMMAND=$1 COMMAND=$1
case $COMMAND in case $COMMAND in
start) start)
{% set course_discovery_venv_bin = course_discovery_home + "/venvs/" + course_discovery_service_name + "/bin" %} {% set discovery_venv_bin = discovery_home + "/venvs/" + discovery_service_name + "/bin" %}
{% set executable = course_discovery_venv_bin + '/gunicorn' %} {% set executable = discovery_venv_bin + '/gunicorn' %}
cd /edx/app/edx_ansible/edx_ansible/docker/plays cd /edx/app/edx_ansible/edx_ansible/docker/plays
sudo ansible-playbook course_discovery.yml -c local -i '127.0.0.1,' \
sudo ansible-playbook discovery.yml -c local -i '127.0.0.1,' \
-t 'install:app-requirements,assets:gather,devstack,migrate' \ -t 'install:app-requirements,assets:gather,devstack,migrate' \
--extra-vars="migrate_db=yes" \ --extra-vars="migrate_db=yes" \
--extra-vars="@/ansible_overrides.yml" --extra-vars="@/ansible_overrides.yml"
{{ executable }} -c {{ course_discovery_home }}/course_discovery_gunicorn.py \ {{ executable }} -c {{ discovery_home }}/discovery_gunicorn.py \
{{ COURSE_DISCOVERY_GUNICORN_EXTRA }} \ {{ DISCOVERY_GUNICORN_EXTRA }} \
--reload \ --reload \
course_discovery.wsgi:application discovery.wsgi:application
;; ;;
open) open)
cd {{ course_discovery_code_dir }} cd {{ discovery_code_dir }}
. {{ course_discovery_venv_bin }}/activate . {{ discovery_venv_bin }}/activate
/bin/bash /bin/bash
;; ;;
esac esac
#!/usr/bin/env bash
# {{ ansible_managed }}
{% set discovery_venv_bin = discovery_home + "/venvs/" + discovery_service_name + "/bin" %}
{% if COMMON_ENABLE_NEWRELIC_APP %}
{% set executable = discovery_venv_bin + '/newrelic-admin run-program ' + discovery_venv_bin + '/gunicorn' %}
{% else %}
{% set executable = discovery_venv_bin + '/gunicorn' %}
{% endif %}
{% if COMMON_ENABLE_NEWRELIC_APP %}
export NEW_RELIC_APP_NAME="{{ DISCOVERY_NEWRELIC_APPNAME }}"
export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"
{% endif -%}
source {{ discovery_home }}/discovery_env
{{ executable }} -c {{ discovery_home }}/discovery_gunicorn.py {{ DISCOVERY_GUNICORN_EXTRA }} discovery.wsgi:application
# {{ ansible_managed }} # {{ ansible_managed }}
{% for name,value in course_discovery_environment.items() -%} {% for name,value in discovery_environment.items() -%}
{%- if value -%} {%- if value -%}
export {{ name }}="{{ value }}" export {{ name }}="{{ value }}"
{% endif %} {% endif %}
......
"""
gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
{{ ansible_managed }}
"""
timeout = {{ discovery_gunicorn_timeout }}
bind = "{{ discovery_gunicorn_host }}:{{ discovery_gunicorn_port }}"
pythonpath = "{{ discovery_code_dir }}"
workers = {{ DISCOVERY_GUNICORN_WORKERS }}
worker_class = "{{ DISCOVERY_GUNICORN_WORKER_CLASS }}"
{{ DISCOVERY_GUNICORN_EXTRA_CONF }}
...@@ -3,25 +3,25 @@ ...@@ -3,25 +3,25 @@
# #
{% if nginx_default_sites is defined and "course_discovery" in nginx_default_sites %} {% if nginx_default_sites is defined and "discovery" in nginx_default_sites %}
{% set default_site = "default" %} {% set default_site = "default" %}
{% else %} {% else %}
{% set default_site = "" %} {% set default_site = "" %}
{% endif %} {% endif %}
upstream course_discovery_app_server { upstream discovery_app_server {
{% for host in nginx_course_discovery_gunicorn_hosts %} {% for host in nginx_discovery_gunicorn_hosts %}
server {{ host }}:{{ course_discovery_gunicorn_port }} fail_timeout=0; server {{ host }}:{{ discovery_gunicorn_port }} fail_timeout=0;
{% endfor %} {% endfor %}
} }
server { server {
server_name {{ COURSE_DISCOVERY_HOSTNAME }}; server_name {{ DISCOVERY_HOSTNAME }};
{% if NGINX_ENABLE_SSL %} {% if NGINX_ENABLE_SSL %}
listen {{ COURSE_DISCOVERY_NGINX_PORT }} {{ default_site }}; listen {{ DISCOVERY_NGINX_PORT }} {{ default_site }};
listen {{ COURSE_DISCOVERY_SSL_NGINX_PORT }} ssl; listen {{ DISCOVERY_SSL_NGINX_PORT }} ssl;
ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }}; ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }};
ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }}; ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }};
...@@ -29,11 +29,11 @@ server { ...@@ -29,11 +29,11 @@ server {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
{% else %} {% else %}
listen {{ COURSE_DISCOVERY_NGINX_PORT }} {{ default_site }}; listen {{ DISCOVERY_NGINX_PORT }} {{ default_site }};
{% endif %} {% endif %}
location ~ ^/static/(?P<file>.*) { location ~ ^/static/(?P<file>.*) {
root {{ COMMON_DATA_DIR }}/{{ course_discovery_service_name }}; root {{ COMMON_DATA_DIR }}/{{ discovery_service_name }};
try_files /staticfiles/$file =404; try_files /staticfiles/$file =404;
} }
...@@ -61,7 +61,7 @@ server { ...@@ -61,7 +61,7 @@ server {
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_redirect off; proxy_redirect off;
proxy_pass http://course_discovery_app_server; proxy_pass http://discovery_app_server;
} }
# Forward to HTTPS if we're an HTTP request... # Forward to HTTPS if we're an HTTP request...
......
# #
# {{ ansible_managed }} # {{ ansible_managed }}
# #
[program:{{ course_discovery_service_name }}] [program:{{ discovery_service_name }}]
command={{ course_discovery_home }}/{{ course_discovery_service_name }}.sh command={{ discovery_home }}/{{ discovery_service_name }}.sh
user={{ common_web_user }} user={{ common_web_user }}
directory={{ course_discovery_code_dir }} directory={{ discovery_code_dir }}
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
killasgroup=true killasgroup=true
......
...@@ -57,7 +57,7 @@ repos_to_cmd["edx-ora2"]="$edx_ansible_cmd ora2.yml -e 'ora2_version=$2'" ...@@ -57,7 +57,7 @@ repos_to_cmd["edx-ora2"]="$edx_ansible_cmd ora2.yml -e 'ora2_version=$2'"
repos_to_cmd["insights"]="$edx_ansible_cmd insights.yml -e 'INSIGHTS_VERSION=$2'" repos_to_cmd["insights"]="$edx_ansible_cmd insights.yml -e 'INSIGHTS_VERSION=$2'"
repos_to_cmd["ecommerce"]="$edx_ansible_cmd ecommerce.yml -e 'ECOMMERCE_VERSION=$2'" repos_to_cmd["ecommerce"]="$edx_ansible_cmd ecommerce.yml -e 'ECOMMERCE_VERSION=$2'"
repos_to_cmd["programs"]="$edx_ansible_cmd programs.yml -e 'PROGRAMS_VERSION=$2'" repos_to_cmd["programs"]="$edx_ansible_cmd programs.yml -e 'PROGRAMS_VERSION=$2'"
repos_to_cmd["course_discovery"]="$edx_ansible_cmd course_discovery.yml -e 'COURSE_DISCOVERY_VERSION=$2'" repos_to_cmd["discovery"]="$edx_ansible_cmd discovery.yml -e 'DISCOVERY_VERSION=$2'"
if [[ -z $1 || -z $2 ]]; then if [[ -z $1 || -z $2 ]]; then
......
...@@ -78,8 +78,7 @@ ...@@ -78,8 +78,7 @@
value: "{{ item[0].public_dns_name }}" value: "{{ item[0].public_dns_name }}"
with_nested: with_nested:
- ec2.instances - ec2.instances
- ['studio', 'ecommerce', 'preview', 'programs', 'course-discovery', 'credentials'] - ['studio', 'ecommerce', 'preview', 'programs', 'discovery', 'credentials']
- name: Add new instance to host group - name: Add new instance to host group
local_action: local_action:
......
#!/usr/bin/env bash !/usr/bin/env bash
# Ansible provisioning wrapper script that # Ansible provisioning wrapper script that
# assumes the following parameters set # assumes the following parameters set
...@@ -181,10 +181,9 @@ CREDENTIALS_NGINX_PORT: 80 ...@@ -181,10 +181,9 @@ CREDENTIALS_NGINX_PORT: 80
CREDENTIALS_SSL_NGINX_PORT: 443 CREDENTIALS_SSL_NGINX_PORT: 443
CREDENTIALS_VERSION: $credentials_version CREDENTIALS_VERSION: $credentials_version
COURSE_DISCOVERY_NGINX_PORT: 80 DISCOVERY_NGINX_PORT: 80
COURSE_DISCOVERY_SSL_NGINX_PORT: 443 DISCOVERY_SSL_NGINX_PORT: 443
COURSE_DISCOVERY_VERSION: $course_discovery_version DISCOVERY_VERSION: $discovery_version
NGINX_SET_X_FORWARDED_HEADERS: True NGINX_SET_X_FORWARDED_HEADERS: True
NGINX_REDIRECT_TO_HTTPS: True NGINX_REDIRECT_TO_HTTPS: True
EDX_ANSIBLE_DUMP_VARS: true EDX_ANSIBLE_DUMP_VARS: true
...@@ -271,9 +270,9 @@ CREDENTIALS_URL_ROOT: "https://credentials-${deploy_host}" ...@@ -271,9 +270,9 @@ CREDENTIALS_URL_ROOT: "https://credentials-${deploy_host}"
CREDENTIALS_SOCIAL_AUTH_REDIRECT_IS_HTTPS: true CREDENTIALS_SOCIAL_AUTH_REDIRECT_IS_HTTPS: true
COURSE_DISCOVERY_ECOMMERCE_API_URL: "https://ecommerce-${deploy_host}/api/v2" COURSE_DISCOVERY_ECOMMERCE_API_URL: "https://ecommerce-${deploy_host}/api/v2"
COURSE_DISCOVERY_OAUTH_URL_ROOT: "https://${deploy_host}" DISCOVERY_OAUTH_URL_ROOT: "https://${deploy_host}"
COURSE_DISCOVERY_URL_ROOT: "https://course-discovery-${deploy_host}" DISCOVERY_URL_ROOT: "https://discovery-${deploy_host}"
COURSE_DISCOVERY_SOCIAL_AUTH_REDIRECT_IS_HTTPS: true DISCOVERY_SOCIAL_AUTH_REDIRECT_IS_HTTPS: true
EOF EOF
fi fi
...@@ -319,7 +318,8 @@ EOF ...@@ -319,7 +318,8 @@ EOF
fi fi
declare -A deploy declare -A deploy
roles="edxapp forum ecommerce programs credentials course_discovery notifier xqueue xserver certs demo testcourses" roles="edxapp forum ecommerce programs credentials discovery notifier xqueue xserver certs demo testcourses"
for role in $roles; do for role in $roles; do
deploy[$role]=${!role} deploy[$role]=${!role}
done done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment