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

Improvement GitHub Actions / Fix admin user existing #20

Merged
merged 57 commits into from
Oct 25, 2019

Conversation

felddy
Copy link
Member

@felddy felddy commented Oct 25, 2019

This PR addresses the following issues:

  • Switch from Travis-CI to GitHub Actions: The single Travis-CI configuration has been replaced with three GitHub Actions workflows. One to lint and test pushes, one to handle prereleases, and one for full releases. Breaking up the releases into separate workflows affords us more flexibility, and greatly simplifies the patcher script that injects parameters into the packer.json file. Having separate workflows allows all variables to be adjusted, instead of relying on logic within the patcher script. With this flexibility we will be able to easily deploy pre-releases to a staging account (playground), and full releases to production.
  • Fixes issue "admin" user exists and maybe shouldn't #6: The debian AMI we are using comes with an admin user configured. This user is used by Packer. The user was persisting on to the final image with its ssh keys installed in both admin and root. At the end of image creation, this user is now deleted, its sudo privileges revoked, and its keys are removed from root. (All keys are removed from root.) Additionally, the cloud-init configuration is modified to prevent the user from being recreated at boot.
  • Re-enable ansible-linter: Avoid installation failure with newer setuptools ansible/ansible-lint#591 has been closed and merged, but not yet released. The linter has been re-enabled in the pre-commit configuration, but is referenced by its commit SHA.

dav3r and others added 30 commits October 18, 2019 10:10
…t_autoupdate

Add updates from running pre-commit autoupdate
Replace Travis-CI with GitHub actions
We are now have access to more state via actions
@felddy felddy self-assigned this Oct 25, 2019
@felddy felddy added documentation This issue or pull request improves or adds to documentation enhancement labels Oct 25, 2019
@felddy felddy marked this pull request as ready for review October 25, 2019 13:48
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking swell- great work here @felddy. Please review my comments though before merging.
⚙️ ⚙️ ⚙️

@@ -67,7 +67,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/ansible/ansible-lint.git
rev: v4.1.1a0
rev: 7a2221a32968f12bee8494caf978ce150ad1494f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you open an issue to remind us to change this back to a release (when one becomes available)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to backport this change up to skeleton-generic. I'll modify the issue that is up there: cisagov/skeleton-generic#19

DRYs out the code a bit, and removes the need to bump tools versions in 
all repos.
@felddy felddy requested a review from dav3r October 25, 2019 16:55
Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is some nice work. I like the transition to GitHub Actions and this is a good transition PR. Strong work @felddy 💪

@felddy felddy merged commit f4da916 into develop Oct 25, 2019
@felddy felddy deleted the improvement/actions branch October 25, 2019 18:29
Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is strong work. I left a comment discussing how things could possibly be improved (DRYed) even further.

--time-cond "${CURL_CACHE_DIR}/${PACKER_ZIP}" --location \
"https://releases.hashicorp.com/packer/${PACKER_VERSION}/${PACKER_ZIP}"
sudo unzip -o -d /usr/local/bin "${CURL_CACHE_DIR}/${PACKER_ZIP}"
- name: Install Terraform
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the install of packer and terraform be broken out into a separate repo a la what you did with cisagov/setup-env-github-action?

Seems maybe the Ansible role stuff could possibly be broken out as well, taking the list of role names as an input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This issue or pull request improves or adds to documentation
Projects
Development

Successfully merging this pull request may close these issues.

4 participants