Skip to content

Instantly share code, notes, and snippets.

@carsongee
Last active September 26, 2016 05:55
Show Gist options
  • Save carsongee/e052d0e2892022ab3b2a to your computer and use it in GitHub Desktop.
Save carsongee/e052d0e2892022ab3b2a to your computer and use it in GitHub Desktop.
MITx Site Playbook
- name: Apply common configration to all nodes
hosts: all:&tag_org_mitx:&tag_status_production:&tag_env_{{ env }}
sudo: yes
vars_files:
- $playbook_dir/environments/{{ env }}.yml
roles:
- mitx-common
- name: Apply backup configuration
hosts: tag_group_backup:&tag_org_mitx:&tag_status_production:&tag_env_{{ env }}
vars_files:
- $secure_dir/vars/{{ env }}/backup.yml
- $secure_dir/vars/smtp.yml
sudo: yes
roles:
- backup
- smtp
tags: backup_servers
- name: provision | Configure syslog instance(s)
hosts: tag_group_syslog:&tag_org_mitx:&tag_status_production:&tag_env_{{ env }}
sudo: True
gather_facts: True
vars_files:
- $secure_dir/vars/smtp.yml
- $playbook_dir/environments/{{ env }}.yml
roles:
- common
- smtp
- oraclejdk
- { role: "elasticsearch", elasticsearch_version: "0.90.11" }
- logstash
- kibana
- role: nginx
nginx_sites:
- kibana
- https-redirect
tags: syslog
- name: Apply gluster configuration
hosts: tag_group_apps:tag_group_papps:tag_group_lb:&tag_org_mitx:&tag_status_production:&tag_env_{{ env }}
sudo: True
vars_files:
- $playbook_dir/environments/{{ env }}.yml
roles:
- gluster
tags: gluster_servers
- name: Apply mongo configuration
hosts: tag_group_mongo:&tag_org_mitx:&tag_status_production:&tag_env_{{ env }}
sudo: True
vars_files:
- $secure_dir/vars/smtp.yml
- $secure_dir/vars/mongo.yml
- $secure_dir/vars/rabbitmq.yml
- $secure_dir/vars/{{ env }}/mitx-edx.yml
- $playbook_dir/environments/{{ env }}.yml
roles:
- common
- supervisor
- rabbitmq
- mongo
- smtp
- mitx-edx
tags: mongo_servers
- name: Configure apps instance(s)
hosts: tag_group_apps:&tag_org_mitx:&tag_status_production:&tag_env_{{ env }}
sudo: True
vars_files:
- $secure_dir/vars/smtp.yml
- $secure_dir/vars/{{ env }}/edxapp.yml
- $secure_dir/vars/{{ env }}/forum.yml
- $secure_dir/vars/{{ env }}/xqueue.yml
- $secure_dir/vars/{{ env }}/xserver.yml
- $secure_dir/vars/{{ env }}/ora.yml
- $secure_dir/vars/{{ env }}/gitreload.yml
- $playbook_dir/environments/{{ env }}.yml
vars:
migrate_db: "yes"
sync_db: "yes"
openid_workaround: True
roles:
- common
- supervisor
- haproxy
- edxapp # edxapp, so nice we run it twice
- { role: 'edxapp', celery_worker: True }
- oraclejdk
- elasticsearch
- forum
- role: xqueue
update_users: True
- ora
- xserver
- mitx-edxapp
- gitreload
- { role: course_git_backup, when: do_course_git_backup }
- xsiftx
- smtp
tags: apps
- name: Apply load balancer configuration
hosts: tag_group_lb:&tag_org_mitx:&tag_status_production:&tag_env_{{ env }}
sudo: True
gather_facts: True
vars_files:
- $secure_dir/vars/smtp.yml
- $secure_dir/vars/nginx.yml
- $playbook_dir/environments/{{ env }}.yml
roles:
- common
- loadbalancer
- role: nginx
nginx_sites:
- lms
- lms-backend
- cms
- cms-backend
- lms-preview
- lms-preview-backend
- https-redirect
- gitreload
- aws-heartbeat
- smtp
tags: lb_servers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment