Commit a9660c48 by Bilal

addressing Ed's comments

parent bb6875ed
# When running, do pass ACCESS_KEY for appneta account as an argument to playbook e.g.
# ansible-playbook appneta.yml -i "localhost," --extra-vars "ACCESS_KEY=xxx-xx-xx"
- name: Deploy appneta - name: Deploy appneta
hosts: all hosts: all
sudo: True sudo: True
gather_facts: True gather_facts: True
vars: vars:
EDXAPP_USE_APPNETA: true
NGINX_APT_REPO: "{{ appneta_apt_repo }}" NGINX_APT_REPO: "{{ appneta_apt_repo }}"
roles: roles:
- appneta - appneta
- edxapp
- nginx - nginx
...@@ -22,7 +22,7 @@ USE_STATIC_CONFIG: false ...@@ -22,7 +22,7 @@ USE_STATIC_CONFIG: false
apt_server: "{{ (USE_STATIC_CONFIG == true) | ternary('apt-static.appneta.com','apt.appneta.com') }}" apt_server: "{{ (USE_STATIC_CONFIG == true) | ternary('apt-static.appneta.com','apt.appneta.com') }}"
config_server: "{{ (USE_STATIC_CONFIG == true) | ternary('config-static.appneta.com','config.tv.appneta.com') }}" config_server: "{{ (USE_STATIC_CONFIG == true) | ternary('config-static.appneta.com','config.tv.appneta.com') }}"
skip_certs: true skip_certs: true
ACCESS_KEY: "eb3e9f99-f37e-4f66-b87b-cae73313ad9c" ACCESS_KEY: ""
install_sequencer: true install_sequencer: true
appneta_apt_repo: "deb http://{{ apt_server }}/{{ ACCESS_KEY }} {{ ansible_distribution_release }} main" appneta_apt_repo: "deb http://{{ apt_server }}/{{ ACCESS_KEY }} {{ ansible_distribution_release }} main"
# #
......
...@@ -20,10 +20,8 @@ ...@@ -20,10 +20,8 @@
# } # }
dependencies: dependencies:
- common - common
- supervisor
- role: edx_service - role: edx_service
edx_service_name: "{{ appneta_role_name }}" edx_service_name: "{{ appneta_role_name }}"
edx_service_user: "{{ appneta_user }}" edx_service_user: "{{ appneta_user }}"
edx_service_home: "{{ appneta_home }}" edx_service_home: "{{ appneta_home }}"
edx_service_packages:
debian: "{{ appneta_debian_pkgs }}"
redhat: "{{ appneta_redhat_pkgs }}"
...@@ -71,12 +71,13 @@ ...@@ -71,12 +71,13 @@
service: service:
name: appneta-sequencer name: appneta-sequencer
state: started state: started
enabled: yes
when: install_sequencer when: install_sequencer
- name: install oboe - name: install oboe
pip: pip:
name: oboe name: oboe
virtualenv: "{{ appneta_venv_dir }}r" virtualenv: "{{ edxapp_venv_dir }}"
virtualenv_command: virtualenv virtualenv_command: virtualenv
state: present state: present
sudo_user: "{{ appneta_user }}" sudo_user: "{{ edxapp_user }}"
...@@ -312,6 +312,8 @@ EDXAPP_PYTHON_SANDBOX: true ...@@ -312,6 +312,8 @@ EDXAPP_PYTHON_SANDBOX: true
# it puts the sandbox in 'complain' mode, for reporting but not enforcement # it puts the sandbox in 'complain' mode, for reporting but not enforcement
EDXAPP_SANDBOX_ENFORCE: true EDXAPP_SANDBOX_ENFORCE: true
# whether to use appneta or not
EDXAPP_USE_APPNETA: false
# Supply authorized keys used for remote management via the user # Supply authorized keys used for remote management via the user
# role. # role.
EDXAPP_AUTOMATOR_NAME: automator EDXAPP_AUTOMATOR_NAME: automator
......
...@@ -4,7 +4,9 @@ gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html ...@@ -4,7 +4,9 @@ gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
{{ ansible_managed }} {{ ansible_managed }}
""" """
import multiprocessing import multiprocessing
{% if EDXAPP_USE_APPNETA -%}
import oboeware.djangoware import oboeware.djangoware
{% endif -%}
preload_app = True preload_app = True
timeout = 300 timeout = 300
......
...@@ -4,7 +4,9 @@ gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html ...@@ -4,7 +4,9 @@ gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
{{ ansible_managed }} {{ ansible_managed }}
""" """
import multiprocessing import multiprocessing
{% if EDXAPP_USE_APPNETA -%}
import oboeware.djangoware import oboeware.djangoware
{% endif -%}
preload_app = True preload_app = True
timeout = 300 timeout = 300
......
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