Commit 34064986 by Fred Smith

Merge branch 'master' into derf/xsy

parents 5bac74fe c496c533
......@@ -3,8 +3,5 @@
hosts: all
sudo: True
gather_facts: True
vars:
serial_count: 1
serial: "{{ serial_count }}"
roles:
- xsy
......@@ -55,7 +55,8 @@ ECOMMERCE_WORKER_MAX_FULFILLMENT_RETRIES: 11
ECOMMERCE_WORKER_SERVICE_CONFIG:
BROKER_URL: '{{ ECOMMERCE_WORKER_BROKER_URL }}'
ECOMMERCE_API_ROOT: '{{ ECOMMERCE_WORKER_ECOMMERCE_API_ROOT }}'
WORKER_ACCESS_TOKEN: '{{ ECOMMERCE_WORKER_WORKER_ACCESS_TOKEN }}'
JWT_SECRET_KEY: 'insecure-secret-key'
JWT_ISSUER: '{{ ecommerce_worker_service_name }}'
MAX_FULFILLMENT_RETRIES: '{{ ECOMMERCE_WORKER_MAX_FULFILLMENT_RETRIES }}'
ecommerce_worker_environment:
......
......@@ -258,7 +258,7 @@ EDXAPP_FACEBOOK_API_VERSION: "v2.1"
EDXAPP_SOCIAL_MEDIA_FOOTER_URLS: {}
EDXAPP_MOBILE_STORE_URLS: {}
EDXAPP_FOOTER_ORGANIZATION_IMAGE: "images/logo.png"
EDXAPP_FOOTER_ORGANIZATION_IMAGE: "images/default-theme/logo.png"
EDXAPP_ENV_EXTRA: {}
EDXAPP_AUTH_EXTRA: {}
......
......@@ -42,6 +42,13 @@ localdev_accounts:
}
- {
user: "{{ ecommerce_worker_user|default('None') }}",
home: "{{ ecommerce_worker_home }}",
env: "ecommerce_worker_env",
repo: "ecommerce_worker"
}
- {
user: "{{ analytics_api_user|default('None') }}",
home: "{{ analytics_api_home }}",
env: "analytics_api_env",
......
......@@ -28,7 +28,7 @@ XSY_HTTPSERVER_PORT: '8081'
XSY_WORLD_WEATHER_KEY: !!null
xsy_role_name: xsy
xsy_service_name: xsy
xsy_user: xsy
xsy_app_dir: "{{ COMMON_APP_DIR }}/xsy"
......
- name: setup the xsy env
template: >
src="xsy_env.j2" dest="{{ xsy_app_dir }}/xsy_env"
owner="{{ xsy_user }}" group="{{ common_web_user }}"
mode=0644
notify: restart xsy
- name: checkout the code
git: >
dest="{{ xsy_code_dir }}" repo="{{ xsy_source_repo }}"
version="{{ xsy_version }}" accept_hostkey=yes
sudo_user: "{{ xsy_user }}"
register: xsy_checkout
notify: restart xsy
- name: install the requirements
pip: >
requirements="{{ xsy_requirements_file }}"
virtualenv="{{ xsy_venv_dir }}"
state=present
extra_args="-i {{ COMMON_PYPI_MIRROR_URL }}"
sudo_user: "{{ xsy_user }}"
notify: restart xsy
- name: create the supervisor wrapper
template: >
src="{{ xsy_supervisor_wrapper|basename }}.j2"
dest="{{ xsy_supervisor_wrapper }}"
mode=0755
sudo_user: "{{ xsy_user }}"
notify: restart xsy
- name: create a supervisor config
template: >
src=xsy.conf.j2 dest="{{ supervisor_available_dir }}/xsy.conf"
owner="{{ supervisor_user }}"
group="{{ supervisor_user }}"
sudo_user: "{{ supervisor_user }}"
notify: restart xsy
- name: enable the supervisor config
file: >
src="{{ supervisor_available_dir }}/xsy.conf"
dest="{{ supervisor_cfg_dir }}/xsy.conf"
state=link
force=yes
mode=0644
sudo_user: "{{ supervisor_user }}"
when: not disable_edx_services
notify: restart xsy
- name: update supervisor configuration
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
register: supervisor_update
changed_when: supervisor_update.stdout is defined and supervisor_update.stdout != ""
when: not disable_edx_services
- name: ensure xsy is started
supervisorctl: >
name=xsy
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=started
when: not disable_edx_services
- include: tag_ec2.yml tags=deploy
when: COMMON_TAG_EC2_INSTANCE
......@@ -34,4 +34,70 @@
- "{{ xsy_app_dir }}"
- "{{ xsy_venvs_dir }}"
- include: deploy.yml tags=deploy
- name: setup the xsy env
template: >
src="xsy_env.j2" dest="{{ xsy_app_dir }}/xsy_env"
owner="{{ xsy_user }}" group="{{ common_web_user }}"
mode=0644
notify: restart xsy
- name: checkout the code
git: >
dest="{{ xsy_code_dir }}" repo="{{ xsy_source_repo }}"
version="{{ xsy_version }}" accept_hostkey=yes
sudo_user: "{{ xsy_user }}"
register: xsy_checkout
notify: restart xsy
- name: install the requirements
pip: >
requirements="{{ xsy_requirements_file }}"
virtualenv="{{ xsy_venv_dir }}"
state=present
extra_args="-i {{ COMMON_PYPI_MIRROR_URL }}"
sudo_user: "{{ xsy_user }}"
notify: restart xsy
- name: create the supervisor wrapper
template: >
src="{{ xsy_supervisor_wrapper|basename }}.j2"
dest="{{ xsy_supervisor_wrapper }}"
mode=0755
sudo_user: "{{ xsy_user }}"
notify: restart xsy
- name: create a supervisor config
template: >
src=xsy.conf.j2 dest="{{ supervisor_available_dir }}/xsy.conf"
owner="{{ supervisor_user }}"
group="{{ supervisor_user }}"
sudo_user: "{{ supervisor_user }}"
notify: restart xsy
- name: enable the supervisor config
file: >
src="{{ supervisor_available_dir }}/xsy.conf"
dest="{{ supervisor_cfg_dir }}/xsy.conf"
state=link
force=yes
mode=0644
sudo_user: "{{ supervisor_user }}"
when: not disable_edx_services
notify: restart xsy
- name: update supervisor configuration
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
register: supervisor_update
changed_when: supervisor_update.stdout is defined and supervisor_update.stdout != ""
when: not disable_edx_services
- name: ensure xsy is started
supervisorctl: >
name=xsy
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=started
when: not disable_edx_services
- include: tag_ec2.yml tags=deploy
when: COMMON_TAG_EC2_INSTANCE
......@@ -24,6 +24,8 @@
- elasticsearch
- forum
- ecommerce
- ecommerce_worker
- { role: 'rabbitmq', rabbitmq_ip: '127.0.0.1' }
- role: notifier
NOTIFIER_DIGEST_TASK_INTERVAL: "5"
- role: ora
......
......@@ -13,6 +13,7 @@ themes_mount_dir = "themes"
forum_mount_dir = "cs_comments_service"
ora_mount_dir = "ora"
ecommerce_mount_dir = "ecommerce"
ecommerce_worker_mount_dir = "ecommerce-worker"
insights_mount_dir = "insights"
analytics_api_mount_dir = "analytics_api"
......@@ -23,6 +24,7 @@ if ENV['VAGRANT_MOUNT_BASE']
forum_mount_dir = ENV['VAGRANT_MOUNT_BASE'] + "/" + forum_mount_dir
ora_mount_dir = ENV['VAGRANT_MOUNT_BASE'] + "/" + ora_mount_dir
ecommerce_mount_dir = ENV['VAGRANT_MOUNT_BASE'] + "/" + ecommerce_mount_dir
ecommerce_worker_mount_dir = ENV['VAGRANT_MOUNT_BASE'] + "/" + ecommerce_worker_mount_dir
insights_mount_dir = ENV['VAGRANT_MOUNT_BASE'] + "/" + insights_mount_dir
analytics_api_mount_dir = ENV['VAGRANT_MOUNT_BASE'] + "/" + analytics_api_mount_dir
......@@ -66,6 +68,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
create: true, owner: "forum", group: "www-data"
config.vm.synced_folder "#{ecommerce_mount_dir}", "/edx/app/ecommerce/ecommerce",
create: true, owner: "ecommerce", group: "www-data"
config.vm.synced_folder "#{ecommerce_worker_mount_dir}", "/edx/app/ecommerce_worker/ecommerce_worker",
create: true, owner: "ecommerce_worker", group: "www-data"
if ENV['ENABLE_LEGACY_ORA']
config.vm.synced_folder "#{ora_mount_dir}", "/edx/app/ora/ora",
......@@ -84,6 +88,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
create: true, nfs: true
config.vm.synced_folder "#{ecommerce_mount_dir}", "/edx/app/ecommerce/ecommerce",
create: true, nfs: true
config.vm.synced_folder "#{ecommerce_worker_mount_dir}", "/edx/app/ecommerce_worker/ecommerce_worker",
create: true, nfs: true
if ENV['ENABLE_LEGACY_ORA']
config.vm.synced_folder "#{ora_mount_dir}", "/edx/app/ora/ora",
......
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