Step 10: Full workflow when performing updates to web apps - Alex-Burgess/ansible-demo GitHub Wiki
Placeholder - describe how to create a branch, make changes, process to merge back into master. Include how changes get deployed to staging and production. Update once final pipeline is in place.
Initial notes on how to create a branch, etc.
- Create and checkout a new git branch on local machine:
$ git checkout -b poc-site-features - Make changes to web content. e.g. edit index.html:
vi index.php ... <font>new content</font> ... - Test content on local machine. Run php server and browser to index.php.
php -S localhost:8000 - Commit changes to git on local machine:
$ git add helloworld.com/httpContent/html/index.html $ git commit -m "Updating content of index.html" - Push changes to remote branch:
$ git push -u origin poc-site-features - On test Ansible controller, run playbook to deploy changes to web servers:
$ sudo -i -u ansible $ cd /app/ansible/AnsibleWebDeployment $ ansible-playbook -i inventories/testing/webappA_hosts main.yml -e "git_branch=poc-site-features" - Test load balancer url in browser: http://ansiblehelloworld-test-lb-1998216944.eu-west-1.elb.amazonaws.com/