Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate automatic deployment policy from master branch #12

Open
jwflory opened this issue Sep 26, 2018 · 1 comment
Open

Investigate automatic deployment policy from master branch #12

jwflory opened this issue Sep 26, 2018 · 1 comment
Assignees
Labels
help wanted Extra attention is needed improvement Improves on something that already exists

Comments

@jwflory
Copy link
Member

jwflory commented Sep 26, 2018

Summary

Set up automatic Ansible playbook runs when new changes are pushed to this repo's master branch

Background

Currently, changes are still pushed manually by FOSSRIT sysadmins. You have to manually run a playbook when a change is made. It's more convenient and less work to maintain if there were a triggered event to deploy new changes when a pull request is merged to the master branch of this repo.

This way, anyone can contribute without having SSH access to the servers, and still see their changes go through once the PR is merged. The emphasis changes from SSH access to commit access on this repository.

Additional protections are required on master branch once this is set up.

Details

I see Fedora Infrastructure does this with a special machine dedicated only to running Ansible playbooks. I envision this step-by-step process for how it might work:

  1. Pull request is merged into master on FOSSRIT/infrastructure
  2. Webhook / trigger is sent to remote server (or cronjobs could be used?)
  3. Ansible playbook run occurs on playbook server
  4. Changes push out across infrastructure
  5. Logs are captured in case of failure with Ansible playbook

Outcome

  1. Moving responsibility to git commit access from remote account / SSH account access
  2. Automated deployment process after a PR is merged that does not require humans (and outlasts my time as a student at RIT)
@jwflory jwflory added enhancement help wanted Extra attention is needed labels Dec 4, 2018
@jwflory jwflory added improvement Improves on something that already exists and removed enhancement labels Jan 7, 2019
@jwflory jwflory changed the title Investigate automatic deployment policy from master brach Investigate automatic deployment policy from master branch Jan 7, 2019
@jwflory jwflory self-assigned this Mar 19, 2020
@jwflory
Copy link
Member Author

jwflory commented Mar 19, 2020

If I get time next week to explore this, I'll see if I can't create an Ansible Role for this set-up and use webhooks to trigger Ansible playbook runs. Might require a new DigitalOcean droplet:

https://medium.com/@rossbulat/ansible-github-webhooks-automating-app-deployment-733bf58b013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed improvement Improves on something that already exists
Projects
None yet
Development

No branches or pull requests

1 participant