Skip to content

Instantly share code, notes, and snippets.

@gkhays
Last active June 1, 2020 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkhays/5117a88550679c2d45d9d18e0c0801a8 to your computer and use it in GitHub Desktop.
Save gkhays/5117a88550679c2d45d9d18e0c0801a8 to your computer and use it in GitHub Desktop.
Getting started with DevOps

Dev Ops Primer

Develop Operations or DevOps is a discipline that bridges software development and IT operations.

Tools of the trade

What can I do on my own PC?

  • Docker Desktop
  • WSL, WSL 2

Docker

Container management.

One of the more powerful features of Docker is the ability to compose containers. The db-primer project makes good use of this.

version: '2.1'
services:
  db:
    image: postgres:10.5-alpine
    ports:
      - "5432:5432"
  
  pgadmin:
    image: thajeztah/pgadmin4
    ports:
      - "5050:5050"

Docker Desktop Documentation
Docker Desktop WSL 2 backend

WSL

Windows Subsystem for Linux Installation Guide for Windows 10
Updating the WSL 2 Linux kernel

Terraform

A tool for provisioning infrastruture. Typically you will provision to AWS, Azure, or VMware vSphere. However, a good starting example is to provision a local Docker container.

provider "docker" {
  host = "tcp://localhost:2375/"
}
resource "docker_image" "nginx" {
  name = "nginx:1.11-alpine"
}
resource "docker_container" "nginx-server" {
  name = "nginx-server"
  image = "${docker_image.nginx.latest}"
  ports {
    internal = 80
  }
  volumes {
    container_path  = "/usr/share/nginx/html"
    host_path = "/home/scrapbook/tutorial/www"
    read_only = true
  }
}

Download Terraform
Terraform Documentation

Ansible

Provisioning and configuration management.

Similar tools:

  • Puppet
  • Chef
  • SaltStack
---
- name: Install Git
  apt:
    name: git
    state: latest
    install_recommends: no

Ansible Documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment