Commit 4dd2d885 by Feanil Patel

Merge pull request #873 from edx/feanil/update_deployer_play

Feanil/update deployer play
parents a8e3c1b4 892d7426
# ansible-playbook -c ssh -vvvv --user=ubuntu -i ec2.py deployer.yml -e "@gh_users.yml" -e "@/path/to/secure/ansible/vars/hotg.yml" -e "@/path/to/configuration-secure/ansible/vars/common/common.yml" --limit="tag_aws_cloudformation_stack-name_<admin_stack_name>" # ansible-playbook -c ssh -vvvv --user=ubuntu -i ec2.py deployer.yml -e "@/path/to/secure/ansible/vars/edx_admin.yml" --limit="tag_aws_cloudformation_stack-name_<admin_stack_name>"
# You will need to create a gh_users.yml that contains the github names of users that should have login access to the machines. # You will need to create a gh_users.yml that contains the github names of users that should have login access to the machines.
# Setup user login on the bastion # Setup user login on the bastion
- name: Configure Bastion - name: Configure Bastion
hosts: tag_role_bastion hosts: tag_play_bastion
sudo: True sudo: True
gather_facts: False gather_facts: False
roles: roles:
- user - user
# Configure an admin instance with jenkins and asgard. # Configure an admin instance with jenkins and asgard.
- name: Configure instance(s) - name: Configure instance(s)
hosts: tag_role_admin hosts: tag_play_admin
sudo: True sudo: True
gather_facts: True gather_facts: True
roles: roles:
- common - common
- jenkins_master - jenkins_admin
- hotg - hotg
- newrelic
---
- hosts: tag_aws_cloudformation_stack-name_dev2:&tag_group_bastion
sudo: True
vars_files:
- "{{ secure_dir }}/vars/dev/dev2.yml"
- "{{ secure_dir }}/vars/common/common.yml"
- "{{ secure_dir }}/vars/users.yml"
roles:
- common
- hosts: tag_aws_cloudformation_stack-name_dev2:&tag_group_edxapp
sudo: True
vars_files:
- "{{ secure_dir }}/vars/dev/dev2.yml"
- "{{ secure_dir }}/vars/common/common.yml"
- "{{ secure_dir }}/vars/users.yml"
roles:
- datadog
- role: nginx
nginx_sites:
- lms
- cms
- lms-preview
nginx_default_sites:
- lms
- role: 'edxapp'
EDXAPP_LMS_NGINX_PORT: 80
EDXAPP_CMS_NGINX_PORT: 80
edxapp_lms_env: 'lms.envs.load_test'
edx_platform_version: 'sarina/install-datadog'
- hosts: tag_aws_cloudformation_stack-name_dev2:&tag_group_worker
sudo: True
vars_files:
- "{{ secure_dir }}/vars/dev/dev2.yml"
- "{{ secure_dir }}/vars/common/common.yml"
- "{{ secure_dir }}/vars/users.yml"
roles:
- datadog
- role: nginx
nginx_sites:
- lms
- cms
- lms-preview
nginx_default_sites:
- lms
- role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test'
celery_worker: True
edx_platform_version: 'sarina/install-datadog'
#- hosts: tag_aws_cloudformation_stack-name_dev2:&tag_group_xserver
# sudo: True
# vars_files:
# - "{{ secure_dir }}/vars/dev/dev2.yml"
# - "{{ secure_dir }}/vars/users.yml"
# roles:
# - nginx
# - xserver
#- hosts: tag_aws_cloudformation_stack-name_dev2:&tag_group_rabbitmq
# serial: 1
# sudo: True
# vars_files:
# - "{{ secure_dir }}/vars/dev/dev2.yml"
# - "{{ secure_dir }}/vars/users.yml"
# roles:
# - rabbitmq
#- hosts: tag_aws_cloudformation_stack-name_dev2:&tag_group_xqueue
# sudo: True
# vars_files:
# - "{{ secure_dir }}/vars/dev/dev2.yml"
# - "{{ secure_dir }}/vars/users.yml"
# roles:
# - nginx
# - xqueue
---
- hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_role_edxapp
sudo: True
vars_files:
- "{{ secure_dir }}/vars/dev/feanilsandbox.yml"
- "{{ secure_dir }}/vars/common/common.yml"
- "{{ secure_dir }}/vars/users.yml"
roles:
- datadog
- role: nginx
nginx_sites:
- lms
- cms
- lms-preview
nginx_default_sites:
- lms
- role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test'
edx_platform_version: 'release'
- splunkforwarder
- hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_role_worker
sudo: True
vars_files:
- "{{ secure_dir }}/vars/dev/feanilsandbox.yml"
- "{{ secure_dir }}/vars/common/common.yml"
- "{{ secure_dir }}/vars/users.yml"
roles:
- datadog
- role: nginx
nginx_sites:
- lms
- cms
- lms-preview
nginx_default_sites:
- lms
- role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test'
celery_worker: True
edx_platform_version: 'release'
- splunkforwarder
- hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_role_xserver
sudo: True
vars_files:
- "{{ secure_dir }}/vars/dev/feanilsandbox.yml"
- "{{ secure_dir }}/vars/users.yml"
roles:
- role: nginx
nginx_sites:
- xserver
- xserver
- splunkforwarder
- hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_role_rabbitmq
serial: 1
sudo: True
vars_files:
- "{{ secure_dir }}/vars/dev/feanilsandbox.yml"
- "{{ secure_dir }}/vars/users.yml"
roles:
- rabbitmq
- splunkforwarder
- hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_role_xqueue
sudo: True
vars_files:
- "{{ secure_dir }}/vars/dev/feanilsandbox.yml"
- "{{ secure_dir }}/vars/users.yml"
roles:
- role: nginx
nginx_sites:
- xqueue
- xqueue
- splunkforwarder
- hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_role_mongo
sudo: True
vars_files:
- "{{ secure_dir }}/vars/dev/feanilsandbox.yml"
- "{{ secure_dir }}/vars/users.yml"
roles:
- role: 'mongo'
mongo_clustered: true
...@@ -155,43 +155,43 @@ ...@@ -155,43 +155,43 @@
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>#!/bin/bash -x <command>#!/bin/bash -x
if [[(&quot;$play&quot; == &quot;&quot;)]]; then if [[(&quot;\$play&quot; == &quot;&quot;)]]; then
echo &quot;No Play Specified. Nothing to Do.&quot; echo &quot;No Play Specified. Nothing to Do.&quot;
exit 0 exit 0
fi fi
if [ ! -d $WORKSPACE/virtualenv ]; then if [ ! -d \$WORKSPACE/virtualenv ]; then
virtualenv --system-site-packages $WORKSPACE/virtualenv virtualenv --system-site-packages \$WORKSPACE/virtualenv
fi fi
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
export PIP_DOWNLOAD_CACHE=$WORKSPACE/pip-cache export PIP_DOWNLOAD_CACHE=\$WORKSPACE/pip-cache
. $WORKSPACE/virtualenv/bin/activate . \$WORKSPACE/virtualenv/bin/activate
cd configuration cd configuration
pip install -r requirements.txt pip install -r requirements.txt
cd util/vpc-tools/ cd util/vpc-tools/
echo &quot;$refs&quot; &gt; /var/tmp/$BUILD_ID-refs.yml echo &quot;\$refs&quot; &gt; /var/tmp/\$BUILD_ID-refs.yml
cat /var/tmp/$BUILD_ID-refs.yml cat /var/tmp/\$BUILD_ID-refs.yml
echo &quot;$vars&quot; &gt; /var/tmp/$BUILD_ID-extra-vars.yml echo &quot;\$vars&quot; &gt; /var/tmp/\$BUILD_ID-extra-vars.yml
cat /var/tmp/$BUILD_ID-extra-vars.yml cat /var/tmp/\$BUILD_ID-extra-vars.yml
python -u abbey.py -p $play -t c1.medium -d $deployment -e $environment -i {{jenkins_home}}/.ssh/id_rsa -b $base_ami --vars /var/tmp/$BUILD_ID-extra-vars.yml --refs /var/tmp/$BUILD_ID-refs.yml -j $release_id --mongo-uri $mongo_uri --mongo-deployment-collection $deployment --mongo-db devops --configuration-version $configuration --configuration-secure-version $configuration_secure -k {{JENKINS_ADMIN_EC2_KEY}} --configuration-secure-repo &quot;{{JENKINS_ADMIN_CONFIGURATION_SECURE_REPO}}&quot;</command> python -u abbey.py -p \$play -t c1.medium -d \$deployment -e \$environment -i {{jenkins_home}}/.ssh/id_rsa -b \$base_ami --vars /var/tmp/\$BUILD_ID-extra-vars.yml --refs /var/tmp/\$BUILD_ID-refs.yml -j \$release_id --mongo-uri \$mongo_uri --mongo-deployment-collection \$deployment --mongo-db devops --configuration-version \$configuration --configuration-secure-version \$configuration_secure -k {{JENKINS_ADMIN_EC2_KEY}} --configuration-secure-repo &quot;{{JENKINS_ADMIN_CONFIGURATION_SECURE_REPO}}&quot;</command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>#!/bin/bash -x <command>#!/bin/bash -x
if [[(&quot;$play&quot; == &quot;&quot;)]]; then if [[(&quot;\$play&quot; == &quot;&quot;)]]; then
echo &quot;No Play Specified. Nothing to Do.&quot; echo &quot;No Play Specified. Nothing to Do.&quot;
exit 0 exit 0
fi fi
rm /var/tmp/$BUILD_ID-extra-vars.yml rm /var/tmp/\$BUILD_ID-extra-vars.yml
rm /var/tmp/$BUILD_ID-refs.yml</command> rm /var/tmp/\$BUILD_ID-refs.yml</command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
<publishers/> <publishers/>
......
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