20
CI CD pipe Atlassian Stack November 2015, Vlad Salagean

CI & CD Pipe (Atlassian Stack) for .NET on AWS

Embed Size (px)

Citation preview

Page 1: CI & CD Pipe (Atlassian Stack) for .NET on AWS

CI CD pipeAtlassian Stack

November 2015, Vlad Salagean

Page 2: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Vlad Salagean• Father of 2 boys• Software Development Manager,

Ex Simpology, 1&1• Agile supporter• Frontend developer

Page 3: CI & CD Pipe (Atlassian Stack) for .NET on AWS
Page 5: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Objective

Page 6: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Pipeline

Page 7: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Setup

Page 8: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Bamboo workflow

Page 9: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Bamboo jobs

Page 10: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Our ExampleProject Plan Stage Job Task

MVCWebApplication Development Master Build Application Source Code CheckoutMSBuild

Deploy Application on Dev Artifact DownloadAWS CodeDeploy

Production Release Build Application Source Code CheckoutMSBuild

Deploy Application on Dev Artifact DownloadAWS CodeDeploy

Deploy Application on Prod Artifact DownloadAWS CodeDeploy

Page 11: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Prerequisites - AccountsAccounti Type Our accounts Comments

Bitbucket mandatory https://bitbucket.org/oceanusro

Bamboo mandatory https://oceanus.atlassian.net/builds

AWS mandatory https://console.aws.amazon.com/

Jira optional https://oceanus.atlassian.net/

Slack optional https://oceanusro.slack.com/

Zapier optional https://zapier.com/

Page 12: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Setup Application• Install Visual Studio Professional 2013• Install Git Source Control Provider and Git Extensions• Create MVC dummy project with Visual Studio• Create Git repository in Bitbucket• Setup .gitignore & gitconfig• Add MVC dummy project to the Bitbucket Git repository

Page 13: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Setup Bitbucket• Create Master and Release branches• All work is done in Master• Merge Master to Release via Pull request

Page 14: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Setup AWS • Bamboo (how to)

• create an IAM user for Bamboo• attach policy permission for user (what to)• create custom AMI• create image to use in Bamboo

• CodeDeploy (how to)• create an IAM user for CodeDeploy• create an IAM instance profile• create a service role• configure an EC2 deploy instance• configure an Application• configure an Deployment group

Page 15: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Setup Bamboo• Create custom Amazon AMI• Configure Bamboo Jobs• Create a build with Bamboo• Setup an EC2 instance with CodeDeploy agent• Deploy application to AWS

Page 16: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Find outs• Bamboo does not offer support out of the box for .NET 4.5 applications,

needs to build a custom AMI• Install same software stack on Bamboo AMI as on local development PC• Bamboo IAM user needs a rights policy attached (ex:

AmazonEC2FullAccess)• Bamboo CodeDeploy does not work with Java 1.8 (use 1.7)• For testing purposes use regions in same continent with you (reduces

RDP latencies, ex: Ireland for CodeDeploy and Frankfurt for Bamboo)• There is no Bamboo Cloud plugin available for Beanstalk (try eb cli)

Page 17: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Disclaimer• MVCWebApplication is a simple MVC application with no database or

other services• Application has been deployed via CodeDeploy on EC2 deployment

groups with no auto scaling.• Environments configuration:

• Development: 2 EC2 instances, 1 lb• Production: 3 EC2 instances, 1 lb

Page 18: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Software configuration• PC configuration used:• Windows 10 Pro• Visual Studio Professional 2013, version: 12.0.31101.00 Update 4• Microsoft .NET Framework, version 4.6.00079

• AWS Free Tier Account• Bamboo Cloud Evaluation Trial• Bitbucket Cloud Evaluation Trial• Jira Cloud Evaluation Trial

Page 20: CI & CD Pipe (Atlassian Stack) for .NET on AWS

Thank you!Questions?

twitter.com/vlad_salageanro.linkedin.com/in/vladsalagean