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.

  1. Create and checkout a new git branch on local machine:
    $ git checkout -b poc-site-features
    
  2. Make changes to web content. e.g. edit index.html:
    vi index.php
    ...
    <font>new content</font>
    ...
    
  3. Test content on local machine. Run php server and browser to index.php.
    php -S localhost:8000
    
  4. Commit changes to git on local machine:
    $ git add helloworld.com/httpContent/html/index.html
    $ git commit -m "Updating content of index.html"
    
  5. Push changes to remote branch:
    $ git push -u origin poc-site-features
    
  6. 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"
    
  7. Test load balancer url in browser: http://ansiblehelloworld-test-lb-1998216944.eu-west-1.elb.amazonaws.com/

Next: Step 11 - Deploy changes to Ansible playbooks

⚠️ **GitHub.com Fallback** ⚠️