Commit 510fc021 by Feanil Patel Committed by GitHub

Merge pull request #3605 from edx/feanil/ecom-worker-16.04

Feanil/ecom worker 16.04
parents 9a18013f cc153a71
# To build this Dockerfile:
#
# From the root of configuration:
#
# docker build -f docker/build/ecomworker/Dockerfile .
#
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
FROM edxops/xenial-common:latest
MAINTAINER edxops
ADD . /edx/app/edx_ansible/edx_ansible
WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
COPY docker/build/ecomworker/ansible_overrides.yml /
RUN sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook ecomworker.yml \
-c local -i '127.0.0.1,' \
-t "install:base,install:system-requirements,install:configuration,install:app-requirements,install:code" \
--extra-vars="@/ansible_overrides.yml"
USER root
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
- name: Deploy ecommerce worker
hosts: all
sudo: True
gather_facts: True
vars:
serial_count: 1
serial: "{{ serial_count }}"
roles:
- common_vars
- docker
- ecomworker
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
state: present state: present
become_user: '{{ ecommerce_worker_user }}' become_user: '{{ ecommerce_worker_user }}'
with_items: "{{ ecommerce_worker_requirements }}" with_items: "{{ ecommerce_worker_requirements }}"
tags:
- install
- install:app-requirements
- name: write out the supervisor wrapper - name: write out the supervisor wrapper
template: template:
...@@ -25,6 +28,9 @@ ...@@ -25,6 +28,9 @@
mode: 0650 mode: 0650
owner: '{{ supervisor_user }}' owner: '{{ supervisor_user }}'
group: '{{ common_web_user }}' group: '{{ common_web_user }}'
tags:
- install
- install:configuration
- name: write supervisord config - name: write supervisord config
template: template:
...@@ -33,6 +39,9 @@ ...@@ -33,6 +39,9 @@
owner: '{{ supervisor_user }}' owner: '{{ supervisor_user }}'
group: '{{ common_web_user }}' group: '{{ common_web_user }}'
mode: 0644 mode: 0644
tags:
- install
- install:configuration
- name: setup the ecommerce_worker env file - name: setup the ecommerce_worker env file
template: template:
...@@ -41,6 +50,9 @@ ...@@ -41,6 +50,9 @@
owner: '{{ ecommerce_worker_user }}' owner: '{{ ecommerce_worker_user }}'
group: '{{ ecommerce_worker_user }}' group: '{{ ecommerce_worker_user }}'
mode: 0644 mode: 0644
tags:
- install
- install:configuration
- name: enable supervisor script - name: enable supervisor script
file: file:
...@@ -49,10 +61,17 @@ ...@@ -49,10 +61,17 @@
state: link state: link
force: yes force: yes
when: not disable_edx_services when: not disable_edx_services
tags:
- install
- install:configuration
- name: update supervisor configuration - name: update supervisor configuration
shell: '{{ supervisor_ctl }} -c {{ supervisor_cfg }} update' shell: '{{ supervisor_ctl }} -c {{ supervisor_cfg }} update'
when: not disable_edx_services when: not disable_edx_services
tags:
- manage
- manage:start
- name: create symlinks from the venv bin dir - name: create symlinks from the venv bin dir
file: file:
...@@ -62,6 +81,9 @@ ...@@ -62,6 +81,9 @@
with_items: with_items:
- python - python
- pip - pip
tags:
- install
- install:app-requirements
- name: restart the applicaton - name: restart the applicaton
supervisorctl: supervisorctl:
...@@ -71,3 +93,6 @@ ...@@ -71,3 +93,6 @@
name: '{{ ecommerce_worker_service_name }}' name: '{{ ecommerce_worker_service_name }}'
when: not disable_edx_services when: not disable_edx_services
become_user: '{{ supervisor_service_user }}' become_user: '{{ supervisor_service_user }}'
tags:
- manage
- manage:start
...@@ -27,3 +27,4 @@ weights: ...@@ -27,3 +27,4 @@ weights:
- elasticsearch: 7 - elasticsearch: 7
- docker-tools: 3 - docker-tools: 3
- tools_jenkins: 8 - tools_jenkins: 8
- ecomworker: 4
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