DevOps - everything as code

After participating in the DevOps course at Tikal,
It’s time to add some toturials and info on what I learned.

What are the chalenges of DevOps:

  • Fast development on 3 axis: Scale - Complexity - velocity
  • How to make all the tools available to the developers.

Some DevOps key concepts

  • Everything as code
  • Similarity of environments
  • Developers Operations
  • Operation development
  • Continuous everything
  • Automation

The idea is to make everything (in the development cycle) as code and to handle it as code.
plan -> code -> build -> test -> release -> deploy -> operate -> monitor -> plan (next iteration).

Plan

Code

Source control

A source control sould help with the following points: blame + diff + merge + who, what, when, where and why.
there are several brunching themas:

  • brunch by release
  • brunch by feature
  • brunch by team
  • single branch

There are several source control technologies that are popular CVS, SVN, GIT etc’.

GIT

The main attributes of git are:

  • Everything is done locally.
  • Collaboration
  • Peer-to-Peer
  • Make the change & share the change
  • brunch & merge
  • control your history

github git cheat sheet pdf

Build

A build is the process of compiling, linking packing etc’

  • compile - generate code
  • link - get 3rd parties (libraries etc’)
  • pack - binaries, archives, list packages, runtime, container.
  • Test - unit / other
  • static code analysis
  • version
  • publish

    Build tools

    Make

  • The make file
  • gcc
  • incremental build
  • Tasks and lifecycle

Ant

  • make for java
  • xml base
  • can be extended by java
  • task dependency

Maven

  • well defined lifecycle
  • convention over configuration
  • dependency by binary
  • plugins
  • inheritance of configuration
  • the reactor (module set by profile)

Gradle

  • general purpose build system
  • DSL (build on groovy)
  • “build by convention”
  • flexible / extensible
  • built in plugins for java groovy ant maven

Test

There are many methodologies for testing

  • blackbox testing
  • functional testing
  • flow driven tests
  • BDD
  • TDD and more.

I will focus on 2 tools

  1. cucumber
  2. selenium

cucumber

A cucumber is a tool based on Behavior Driven Development (BDD) framework which is used to write acceptance tests for the web application. It allows automation of functional validation in easily readable and understandable format (like plain English) to Business Analysts, Developers, Testers, etc.
Behavior Driven Development is an extension of Test Driven Development and it is used to test the system rather than testing the particular piece of code.
Cucumber can be used along with Selenium, Watir, and Capybara etc. Cucumber supports many other languages like Perl, PHP, Python, .Net and Java etc.

selenium

Selenium automates browsers. That’s it!
Selenium WebDriver tool is used to automate web application testing to verify that it works as expected. It supports all major browsers.

Release

Deploy

We configure a Jenkins server to automatically handle our deployments and we create Ansible roles and playbooks to easily spin up and configure new servers.

Ansible

automation, manage complex deployments and speed productivity.

Jenkins

Jenkins provides hundreds of plugins to support building, deploying and automating any project.

Docker

Docker provides an additional layer of abstraction and automation of operating-system-level virtualization

Operate

Swarm

Docker include swarm mode for natively managing a cluster of Docker Engines called a swarm.

Feature highlights:

  • Cluster management integrated with Docker Engine
  • Decentralized design
  • Declarative service model
  • Scaling
  • Desired state reconciliation
  • Multi-host networking
  • Service discovery
  • Load balancing
  • Secure by default
  • Rolling updates more info

Monitor

Our DevOps is going the way of Prometheus, Alertmanager, node-exporter, CAdvisor & Grafana etc’.

Prometheus

Prometheus is an open-source systems monitoring and alerting toolkit.
It is now a standalone open source project and maintained independently of any company.

Prometheus’s main features are:

  • a multi-dimensional data model with time series data identified by metric name and key/value pairs
  • a flexible query language to leverage this dimensionality
  • no reliance on distributed storage; single server nodes are autonomous
  • time series collection happens via a pull model over HTTP
  • pushing time series is supported via an intermediary gateway
  • targets are discovered via service discovery or static configuration
  • multiple modes of graphing and dashboarding support

Alertmanager

The Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts.

Grafana

The tool for beautiful monitoring and metric analytics & dashboards for Graphite, InfluxDB & Prometheus & More

node_exporter

Exporter for machine metrics

cadvisor

Analyzes resource usage and performance characteristics of running containers.

Senior Java Developer

Backend Group
Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com