Commit c855fbcf by Jesse Zoldak

We no longer use sitespeedio or harprofiler

parent ebf3c163
FROM edxops/xenial-common
MAINTAINER edxops
USER root
RUN apt-get update
ADD . /edx/app/edx_ansible/edx_ansible
COPY docker/build/xqwatcher/ansible_overrides.yml /
WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
RUN /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook harstorage.yml \
-i '127.0.0.1,' -c local \
-t "install:base,install:configuration,install:app-requirements,install:code" \
-e@/ansible_overrides.yml
WORKDIR /edx/app/harstorage/harstorage
CMD ["/edx/app/harstorage/venvs/harstorage/bin/paster", "serve", "--daemon", "/edx/app/harstorage/venvs/harstorage/edx/etc/harstorage/production.ini"]
- name: Deploy Harstorage
hosts: all
become: True
gather_facts: True
roles:
- docker
- mongo
- harstorage
- name: Deploy Harstorage
hosts: all
become: True
gather_facts: True
vars:
nginx_default_sites:
- harstorage
roles:
- aws
- mongo
- nginx
- harstorage
......@@ -43,12 +43,6 @@
sourcetype: 'json_timing_log'
followSymlink: false
- source: '/var/lib/jenkins/jobs/*/builds/*/archive/sitespeed-result/*/data/result.json'
index: 'testeng'
recursive: true
sourcetype: sitespeed_result
followSymlink: false
- source: '/var/log/jenkins/jenkins.log'
index: 'testeng'
recursive: false
......
---
#
# edX Configuration
#
# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
harprofiler_role_name: harprofiler
harprofiler_user: "harprofiler"
harprofiler_github_url: https://github.com/edx/harprofiler
harprofiler_version: master
harprofiler_dir: /edx/app/harprofiler
harprofiler_venv_dir: "{{ harprofiler_dir }}/venvs/harprofiler"
harprofiler_validation_script: validate_harprofiler_install.sh
---
dependencies:
- common
- browsers
- oraclejdk
- browsermob-proxy
---
# Installs the harprofiler
- name: create harprofiler user
user:
name: "{{ harprofiler_user }}"
createhome: no
home: "{{ harprofiler_dir }}"
shell: /bin/bash
- name: create harprofiler repo
file:
path: "{{ harprofiler_dir }}"
state: directory
owner: "{{ harprofiler_user }}"
group: "{{ common_web_group }}"
mode: 0755
- name: check out the harprofiler
git:
dest: "{{ harprofiler_dir }}"
repo: "{{ harprofiler_github_url }}"
version: "{{ harprofiler_version }}"
accept_hostkey: yes
become_user: "{{ harprofiler_user }}"
- name: set bashrc for harprofiler user
template:
src: bashrc.j2
dest: "{{ harprofiler_dir }}/.bashrc"
owner: "{{ harprofiler_user }}"
mode: 0755
- name: install requirements
pip:
requirements: "{{ harprofiler_dir }}/requirements.txt"
virtualenv: "{{ harprofiler_venv_dir }}"
become_user: "{{ harprofiler_user }}"
- name: update config file
# harprofiler ships with a default config file. Doing a line-replace for the default
# configuration that does not match what this machine will have
lineinfile:
dest: "{{ harprofiler_dir }}/config.yaml"
regexp: "browsermob_dir"
line: "browsermob_dir: /usr/local"
state: present
- name: create validation shell script
template:
owner: "{{ harprofiler_user }}"
src: validate_harprofiler_install.sh.j2
dest: "{{ harprofiler_dir }}/{{ harprofiler_validation_script }}"
mode: 0755
become_user: "{{ harprofiler_user }}"
- name: test install
shell: "./{{ harprofiler_validation_script }}"
args:
chdir: "{{ harprofiler_dir }}"
become_user: "{{ harprofiler_user }}"
export DISPLAY=:1
source {{ harprofiler_venv_dir }}/bin/activate
#!/usr/bin/env bash
# This script confirms that harprofiler can successfully run on the
# target machine.
source {{ harprofiler_venv_dir }}/bin/activate
cd {{ harprofiler_dir }}
python harprofiler.py
---
#
# 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 harstorage
#
#
# vars are namespaced with the module name.
#
harstorage_role_name: harstorage
harstorage_user: '{{ harstorage_role_name }}'
harstorage_home: '{{ COMMON_APP_DIR }}/{{ harstorage_role_name }}'
harstorage_code_dir: '{{ harstorage_home }}/{{ harstorage_role_name }}'
harstorage_venv_dir: '{{ harstorage_home }}/venvs/{{ harstorage_role_name }}'
harstorage_bin_dir: '{{ harstorage_home }}/bin'
harstorage_etc: '/edx/etc/harstorage'
# Source Code
HARSTORAGE_REPOS:
- PROTOCOL: https
DOMAIN: github.com
PATH: edx
REPO: harstorage
VERSION: e0d/update-requirements
DESTINATION: '{{ harstorage_code_dir }}'
#
# OS packages
#
harstorage_debian_pkgs:
- lib32stdc++6
harstorage_pagespeed_binary: "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/harstorage/pagespeed_bin"
harstorage_python_pkgs:
- { name: "pylons", version: "1.0.2"}
- { name: "webob", version: "1.5.1"}
- { name: "pymongo", version: "3.2.1"}
- { name: "PasteScript", version: "1.7.5"}
harstorage_redhat_pkgs: []
harstorage_port: "5000"
harstorage_host: "0.0.0.0"
harstorage_version: "1.0"
# mongo packages
mongo_port: "27017"
mongo_repl_set: "repl1"
mongo_admin_user: "admin"
mongo_admin_password: "admin"
harstorage_gunicorn_hosts:
- 127.0.0.1
harstorage_gunicorn_port: '{{ harstorage_port }}'
HARSTORAGE_HOSTNAME: '~^((stage|prod)-)?harstorage.*'
HARSTORAGE_NGINX_PORT: 18170
HARSTORAGE_SSL_NGINX_PORT: 48170
---
#
# 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
#
##
# Role includes for role harstorage
#
# Example:
#
# dependencies:
# - {
# role: my_role
# my_role_var0: "foo"
# my_role_var1: "bar"
# }
dependencies:
- common
- supervisor
- role: edx_service
edx_service_name: "{{ harstorage_role_name }}"
edx_service_repos: "{{ HARSTORAGE_REPOS }}"
edx_service_user: "{{ harstorage_user }}"
edx_service_home: "{{ harstorage_home }}"
edx_service_packages:
debian: "{{ harstorage_debian_pkgs }}"
redhat: "{{ harstorage_redhat_pkgs }}"
---
#
# 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
#
#
#
# Tasks for role harstorage
#
# Overview:
#
#
# Dependencies:
#
#
# Example play:
#
#
- name: install python packages
pip:
name: "{{ item.name }}"
version: "{{ item.version }}"
virtualenv: "{{ harstorage_venv_dir }}"
virtualenv_command: virtualenv
tags:
- install
- install:app-requirements
become_user: "{{ harstorage_user }}"
with_items: "{{ harstorage_python_pkgs }}"
- name: create directories
file:
path: "{{ item }}"
owner: "{{ harstorage_user }}"
group: "{{ harstorage_user }}"
state: directory
mode: 0755
tags:
- install
- install:configuration
with_items:
- "{{ harstorage_etc }}"
- "{{ harstorage_bin_dir }}"
- name: ensure common web user can write to /edx/var/harstorage
file:
path: "{{ COMMON_DATA_DIR }}/{{ harstorage_user }}"
state: directory
mode: 0775
tags:
- install
- install:configuration
- name: download pagespeed
get_url:
url: "{{ harstorage_pagespeed_binary }}"
dest: "{{ harstorage_bin_dir }}"
mode: "0755"
owner: "{{ harstorage_user }}"
- name: setup the harstorage production.ini file
template:
src: '.{{ harstorage_etc }}/production.ini.j2'
dest: '{{ harstorage_etc }}/production.ini'
owner: '{{ harstorage_user }}'
group: '{{ harstorage_user }}'
mode: 0644
tags:
- install
- install:configuration
- name: install harstorage
command: "{{ harstorage_venv_dir }}/bin/python ./setup.py install"
args:
chdir: "{{ harstorage_code_dir }}"
tags:
- install
- install:code
- name: apply config
command: "{{ harstorage_venv_dir }}/bin/paster setup-app {{ harstorage_etc }}/production.ini"
args:
chdir: "{{ harstorage_code_dir }}"
tags:
- install
- install:configuration
- name: write supervisor wrapper script
template:
src: edx/app/harstorage/harstorage.sh.j2
dest: "{{ harstorage_home }}/{{ harstorage_role_name }}.sh"
mode: 0650
owner: "{{ supervisor_user }}"
group: "{{ common_web_user }}"
- name: write supervisord config
template:
src: edx/app/supervisor/conf.d.available/harstorage.conf.j2
dest: "{{ supervisor_available_dir }}/{{ harstorage_role_name }}.conf"
owner: "{{ supervisor_user }}"
group: "{{ common_web_user }}"
mode: 0644
- name: enable supervisor script
file:
src: "{{ supervisor_available_dir }}/{{ harstorage_role_name }}.conf"
dest: "{{ supervisor_cfg_dir }}/{{ harstorage_role_name }}.conf"
state: link
force: yes
when: not disable_edx_services
- name: update supervisor configuration
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
when: not disable_edx_services
- name: Copying nginx configs for harstorage
template:
src: "edx/app/nginx/sites-available/harstorage.j2"
dest: "{{ nginx_sites_available_dir }}/harstorage"
owner: root
group: "{{ common_web_user }}"
mode: 0640
notify: reload nginx
tags:
- install
- install:vhosts
- name: Creating nginx config links for discovery
file:
src: "{{ nginx_sites_available_dir }}/harstorage"
dest: "{{ nginx_sites_enabled_dir }}/harstorage"
state: link
owner: root
group: root
notify: reload nginx
tags:
- install
- install:vhosts
#!/usr/bin/env bash
# {{ ansible_managed }}
{{ harstorage_venv_dir }}/bin/paster serve {{ harstorage_etc }}/production.ini
#
# {{ ansible_managed }}
#
{% if nginx_default_sites is defined and "harstorage" in nginx_default_sites %}
{% set default_site = "default_server" %}
{% else %}
{% set default_site = "" %}
{% endif %}
upstream harstorage_app_server {
{% for host in harstorage_gunicorn_hosts %}
server {{ host }}:{{ harstorage_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
server_name {{ HARSTORAGE_HOSTNAME }};
{% if NGINX_ENABLE_SSL %}
listen {{ HARSTORAGE_NGINX_PORT }} {{ default_site }};
listen {{ HARSTORAGE_SSL_NGINX_PORT }} ssl;
ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }};
ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }};
# request the browser to use SSL for all connections
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
{% else %}
listen {{ HARSTORAGE_NGINX_PORT }} {{ default_site }};
{% endif %}
location ~ ^/static/(?P<file>.*) {
root {{ COMMON_DATA_DIR }}/{{ harstorage_role_name }};
try_files /staticfiles/$file =404;
}
location / {
try_files $uri @proxy_to_app;
}
{% if NGINX_ROBOT_RULES|length > 0 %}
location /robots.txt {
root {{ nginx_app_dir }};
try_files $uri /robots.txt =404;
}
{% endif %}
location @proxy_to_app {
{% if NGINX_SET_X_FORWARDED_HEADERS %}
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $remote_addr;
{% else %}
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
{% endif %}
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://harstorage_app_server;
}
# Forward to HTTPS if we're an HTTP request...
if ($http_x_forwarded_proto = "http") {
set $do_redirect "true";
}
# Run our actual redirect...
if ($do_redirect = "true") {
rewrite ^ https://$host$request_uri? permanent;
}
}
#
# {{ ansible_managed }}
#
[program:{{ harstorage_role_name }}]
command={{ harstorage_home }}/{{ harstorage_role_name }}.sh
user={{ common_web_user }}
directory={{ harstorage_code_dir }}
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
killasgroup=true
stopasgroup=true
#
# harstorage - Pylons development environment configuration
#
# The %(here)s variable will be replaced with the parent directory of this file
#
[DEFAULT]
debug = false
[server:main]
use = egg:Paste#http
host = {{ harstorage_host }}
port = {{ harstorage_port }}
[app:main]
use = egg:harstorage
full_stack = true
static_files = true
temp_store = {{ COMMON_DATA_DIR }}/{{ harstorage_user }}
bin_store = {{ harstorage_bin_dir }}
ps_enabled = true
static_version = {{ harstorage_version }}
mongo_replicate = false
mongo_replset = {{ mongo_repl_set }}
mongo_host = localhost
mongo_port = {{ mongo_port }}
mongo_db = {{ harstorage_role_name }}
mongo_auth = false
mongo_user = {{ mongo_admin_user }}
mongo_pswd = {{ mongo_admin_password }}
cache_dir = {{ COMMON_DATA_DIR }}/{{ harstorage_user }}
beaker.session.key = harstorage
beaker.session.secret = somesecret
# Logging configuration
[loggers]
keys = root
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s
datefmt = %H:%M:%S
......@@ -9,10 +9,6 @@ dependencies:
- role: edxapp_common
when: platform_worker is defined
# dependencies for sitespeed worker
- role: sitespeedio
when: sitespeed_worker is defined
# dependencies for android worker
- role: android_sdk
when: android_worker is defined
......
......@@ -2,7 +2,6 @@
# jenkins
#
# Provision a Jenkins worker instance.
# - When sitespeed_worker is set, only apply the configuraiton necessary for running sitespeed.io
# - When platform_worker is set, the resulting instance can run edx-platform tests
# All jenkins workers
......@@ -22,7 +21,5 @@
- include: test.yml
- include: test_platform_worker.yml
when: platform_worker is defined
- include: test_sitespeed_worker.yml
when: sitespeed_worker is defined
- include: test_android_worker.yml
when: android_worker is defined
---
# Requests library is required for both the github status
# script, as well as the sitespeed cookie script.
# Requests library is required for the github status script.
- name: Install requests Python library
pip: name=requests state=present
......@@ -16,8 +16,7 @@
### Tests ###
# Firefox has a specific version, not the latest. This test also ensures it was not
# pulled in via dependency or misuse/clobbering due to the sitespeed variable, which uses
# the latest firefox.
# pulled in via dependency or misuse/clobbering.
- name: Verify firefox version
shell: firefox --version
register: firefox_version
......
---
# Tests for this role
### Tests ###
# Sitespeed workers should have the latest version of firefox
# Lite test. Ensures we are not using
# the version of firefox specified in a different file.
- name: Verify firefox version
shell: firefox --version
register: firefox_version
- assert:
that:
- "'28.0' not in firefox_version.stdout"
#
# {{ ansible_managed }}
#
{% if nginx_default_sites is defined and "harstorage" in nginx_default_sites %}
{% set default_site = "default_server" %}
{% else %}
{% set default_site = "" %}
{% endif %}
upstream harstorage_app_server {
{% for host in harstorage_gunicorn_hosts %}
server {{ host }}:{{ harstorage_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
server_name {{ HARSTORAGE_HOSTNAME }};
{% if NGINX_ENABLE_SSL %}
listen {{ HARSTORAGE_NGINX_PORT }} {{ default_site }};
listen {{ HARSTORAGE_SSL_NGINX_PORT }} ssl;
ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }};
ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }};
# request the browser to use SSL for all connections
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
{% else %}
listen {{ HARSTORAGE_NGINX_PORT }} {{ default_site }};
{% endif %}
location ~ ^/static/(?P<file>.*) {
root {{ COMMON_DATA_DIR }}/{{ harstorage_role_name }};
try_files /staticfiles/$file =404;
}
location / {
try_files $uri @proxy_to_app;
}
{% if NGINX_ROBOT_RULES|length > 0 %}
location /robots.txt {
root {{ nginx_app_dir }};
try_files $uri /robots.txt =404;
}
{% endif %}
location @proxy_to_app {
{% if NGINX_SET_X_FORWARDED_HEADERS %}
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $remote_addr;
{% else %}
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
{% endif %}
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://harstorage_app_server;
}
# Forward to HTTPS if we're an HTTP request...
if ($http_x_forwarded_proto = "http") {
set $do_redirect "true";
}
# Run our actual redirect...
if ($do_redirect = "true") {
rewrite ^ https://$host$request_uri? permanent;
}
}
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://openedx.atlassian.net/wiki/display/OpenOPS
# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Defaults for role sitespeedio
#
#
# vars are namespace with the module name.
#
sitespeedio_role_name: sitespeedio
#
# OS packages
#
sitespeedio_chrislea_ppa: "ppa:chris-lea/node.js"
sitespeedio_debian_pkgs:
- firefox
- nodejs
- xvfb
sitespeedio_redhat_pkgs: []
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://openedx.atlassian.net/wiki/display/OpenOPS
# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Role includes for role sitespeedio
#
dependencies:
- common
- role: oraclejdk
oraclejdk_version: "8u60"
oraclejdk_base: "jdk1.8.0_60"
oraclejdk_build: "b27"
oraclejdk_link: "/usr/lib/jvm/java-8-oracle"
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://openedx.atlassian.net/wiki/display/OpenOPS
# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
#
#
# Tasks for role sitespeedio
#
# Overview:
# Install the sitespeed.io package along with it's dependencies.
# See http://sitespeed.io/ for details on running.
#
#
# Dependencies:
# none
#
# Example play:
# role:
# - sitespeedio
#
# adding chris-lea nodejs repo
- name: Add ppas for current versions of nodejs
apt_repository:
repo: "{{ sitespeedio_chrislea_ppa }}"
state: present
# Install Sitespeed Dependencies
- name: Install sitespeed.io specific system packages
apt:
name: "{{ item }}"
state: present
with_items: "{{ sitespeedio_debian_pkgs }}"
# Install released version of sitespeedio
- name: Install sitespeed.io
npm:
name: "sitespeed.io"
global: yes
state: latest
version: "3.10.0"
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"playbook_remote_dir": "/tmp/packer-edx-playbooks",
"venv_dir": "/edx/app/edx_ansible/venvs/edx_ansible",
"ami": "{{env `HARPROFILER_BASE_AMI`}}",
"delete_or_keep": "{{env `DELETE_OR_KEEP_AMI`}}"
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
"source_ami": "{{user `ami`}}",
"instance_type": "m1.small",
"ssh_username": "ubuntu",
"ami_name": "harprofiler-{{isotime | clean_ami_name}}",
"tags": {
"delete_or_keep": "{{user `delete_or_keep`}}"
}
}],
"provisioners": [{
"type": "shell",
"inline": ["rm -rf {{user `playbook_remote_dir`}}",
"mkdir {{user `playbook_remote_dir`}}"]
}, {
"type": "file",
"source": "../../util/install/ansible-bootstrap.sh",
"destination": "{{user `playbook_remote_dir`}}/ansible-bootstrap.sh"
}, {
"type": "shell",
"inline": ["cd {{user `playbook_remote_dir`}}",
"export CONFIGURATION_VERSION='{{user `remote_branch`}}'",
"sudo bash ./ansible-bootstrap.sh" ]
}, {
"type": "ansible-local",
"playbook_file": "../../playbooks/edx-east/harprofiler.yml",
"playbook_dir": "../../playbooks",
"command": ". {{user `venv_dir`}}/bin/activate && ansible-playbook",
"inventory_groups": "harprofiler_worker",
"extra_arguments": [
"-vvv"
]
}]
}
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"playbook_remote_dir": "/tmp/packer-edx-playbooks",
"venv_dir": "/edx/app/edx_ansible/venvs/edx_ansible",
"ami": "{{env `JENKINS_WORKER_AMI`}}",
"security_group": "{{env `AWS_SECURITY_GROUP`}}",
"delete_or_keep": "{{env `DELETE_OR_KEEP_AMI`}}",
"remote_branch": "{{env `REMOTE_BRANCH`}}"
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"ami_name": "jenkins_worker_sitespeedio-{{isotime | clean_ami_name}}",
"instance_type": "m3.large",
"region": "us-east-1",
"source_ami": "{{user `ami`}}",
"ssh_username": "ubuntu",
"ami_description": "jenkins worker sitespeedio",
"iam_instance_profile": "jenkins-worker",
"security_group_id": "{{user `security_group`}}",
"tags": {
"delete_or_keep": "{{user `delete_or_keep`}}"
}
}],
"provisioners": [{
"type": "shell",
"inline": ["rm -rf {{user `playbook_remote_dir`}}",
"mkdir {{user `playbook_remote_dir`}}"]
}, {
"type": "file",
"source": "stop-automatic-updates.sh",
"destination": "{{user `playbook_remote_dir`}}/stop-automatic-updates.sh"
}, {
"type": "file",
"source": "../../util/install/ansible-bootstrap.sh",
"destination": "{{user `playbook_remote_dir`}}/ansible-bootstrap.sh"
}, {
"type": "shell",
"inline": ["cd {{user `playbook_remote_dir`}}",
"export CONFIGURATION_VERSION='{{user `remote_branch`}}'",
"sudo bash ./stop-automatic-updates.sh",
"sudo bash ./ansible-bootstrap.sh" ]
}, {
"type": "ansible-local",
"playbook_file": "../../playbooks/edx-east/jenkins_worker_sitespeedio.yml",
"playbook": "../../playbooks",
"command": ". {{user `venv_dir`}}/bin/activate && ansible-playbook",
"inventory_groups": "jenkins workers",
"extra_arguments": [
"-vvv"
]
}]
}
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