Yet another Continuous Delivery talk - Incontro DevOps 2021
Continuous Delivery practices applied to a multi-cloud product born in 2013, through constant evolution of the pipelines to deliver software reliably and manage operations without fear.
waste of time – Infrequent deployments cause late feedback – Manual configuration of environments leads to configuration drift – Manual testing leads to regressions – Can we do better? CONTINUOUS DELIVERY / THEORY
stories) ‒ Focus on describing the problem you want to solve, not solutions • Developers knows what is good for you ‒ Prioritization as a contract with stakeholders ‒ Commit for a plan and try to stick with it (#noestimates) ‒ Current status should be transparent • Feedback to non-developers when releases happens • Meetings are ok but everyone happy and no meetings is better CONTINUOUS DELIVERY / PRACTICES
underrated practice for achieving velocity ‒ Writing tests is HARD for newcomers ‒ Maintaining test suites is HARD for everyone (e.g.: flappers) ‒ Still, it’s worth the time ‒ Optimize build times to avoid slow feedback ‒ Tests give hints on how a function should work CONTINUOUS DELIVERY / PRACTICES
friend, you can rely on it ‒ Ensure that you are not going to break everything in a single move ‒ Repetitive tasks belongs to here • Compile code • Execute regression tests • Generate documentation • Publish new artifacts CONTINUOUS DELIVERY / PRACTICES
‒ Share ownership and abandon blame culture ‒ Meet specifications ‒ Keep the bar high ‒ Written trail of design decisions ‒ Asynchronous feedback ‒ Mentor juniors without doing anything special CONTINUOUS DELIVERY / PRACTICES
automated releases ‒ Every commit is a release candidate ‒ Standard packaging (e.g. Docker) ‒ Central artifacts repository (Nexus, Artifactory) • Accessible from all the execution environments CONTINUOUS DELIVERY / PRACTICES
prod-like environment • Have at least a test environment for every prod environment ‒ Repeatable procedures reusable in every environment ‒ Rollback should be easy as a standard release ‒ Releases should be tracked somewhere (GIT, CI) ‒ Releases must not affects customers CONTINUOUS DELIVERY / PRACTICES
on Github ‒ PR get opened automatically with changelog between versions ‒ Triggered weekly by a schedule on early monday • PR are already built and ready to be merged ‒ Security updates with links to CVEs ‒ Supports most dependency management tools and Dockerfile ‒ Enabled on all repositories via Terraform CONTINUOUS DELIVERY / TOOLING
• Scalability • Predictable pricing ‒ Batteries included compared to Jenkins ‒ A bit of downsides: • Not so configurable (e.g. tests parallelization) • Can’t add new projects via API • Docker integration slightly cumbersome since beginning ‒ Reuse pipeline configuration via ORB CONTINUOUS DELIVERY / TOOLING
Discovery and learn (why is this an issue?) ‒ Enforce standards (quality gates) ‒ Applied systematically for every project ‒ Reports integrated in PR (developer edition) ‒ Security audits (Hotspots) CONTINUOUS DELIVERY / TOOLING
tool after 8+ yrs ‒ Provision new production environment in 30 minutes • script to generate new chef environments ‒ Nightly integration tests on cloud infrastructure ‒ Provision can run from CI or developers box CONTINUOUS DELIVERY / TOOLING
Aggregate similar exceptions ‒ Mark as Resolved • Flagged as regression if found again ‒ Mark as Ignored for n time ‒ Searchable ‒ Slack integration • Each component in a different channel • Only for new errors, regressions or repeated errors in a timeframe CONTINUOUS DELIVERY / TOOLING
repo via Merger script ‒ Select which chef environment you want to update ‒ Iterate on all the platform components installed on the environment to: • Retrieve the latest successful build of master branch on CircleCI • Compare build number with currently installed docker image version • CI deploy jobs tag docker images with build number • If a new version is available, compare current and previous commit-id on Github • Parse commits to search for PR and referenced github issues ‒ Open a pull request with version changes on chef environment • Branch name is always `release-envName` • PR body contains the changelog for every components and links to issue • Issues are linked via a redirector domain to avoid references spam CONTINUOUS DELIVERY / RELEASE
Follows the standard development workflow (review, approve, merge) ‒ When building master, CI pipeline detect if the built commit is: • A release PR generated by Merger • A generic PR with a label `deploy/envName` ‒ Run Chef sequentially on all the nodes of the environment CONTINUOUS DELIVERY / RELEASE
the CI send an email to release owners and exceptions are pushed to sentry/slack ‒ If the release is successful: • The release PR get labeled as `deployed` and a comment is left with the link of the build • Every referenced issue in the release PR body receive a comment stating that a release is just happened • If the referenced issue had a label: • `workflow/ready-for-staging` is replaced by `workflow/test` • `workflow/ready` the issue is closed CONTINUOUS DELIVERY / RELEASE
automatically opened following a weekly schedule: • Main staging environment every weekday until friday • Main demo environment on friday, copying main staging versions • Main production environment on monday, copying main demo versions • Secondary (clients) staging environment on different day of the week, copying main production versions • Secondary (clients) production environment on different days of the week, copying from their staging environment CONTINUOUS DELIVERY / RELEASE