DEPLOYMENT MADE EASY! Presented by Hunde Keba & Ashish Pagar - - PowerPoint PPT Presentation

deployment made easy
SMART_READER_LITE
LIVE PREVIEW

DEPLOYMENT MADE EASY! Presented by Hunde Keba & Ashish Pagar - - PowerPoint PPT Presentation

DEPLOYMENT MADE EASY! Presented by Hunde Keba & Ashish Pagar DSFederal Inc. - Connecting the dots 1 DSFederal Inc. We provide solutions to Federal Agencies Our technology solutions connect customers to the people they serve


slide-1
SLIDE 1

DSFederal Inc. - “Connecting the dots”

1

Presented by

Hunde Keba & Ashish Pagar

DEPLOYMENT MADE EASY!

slide-2
SLIDE 2

DSFederal Inc. - “Connecting the dots”

2

DSFederal Inc.

» We provide solutions to Federal Agencies » Our technology solutions connect customers to the people they serve

slide-3
SLIDE 3

DSFederal Inc. - “Connecting the dots”

Necessity is the Mother of Invention

» Project Requirements

– Budget – Team Size – Time

» Need for Standardized Deployments » Workflow with CI/CD » Onboarding Developers

– Classic local development – Virtual Machine

3

slide-4
SLIDE 4

DSFederal Inc. - “Connecting the dots”

Classic Dev Environment

Problems? » Host OS Support; tedious configurations » Non-transferable » Deployment Hassle

4

slide-5
SLIDE 5

DSFederal Inc. - “Connecting the dots”

Virtual Machines

» Pros

– Pristine host; highly customizable – Multiple VMs, 1 per project – Clone, share and transfer to other hosts

» Cons

– Resource heavy – Difficult to share images

5

slide-6
SLIDE 6

DSFederal Inc. - “Connecting the dots”

Docker to the Rescue

6

slide-7
SLIDE 7

DSFederal Inc. - “Connecting the dots”

Docker

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications, whether

  • n laptops, data center

VMs, or the cloud.

7

slide-8
SLIDE 8

DSFederal Inc. - “Connecting the dots”

Why Docker?

» Lightweight » Portable » Consistent Environment

8

slide-9
SLIDE 9

DSFederal Inc. - “Connecting the dots”

Docker Containers

» Docker container wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server » A container is a runtime instance of an image

9

slide-10
SLIDE 10

DSFederal Inc. - “Connecting the dots”

Docker Images

» Docker container runs an Image » Binary package with root filesystem and metadata » Metadata includes:

– Application Process – Volumes – Ports, etc.

10

slide-11
SLIDE 11

DSFederal Inc. - “Connecting the dots”

Compose Docker Image

» Images are built from DockerFile » DockerFile is sequential list of commands » Images can inherit from other images

Example: php:5.6-fpm inherits from debian:jessie

11

slide-12
SLIDE 12

DSFederal Inc. - “Connecting the dots”

DockerFile example

#Docker File 2 (Here we don’t care about the OS) FROM php:7.2-apache WORKDIR /var/www/html EXPOSE 80 12 #Docker file 1 (Installing apache on an Ubuntu 12 image ) FROM ubuntu:12.04 RUN apt-get update && apt-get install -y apache2 && apt-get clean && rm -rf /var/lib/apt/lists/* ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 EXPOSE 80 CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]

slide-13
SLIDE 13

DSFederal Inc. - “Connecting the dots”

Lets Setup Local

» Dockerfile for Applications » Compose File » Environment Variables » Volumes » Git Branches

13

slide-14
SLIDE 14

DSFederal Inc. - “Connecting the dots”

Amazon Web Services

» Provides secured hosting service » Scalable » Complies with Fed. Govt. and is FEDRAMP Certified » Pay as you go » Great set of tools

14

slide-15
SLIDE 15

DSFederal Inc. - “Connecting the dots”

Setup AWS EC2 Instance

» Create AWS Account » Configure EC2 Instance » Setup SSH Access » Install Docker & Docker Compose

15

slide-16
SLIDE 16

DSFederal Inc. - “Connecting the dots”

Setup Nginx

» Organize domains » Redirect incoming requests

for eg., govcondev.dsfederal.com 127.0.0.1:10080 govconstg.dsfederal.com 127.0.0.1:10081

16

slide-17
SLIDE 17

DSFederal Inc. - “Connecting the dots”

CI Jenkins

» Automation Server » Makes deployment easier » Works great with EC2, github, etc. » For our purposes we will use plugins:

– Github Plugin – Publish Over SSH

17

slide-18
SLIDE 18

DSFederal Inc. - “Connecting the dots”

18

SSH

SSH Server

slide-19
SLIDE 19

DSFederal Inc. - “Connecting the dots”

Github Personal Token

19

slide-20
SLIDE 20

DSFederal Inc. - “Connecting the dots”

Token Access

20

slide-21
SLIDE 21

DSFederal Inc. - “Connecting the dots”

Github Credentials in Jenkins

21

slide-22
SLIDE 22

DSFederal Inc. - “Connecting the dots”

Github Connection

22

slide-23
SLIDE 23

DSFederal Inc. - “Connecting the dots”

Jenkins Build Tasks

» Build tasks for each path » Git Polling triggers individual tasks » Task Definition:

– DrupalGovConDev – DrupalGovConStage – DrupalGovConProd

23

slide-24
SLIDE 24

DSFederal Inc. - “Connecting the dots”

Demo

https://youtu.be/qZalwRMcQk0 https://youtu.be/GHTRZyfXc2M

24

slide-25
SLIDE 25

DSFederal Inc. - “Connecting the dots”

QUESTIONS?

https://github.com/DSFederalInc/Drupal4GovCon

Demo: https://youtu.be/qZalwRMcQk0 https://youtu.be/GHTRZyfXc2M Hunde Keba

Twitter: @hunde_keba hunde.keba@dsfederal.com

Ashish Pagar

Twitter: @ashishpagar ashish.pagar@dsfederal.com

THANK YOU

25