Automation without frustration: Node deployment pipelines

Diana Rodriguez

@cotufa82

$whoami

Diana Rodríguez 

Google Developer Expert

Auth0 Ambassador

Microsoft MVP 

🐍 Developer Advocate @ Nexmo

GDG Durham Organiser @ gdgdurham

🦊  https://gdgdurham.org

🐦  @cotufa82




$whoami_not

Want to win an Oculus Go?

Enter our raffle by texting us an idea of how you’d use Nexmo’s APIs along with your name, email and twitter handle (if you have one) to:

 

US - +1 (504) 814-4243

UK - +44 7451272789

Canada - +1 (204) 410-4819

 

On Friday, we will be picking our favorite idea, so be creative! We will announce the winners at the end of the conference raffle.

 

If you need to draw inspiration - talk with us or checkout our site https://developer.nexmo.com. We look forward to hearing your ideas.

 

Good luck!

 

@cotufa82

A deployment pipeline is a process that allows code to flow through a consistent, automated sequence of stages.

 

While each stage is either building or testing the code, the stage must have the necessary automation to not only run the test but also to provision, deploy, set up, and configure the testing and staging environments. The code should progress through each stage automatically. The goal is to strive for unattended automation that eliminates or minimises human intervention. (Error prone errors)

📜

@cotufa82

Effects of DevOps
 

The adoption of DevOps culture, tools and agile engineering practices has, among other things, the nice effect of increasing the collaboration between the roles of development and operations. One of the main problem of the past (but also today in some realities) is that the dev team tended to be uninterested in the operation and maintenance of a system once it was handed over to the ops team, while the latter tended to be not really aware of the system’s business goals and, therefore, reluctant in satisfying the operational needs of the system (also referred to as “whims of developers”).

 

📜

@cotufa82

  • Automation: a pipeline removes the need for expensive and error-prone manual tasks.
  • Easier onboarding. become productive faster. No need for teams to learn a complex development and test environment.
  • Teams can detect any code that is not fit for delivery and then reject the code and provide feedback as early as possible.
  • A pipeline provides visibility into and confidence in the code as it progresses through successive stages where the testing becomes more like production.

Advantages

@cotufa82

BASIC CONCEPTS

@cotufa82

Continuous Integration (CI) is a practice in which developers will check their code into a version controlled repository several times per day. Automated build pipelines are triggered by these check ins which allow for fast and easy to locate error detection.

@cotufa82

Continuous Delivery (CD) is the process which allows developers and operations engineers to deliver bug fixes, features and configuration changes into production reliably, quickly and sustainably. Continuous delivery offers the benefit of code delivery pipelines that are routinely carried out that can be performed on demand with confidence.

@cotufa82

Blue/Green Deployments

Utilisation of a Blue/Green Deployment process reduces risk and down time by creating a mirror copy your production environment naming one Blue and one Green. Only one of the environments is live at any given time serving live production traffic. During a deployment software is deployed to the non-live environment, tests are run against the non-live env and once all tests pass, traffic is routed to make it live. The process is repeated in the next deployment with the original live environment now becoming non-live.

@cotufa82

Canary Deployments

Canary Deployments do not rely on duplicate environments to be running in parallel. Canary Deployments roll out a release to a specific number or percentage of users/servers to allow for live production testing before continuing to roll out the release across all users/servers. The prime benefit of canary releases is the ability to detect failures early and roll back changes limiting the number of affected users/services in the event of exceptions and failures.

@cotufa82

  • Source-code management
  • Build
  • Continuous integration (CI) server
  • Configuration management
  • Deployment and provisioning
  • Testing frameworks

🛠

@cotufa82

"Run the Gauntlet"

@cotufa82

@cotufa82

@cotufa82

https://nopanic.codeon.rocks

https://bit.ly/nopanix

@cotufa82

@cotufa82

@cotufa82

@cotufa82

@cotufa82

Features :

  • CircleCI is a cloud-based system — no dedicated server required, and you do not need to administrate it. However, it also offers an on-prem solution that allows you to run it in your private cloud or data center.

  • It has a free plan even for a business account

  • Rest API — you have an access to projects, build and artifacts The result of the build is going to be an artifact or the group of artifacts. Artifacts could be a compiled application or executable files (e.g. android APK) or metadata (e.g. information about the tests`success)

  • CircleCI caches requirements installation. It checks 3rd party dependencies instead of constant installations of the environments needed

  • You can trigger SSH mode to access container and make your own investigation (in case of any problems appear)

  • That’s a complete out of a box solution that needs minimal configuration\adjustments

 

@cotufa82

CircleCI is compatible with:

  • Python, Node.js, Ruby, Java, Go, etc

  • Ubuntu, Mac OS X (paid accounts)

  • Github, Bitbucket

  • AWS, Azure, Heroku, Docker, dedicated server

  • Jira, HipChat, Slack

 

@cotufa82

CircleCI Pros:

  • Fast start

  • CircleCI has a free plan for enterprise projects

  • It’s easy and fast to start

  • Lightweight, easily readable YAML config

  • You do not need any dedicated server to run CircleCI

 

@cotufa82

CircleCI Cons:

  • CircleCI Ubuntu for free  and MacOS as a paid part
  • Despite the fact CircleCI do work with and run on all languages tt supports only the following programming languages “out of the box”:Go (Golang), Haskell, Java, PHP, Python, Ruby/Rails, Scala
  • Some problems may appear in case you would like to make customizations: you may need some 3rd party software to make those adjustments
  • Also, while being a cloud-based system is a plus from one side, it can also stop supporting any software, and you won’t be able to prevent that

@cotufa82

@cotufa82

@cotufa82

Travis CI Pros:

  • Build matrix out of the box

  • Fast start

  • Lightweight YAML config

  • Free plan for open-sourced projects

  • No dedicated server required

Travis CI Cons:

  • Price is higher compared to CircleCI, no free enterprise plan

  • Customization (for some stuff you’ll need 3rd parties)

@cotufa82

@cotufa82

Features:

  • Jenkins is a self-contained Java-based program, ready to run out-of-the-box, with packages for Windows, Mac OS X and other Unix-like operating systems
  • With hundreds of plugins in the Update Center, Jenkins integrates with practically every tool in the continuous integration and continuous delivery toolchain
  • Jenkins can be extended via its plugin architecture, providing nearly infinite possibilities for what Jenkins can do
  • Various job modes: Freestyle project, Pipeline, External Job, Multi-configuration project, Folder, GitHub Organization, Multibranch Pipeline
  • Jenkins Pipeline. That’s a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins. Pipeline provides an extensible set of tools for modeling simple-to-complex delivery pipelines “as code” via the Pipeline DSL
  • Allows you to launch builds with various conditions.
  • You can run Jenkins with Libvirt, Kubernetes, Docker, and others.
  • Rest API — have access to Controlling the amount of data you fetch, Fetch/Update config.xml, Delete a job, Retrieving all builds, Fetch/Update job description, Perform a build, Disable/Enable a job

@cotufa82

Jenkins Pros:

  • Price (it’s free)

  • Customization

  • Plugins system

  • Full control of the system

Jenkins Cons:

  • Dedicated server (or several servers) are required. That results in additional expenses. For the server itself, DevOps, etc…

  • Time needed for configuration / customization

@cotufa82

@cotufa82

@cotufa82

@cotufa82

  • Buddy is an amazing solution for small and big projects and as an introductory way to get acquainted with CI/CD and the DevOps Culture
  • Gitlab CI is recommended for projects of any size but it requires focus and learning!!
  • CircleCI is recommended for small projects, where the main goal is to start the integration as fast as possible.
  • Travis CI is recommended for cases when you are working on the open-source projects, that should be tested in different environments.
  • Jenkins is recommended for the big projects, where you need a lot of customizations that can be done by usage of various plugins. You may change almost everything here, still this process may take a while. If you are planning the quickest start with the CI system Jenkins might not be your choice.

FINAL REMARKS

https://slides.com/superdiana/pipelinesngalt

@cotufa82

Automation without frustration: Node deployment pipelines

By Super Diana

Automation without frustration: Node deployment pipelines

  • 994