2dv517-project-group3
Instructions to run
- Use a key named acme-key.pem
- Set your ssh-key name in vars-etc/private-vars.yml (no pathing or .pem in the end, only the name)
- Set your ssh-key path in ansible.cfg (use path and .pem in the end, since this is full pathing)
- Set variables in: vars-etc/ansible-setup-vars.yml
- Run deploy-all.sh
Volume
To use volume first time(Default usecase is for DB_master, change this in the mount-server-vars.yml if you want):
- volume-db-backup-up.yml
- attach-and-mount.yml, ssh into DB_master, run (ls /tmp/vol/) to check that the backup was successful
- umount-and-detach.yml when finished
To use volume continuously:
- create-database-backup.yml
Information
Step-by-step setup(1-3 from external location. 4-10 from Ansibleserver1):
- Network - Playbooks/(network-up.yml)
- Security Groups - Playbooks/(security-groups-up.yml)
- Ansibleserver1 - Playbooks/(ansible-instance-up -> copy-files-to-ansible.yml -> ansible.setup.yml)
- Instance Infrastructure - Playbooks(infrastructure-up.yml)
- Install modules - Playbooks/(ansible-modules.yml)
- Create dynamic inventory - Playbooks/(initialize-inventory.yml)
- Database replication - Playbooks/roles/(db.yml -> db-master.yml (-> dbmaster.sh) -> setup-acme-db.yml -> db-slave.yml (-> dbslave.sh))
- Webservers - Playbooks/roles/(wordpress.yml)
- Loadbalancing - Playbooks(NGINX-install.yml)
- Monitoring - Playbooks/(prometheus-server-install.yml -> grafana-install.yml)