Notes from my experimentation with Drone CI
Automate builds with Drone CI in three repositories, "bootstrapping" from scratch:
- Build a small Docker image that contains Ansible
- Package atomic deployment playbooks into Docker image from previous step
- Deploy the fundraising i18n repository content, using the image from previous step
- Create
.drone.yml
to build dockerized Ansible - Change Ansible playbook for deployments to accept source folder instead of doing checkout, Drone is doing the checkout
- Create Docker image with deployment playbooks
- Start working on the Drone pipeline for content
- Update Dockerfile to build dockerized Ansible
- Rebase the branch for the Ansible playbook for deployment
- Create Docker image with deployment playbooks (πππ AGAIN πππ)
- Document all the things!
- Finish
.drone.yml
to build deploy content repository with Ansible. Most pressing question: SSH key management - Test server setup on local machine with ngrok
- different pipelines/parameters for test and prod instead of hardwired test
- add triggers for the branches
- set up permanent server
- Build & publish ansible Docker images using
plugin/docker
instead of building them with local docker socket. - Investigate if the host docker socket can be defined as a host volume and mounted into an image (for running docker commands, e.g. in a Makefile during a deploymnet).
- Document your s##t & do backups!
- How to create presentations with markdown & pandoc
- Learned about Argo - A pipeline & event builder for Kubernetes.
plugin/docker
is only for building + uploading to registry, otherwise use docker directly
- Volume syntax has changed, see https://discourse.drone.io/t/solved-get-cannot-unmarshal-error-when-trying-use-volumes/2243
- Use SSH key secret