17
Central VA AWS UG Jenkins in AWS 17 FEBRUARY 2016

Jenkins and AWS DevOps Tools

Embed Size (px)

Citation preview

Page 1: Jenkins and AWS DevOps Tools

Central VA AWS UGJenkins in AWS

1 7 F E B R U A R Y 2 0 1 6

Page 2: Jenkins and AWS DevOps Tools

2

Agenda

Tonight’s AWS Architecture

Installation Options

Jenkins Overview

Security Options

Plugins

EC2 Integration (Roles, Users, Policies)

Page 3: Jenkins and AWS DevOps Tools

3

Jenkins Overview

“Jenkins is an open source continuous integration tool written in Java. The project was forked from Hudson after a dispute with Oracle. Jenkins provides continuous integration services for software development. It is a server-based system running in a servlet container such as Apache Tomcat.” - https://en.wikipedia.org/wiki/Jenkins_(software)

Easy Integration

900+ Plugins

Easy Installation

Customization

Page 4: Jenkins and AWS DevOps Tools

4

Tonight’s Architecture

Page 5: Jenkins and AWS DevOps Tools

5

Tonight’s Architecture

Page 6: Jenkins and AWS DevOps Tools

6

Tonight’s Architecture

Page 7: Jenkins and AWS DevOps Tools

7

Jenkins Installation Options

LTS Version*

Java, Git, Maven

Yum (AWS 64bt Linux AMI) or AWS Marketplace (Bitnami Jenkins on Ubuntu)

Page 8: Jenkins and AWS DevOps Tools

8

Groovy Startup ScriptPerforms post initialization tasks

Jenkins.properties/init.groovy in $JENKINS_HOME

Page 9: Jenkins and AWS DevOps Tools

9

Jenkins Plugins

Plugins are the key to enhancing Jenkins functionality, usability, and interoperability. Most plugins are OSS.

Cloudbees - https://www.cloudbees.com/products/cloudbees-jenkins-platform/enterprise-edition/features

Some are better supported than others.

Integration

900+

Customization

Page 10: Jenkins and AWS DevOps Tools

10

Jenkins Security

Authorization

Test with Mock Realm

Realms (test with Mock Realm)

Combine with AWS Shared Responsibility Model

Page 11: Jenkins and AWS DevOps Tools

11

EC2 Plugin

Easy to use EC2 IAM Roles

EC2 instances and IAM Roles (Don’t use *s)

Starting and managing slaves, to achieve dynamic horizontal scaling across the AWS cloud.

Setup AWS CLI as Jenkins user (sudo su -s /bin/bash jenkins, aws configure)

Demo

Page 12: Jenkins and AWS DevOps Tools

12

CodeDeploy Setup

IAM Users, Groups, Roles, Policies, Trust Relationships (resources that can assume the role)

AWS CodeDeploy Plugin

Deployment target EC2 instances run codedeploy-agent, and use IAM Role

Code deployment agent will run on deployment targets

Setup S3 bucket for Jenkins Code Deployment Plugin

Page 13: Jenkins and AWS DevOps Tools

13

CodeCommit Setup

Create IAM user, with groups and permissions (polices).

Use as Git repository.

Deployment target EC2 instances run codedeploy-agent, and use IAM Role

Use aws-cli that supports CodeCommit and Credential Helper commands.

Disable OSX Keychain Access Utility (Code Commit 15 minute password expiration)

Page 14: Jenkins and AWS DevOps Tools

14

Syncing Jenkins Config to AWS Code Commit

SCM Sync Config shared additionnal includes

SCM Sync configuration plugin

Page 15: Jenkins and AWS DevOps Tools

15

AWS CodePipeline

Visualization of CD stages

CD Service

Requires role with appropriate CodePipeline policies

Requires S3 bucket versioning enabled.

Can be integrated with remote Jenkins via AWS CodePipeline Plugin

Page 16: Jenkins and AWS DevOps Tools

16

Questions?

Page 17: Jenkins and AWS DevOps Tools

THANK YOU.