Amazon Web Services User Group Meetup
Modern trends in CI/CD
Containerization & Mircoservices
Continuous Deployments with Drone.io & AWS
#drone #ci #cd #aws
popular languages • Deployments (AWS, GCE, Azure, Heroku etc) • Build configuration stored in the repository • Builds executed in virtual machines • Output streamed live • Pipeline as a code • CLI support • Plugins • Notifications (Email, Slack, HipChat, etc)
can be installed on your own infrastructure for free. https://github.com/drone/drone DRONE.IO is a Continuous Delivery platform built on Docker, written in Go.
to setup & maintain! • Lightweight CI/CD open source system written in Go (low resources usage) • Multi tenant system • Scales and grows with your team (drone agents) • Source control driven configuration (YAML) • Build on Docker for full customization (Isolated builds) • Access granted via Github Oauth and scoped to repo perms automatically • No more managing multiple jenkins (use docker modules) • Plugins can be written in any language that can read env vars • Support database engines (MySQL/Postgres/SQLite) • Cross compatible with Jenkins or any other Docker based CI service
on build logs etc. could be a single point of failure unless accounted for feature • The lack of features compared to Jenkins • Settings are too simple, with no way to customize (no permissions configuration) • No crons?! ( http://readme.drone.io/questions/how-to- schedule-builds ) • Limitations like "This feature is only available in the Enterprise Edition" or "Coming Soon”
OS dependency -- Docker) • Docker image (preferred way). Runs on ECS cluster as a service • Configuration through environment variables • Scale with build agents (poll the central drone server for jobs) • Can use RDS PostgresSQL as an alternate storage (default storage engine is an embedded SQLite database which requires zero installation or configuration.)
image • Container created and executed as part of pipeline • Exit code determines success or failure http://plugins.drone.io https://github.com/drone-plugins
and deploy your code • Success determinates by exit code • Defined in repo root dir as .drone.yml • Drone retrieves the .drone.yml file for your commit / branch. If you make a change to the .drone.yml in a branch it does not impact master. • Parallel step execution (group) • Local build testing & debugging with drone cli\ • Skip builds by [ci skip] [skip ci] in commit
process (databases, ip server) • Available on the same network namespace as build containers • Services are accessed using custom hostnames • Handy for DB`s used in testing
against multiple configurations • Variables are interpolated in the yaml using the ${VARIABLE} syntax, before the yaml is parsed • Drone executes a separate build task for each combination in the matrix
(credstash, aws ssm parameter-store) • Injected into build containers as vars or plain text =) • Secrets can be added to the Drone secret store through CLI or UI (drone secret add \ ) • Limit to specific container or all images, repository in your pipeline • Available in the env. Mount a .env file into to container at /.env and drone would read parameters from this file. • Secrets in parameter expressions should be escaped (echo $${SECRET})
build status, github events, environment) • Step Conditions: limit steps build status or by Events: tag, push, pull_request, deployment • Execute a step using custom include and exclude logic • Platform:[linux/*, windows/amd64] • Limit execution of build steps by instances • String Substitution (build metadata, ${DRONE_BRANCH/\//-}) • EnvVariables Reference (DRONE_COMMIT_SHA, etc.) • Run different pipeline steps from the cli than from repository hooks