docksal project lead chief architect @ ffw / by leonid makarov · intro ★chief architect @ ffw us...

41
Sandbox CI/CD Environments for Everyone by Leonid Makarov Chief Architect @ FFW / Docksal Project Lead

Upload: others

Post on 24-Jun-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Sandbox CI/CD Environments for Everyone

by Leonid MakarovChief Architect @ FFW /

Docksal Project Lead

Page 2: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Agenda

★ Intro★ Typical development process★ Local environments★ Project automation★ Sandbox CI/CD environments with Docksal★ Bonus: Advanced and cool features

Page 3: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Intro

Hi there!

Page 4: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Intro

★ Chief Architect @ FFW US★ DevOps, infrastructure, tooling★ In Drupal since 2006★ In Docksal since 2016

Leonid Makarov

Page 5: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Docksal Team

Maintainers

Supporters

Page 6: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Typical development process

What it should look like

Page 7: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Typical development process

★ Local development

★ Feature branch => Pull/merge request

★ Code review

★ CI/CD automation (automated tests & deployments)

★ Hosting: dev, stage, prod

Page 8: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Local environments

Go Docker

Page 9: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

“Can not reproduce!”

Page 10: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

What to do?

Page 11: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Why Docker

https://www.slideshare.net/LeonidMakarov2/docksal-better-than-vms

★ Containers are more efficient★ Immutable images - no fragile provisioning at runtime★ Work with different project stacks at the same time★ Containers can be extended in a reproducible way ★ Containers are portable (CI reuse)

Page 12: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Compose + Containers + Conventions = Docksal

+ +

Page 13: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

docksal.yml is Compose

★ No new YML dialect you need to learn★ Fully Docker Compose compatible

Page 14: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Image library and boilerplates➔ Default stack

➔ Additional services◆ Solr, Varnish◆ Memcached, Redis, Selenium, MailHog, ...

➔ Boilerplate projects for◆ Drupal 8, Drupal 7◆ Wordpress◆ Magento◆ Laravel

◆ NodeJS◆ Hugo◆ Gatsby JS◆ Grav CMS

Page 15: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Change what you like

★ Create custom automation in BASH, Node or PHP

★ Full power and flexibility of Docker Compose

★ Seamlessly extend our stock Docker images

at the project level with your Dockerfile

★ Create and publish addons github.com/docksal/addons

Page 16: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Project automation

Automate routine/complex tasks

Page 17: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Single command

All-in-one:

➔ Create containers➔ Run project automation: initialize settings,

import/update database, compile css, run drush...

fin init

Page 18: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Custom commands

fin db-import && fin db-update

fin build-theme

Create as many commands as you need

fin behat

Page 19: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Sandbox CI/CD environments

Reuse automation to create sandboxes

Page 20: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

What sandboxes are for

Page 21: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

What you need for sandboxes

Page 22: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

How sandboxes work

Page 23: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Project and Git repo setup

git clone <repo-url> .fin init

Page 24: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Sandbox server setup

aws

gcloud

Page 25: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Sandbox server setup

Page 26: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Sandbox server setup

Page 27: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

CircleCI setup: config.yml

Page 28: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

CircleCI setup: Environment Variables

Page 29: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Live demo

Do attempt yourself!

Page 30: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Build status notifications

Page 31: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Build status notifications

Page 32: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Your sandbox, delivered

Page 33: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Bonus:Advanced and cool featuresThere is more...

Page 34: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Smart resource management★ Automatic hibernation and cleanup of sandboxes

★ On-demand waking-up

★ Permanent environments (e.g. dev, stage)

Active environments = RAM

Hibernating environments space = Disk

Page 35: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Security★ Custom SSL certificates

★ On-the-fly certificates with LetsEncrypt (coming soon...)

★ Basic HTTP authentication

★ oAuth2 / OIDC authentication (coming soon...)

Page 36: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Visual tools: Web UI (using Portainer)

Page 37: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Visual tools: Web IDE (using Cloud9)Full-featured IDE

- Code editing- Syntax highlighting- Console- Debugger

Page 38: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

More use cases for sandboxes★ Development environments in the Cloud

★ Super enhanced code reviews

★ Trainings / Sprints / Contributions

★ Simplytest.me on steroids

Page 39: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Live demo

Do attempt yourself!

Page 40: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Q&A

Leonid Makarov

BADCamp 2018

Page 41: Docksal Project Lead Chief Architect @ FFW / by Leonid Makarov · Intro ★Chief Architect @ FFW US ★DevOps, infrastructure, tooling ★In Drupal since 2006 ★In Docksal since

Thank you!

Chat gitter.im/docksalBlog blog.docksal.ioTwitter @docksalio