+ All Categories
Home > Software > Automated Build System with Docker, Jenkins and Azure: Intro

Automated Build System with Docker, Jenkins and Azure: Intro

Date post: 15-Apr-2017
Category:
Upload: steve-bargelt
View: 300 times
Download: 2 times
Share this document with a friend
15
INTRO AND GOALS AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO
Transcript

INTRO AND GOALS

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

OUTCOMES

▸ As a build engineer I want to:

▸ Avoid setting up environment after environment for dev teams

▸ Concentrate on keeping the infrastructure healthy

▸ Work to implement new features to streamline processes

▸ As a software developer I want to:

▸ Control my software through to production without impediments

▸ Have freedom to create build environments without making special requests

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

WHAT WILL THIS SOLUTION LOOK LIKE?

▸ Dev creates a docker image for build environment (hopefully uses it locally to run, test and debug)

▸ Dev writes tests and code

▸ Dev adds a text file to repository that contains the Jenkins pipeline script

▸ Dev pushes Docker image to the organization's private Docker registry

▸ Dev then uses a tool (currently command line) to create the build job/CI/CD pipeline - I will open source the code for this tool

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

WHAT WILL THIS SOLUTION LOOK LIKE?

▸ So with a command like:

▸ harbormaster --dockertlsfolder /tlsCerts/ -registryuser user -registrypassword correcthorsebatteystaple -imagename bargelt-slavedotnet -label teambargelt_dotnetcore_simpleDotNet -jenkinsurl http://dockerbuild.harebrained-apps.com -jenkinsuser steve -jenkinspassword correcthorsebatteystaple -report https://github.com/stevebargelt/simpleDotNet.git

▸ Magic happens…

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

MAGIC…

▸ Docker image is pulled to docker host

▸ Docker container created and started

▸ Test performed on Docker container

▸ Actually works!

▸ Conforms to standards

▸ Jenkins Docker Template is created

▸ Jenkins Job is created

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

STEP BY STEP

▸ Setup Docker in Azure

▸ Run Jenkins in Docker… in Azure

▸ Setup Jenkins to spin up ephemeral (Docker containers) Jenkins slaves

▸ Setup a Docker registry in Azure (including getting TLS/SSL certs)

▸ Write all the code (in Go) to allow hands-off build job creation

▸ Walk through creating software utilizing this system

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

TUTORIAL 01: DOCKER IN A VM IN AZURE

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

TUTORIAL 02: JENKINS AND EPHEMERAL SLAVES

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

TUTORIAL 03: PRIVATE DOCKER REGISTRY (SECURE)

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

TUTORIAL 04: JENKINS SCRIPTING AND API

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

TUTORIAL 05: DOCKHAND - CODING IN GO

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

TUTORIAL 06: USING THE SYSTEM WITH DOTNET CORE

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

THIS TUTORIAL SERIES

▸ Videos and details step-by-step blog posts

▸ Six installments planned

▸ More enhancement ideas to follow

▸ Expand to AWS

▸ I am use this system for my own projects so I’ll keep it up-to-date

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

WHAT THIS SERIES IS NOT

▸ No fluff

▸ Not going to explain Docker / Containers

▸ Not going to debate tech choices

AUTOMATED BUILD SYSTEM WITH DOCKER, JENKINS, AZURE, AND GO

COLLABORATION AND OPEN SOURCE

▸ I’m no expert on any of these technologies

▸ I’m not a security expert

▸ All code will be open source

▸ Welcome PRs, comments, issues


Recommended