• Stars
    star
    155
  • Rank 239,423 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple dashboard for pipelines on AWS

badge

Overview

Simple dashboard built for viewing pipeline metrics in AWS. Built using CloudWatch dashboards and metrics populated from CloudWatch events that CodePipeline triggers. You can also deploy this dashboard directly from the AWS Serverless Application Repository here.

For more details, see the blog post CodePipeline Dashboard.

Screen Shot

Launch now!

  1. From your local pipeline-dashboard GitHub repo, create a zip file.
zip -r pipeline-dashboard.zip *.* ./src ./test
  1. Upload the zip file to S3.
aws s3 mb s3://pipeline-dashboard-$(aws sts get-caller-identity --output text --query 'Account')
aws s3 sync . s3://pipeline-dashboard-$(aws sts get-caller-identity --output text --query 'Account')
  1. Make note of the S3 Bucket and zip file name.
  2. Launch the CloudFormation stack by running the command below. You will need to change the --template-body value to point to the location of the template.yml on your machine. You will also change ACCOUNTID to your AWS account id.
aws cloudformation create-stack --stack-name pipeline-dashboard-stack --template-body file:///home/ec2-user/environment/pipeline-dashboard/template.yml  --parameters ParameterKey=PipelinePattern,ParameterValue=* ParameterKey=BucketName,ParameterValue=pipeline-dashboard-ACCOUNTID ParameterKey=CodeKey,ParameterValue=pipeline-dashboard.zip --capabilities CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND --disable-rollback
  1. Once the CloudFormation stack is CREATE-COMPLETE, you will need to trigger a few CodePipeline runs in order to update the CloudWatch dashboard. After these runs, go to the CloudWatch Console and click on Dashboards to see the metrics reflected in the dashboard.

Architecture

As seen in the diagram below, a Lambda function is triggered from a CloudWatch Event rule for CodePipeline events. The Lambda function then generates CloudWatch metrics. The CloudWatch dashboard is then build from the metrics that the Lambda function created. Metric Diagram

The list of pipelines in the dashboard cannot be generated dyanmically so another Lambda function runs regulary to regenerate the dashboard based on whatever metrics have been created. Dashboard Builder Diagram

Metric Details

Fail 1

Metric Description How to Calculate How to Interpret
Cycle Time How often software is being delivered to production. The mean interval of time between two consecutive successful pipeline executions. If this number is less than Lead Time then many commits are being delivered to the pipeline before a previous commit is complete. If this number is significantly greater than Lead Time then the pipeline is delivering risky deployments due to the large batch size of the commits.
Lead Time How long it takes for a change to go to production. The mean amount of time from commit to production, including rework. This is the number the business cares about most, as it represents how long it takes for a feature to get into the hands of the customer. If this number is too large, look at improving the availability of the pipeline (MTBF / MTBF + MTTR).
MTBF How often does the pipeline fail. The mean interval of time between the start of a successful pipeline execution and the start of a failed pipeline execution. This number should be high in comparison to MTTR. If this number is low, then consider improving the reliability of the pipeline by first researching if the root cause is the quality of new code being committed, or the repeatability of the infrastructure and test automation.
MTTR How long does it take to fix the pipeline. The mean interval of time between the start of a failed pipeline execution and the start of a successful pipeline execution. This number should be low as it is a measure of a team's ability to "stop the line" when a build fails and swarm on resolving it. If the Feedback Time is high, then consider addressing that, otherwise the issue is with the team's responsiveness to failures.
Feedback Time How quick can we identify failures. The mean amount of time from commit to failure of a pipeline execution. This number should be low as it affect MTTR. Ideally, failures would be detected as quick as possible in the pipeline, rather than finding them farther along in the pipeline.

Cycle Time vs. Lead Time

Cycle Time and Lead Time are frequently confused. For a good explanation, please see Continuous Delivery: lead time and cycle time. To compare the two metrics consider the following scenarios. Notice that Lead Time is the same for the pipelines in both scenarios, however the cycle time is much smaller in the second scenario due to the fact that the pipelines are running in parallel (higher WIP). This agrees with the formula Lead Time = WIP x Cycle Time:

Success 1 Fig.1 - Pipelines in series

Success 2 Fig.2 - Pipelines in parallel

Development

To run the unit tests: npm test

To deploy the CodeBuild project for staging the templates: npm run create-codebuild or npm run update-codebuild

To deploy to your account: npm run deploy You can change the bucket via npm config set pipeline-dashboard:staging_bucket my-bucket-name

Test

To launch a CloudFormation stack that create a deployment pipeline which runs TaskCat test that launch other CloudFormation stacks in this repo, run the the command below. You will need to change the --template-body value to point to the location of the pipeline-taskcat.yml on your machine.

aws cloudformation create-stack --stack-name pipeline-dashboard-taskcat --capabilities CAPABILITY_NAMED_IAM --disable-rollback --template-body file:///home/ec2-user/environment/pipeline-dashboard/pipeline-taskcat.yml

Deployment to SAR

  1. Go to AWS SAR Console in the production account and click on pipeline-dashboard.
  2. Click on Publish new version.
  3. Enter value for Semantic version.
  4. Enter https://github.com/stelligent/pipeline-dashboard for Source code URL.
  5. For the SAM template, Browse for template-sar.yml from this repo and click the Publish Version button.
  6. Go to the AWS Lambda Console on a separate AWS account and when creating a function, click on the Serverless Application Repository radio button and find pipeline-dashboard.
  7. Deploy the application.
  8. Once it is complete, go to the Amazon CloudWatch Console and choose Dashboards to verify it is working.

More Repositories

1

cfn_nag

Linting tool for CloudFormation templates
Ruby
1,253
star
2

mu

A full-stack DevOps on AWS framework
Go
973
star
3

cloudformation_templates

AWS - CloudFormation Templates
Shell
571
star
4

config-lint

Command line tool to validate configuration files
HCL
193
star
5

devops-essentials

Source code samples for DevOps Essentials on AWS Complete Video Course
HTML
161
star
6

cloudformation-custom-resources

Java
122
star
7

dromedary

Sample app to demonstrate a working pipeline using Infrastructure as Code and AWS Code Services
JavaScript
106
star
8

stelligent-u

Templates and code for Stelligent U lessons
JavaScript
98
star
9

sagemaker-pipeline

Sagemaker pipeline for AWS Summit New York
Python
58
star
10

devopsinthecloud

HTML
50
star
11

stelligent_commons

Scripts and other utilities we commonly use
Ruby
48
star
12

aws-devsecops-workshop

A continuous security pipeline demo for the AWS DevSecOps Workshop.
Ruby
45
star
13

cfn-leaprog

cfn-LEAst-Privilege-ROle-Generator: Experimental tool for generating least privileged IAM roles for CloudFormation and Service Catalog Launch Constraints.
Ruby
40
star
14

dromedary-serverless

Dromedary...without servers.
JavaScript
38
star
15

serverspec-aws-resources

Some serverspec resources to allow testing AWS resources. This repository is deprecated - you should instead use: https://github.com/k1LoW/awspec
Ruby
27
star
16

microservice-exemplar

Sample microservice built with Spring Boot to manage bananas. 🍌
Java
23
star
17

mutato

Repo formerly known as mu-cdk. A.K.A Mu2. Pronounced: mew-tah-toe
TypeScript
23
star
18

config-rule-status

A project to create AWS Config Rules and use them to test AWS Resource compliance.
JavaScript
21
star
19

skaffold_on_aws

example of running skaffold on an aws eks cluster
HTML
21
star
20

continuous_integration_example

Demo project for Continuous Integration - from the book Continuous Integration (Duvall, et. al)
XSLT
20
star
21

opendelivery_platform

Open platform for CD
Ruby
17
star
22

tophat

If I have to stand up a Jenkins server ONE MORE TIME, I'm going to turn this car around!
Ruby
12
star
23

asgard-in-the-cloud

Setup Asgard in ten minutes using a CloudFormation and Chef.
Ruby
11
star
24

potemkin-decorator

Potemkin is a decorator to setup initial conditions for a boto "integration test" with real AWS services via CloudFormation, and to tear them down as well.
Python
11
star
25

keystore

Secure storage of secrets using Amazon Web Services
Ruby
10
star
26

crossing

Utility for storing objects in S3 while taking advantage of client side envelope encryption with KMS
Ruby
10
star
27

packer-ami-pipeline

Demo CodePipeline for building and publishing AMIs with Packer
Ruby
10
star
28

cfn-nag-pipeline

Lambda function to run cfn_nag in CodePipeline
Ruby
10
star
29

stelligent_pipelines

CI/CD pipelines
Shell
9
star
30

crossing-go

Utility for storing objects in S3 while taking advantage of client side envelope encryption with KMS
Go
9
star
31

aws-anchore-engine-scanner

This guide details steps and procedures you can follow to create, launch and implement your own standalone container scanning solution within AWS ecosystem. This approach uses an opensource container scanning tool called Anchore Engine as a proof-of-concept and provides examples of how Anchore integrates with your favorite CI/CD systems orchestration platforms.
Python
9
star
32

minimal-pipeline-gem

Minimal helpers for automating CloudFormation pipelines with ruby
Ruby
8
star
33

python-testing

Examples of testing with python related to AWS boto3 use
Python
7
star
34

zap

Build tools for OWASP Zed Attack Proxy
Ruby
7
star
35

cloudpatrol

Rails App for AWS Policy Management and Cleanup
Ruby
7
star
36

cfn-model

An object model for CloudFormation templates
Ruby
6
star
37

cfnctl

Control Cloudformation lifecycle
Python
6
star
38

inspector-status

A pipeline plugin to get the AWS Inspector findings from AWS Resources
Ruby
6
star
39

stelligent_demo

Python
6
star
40

aws_group_policy

templates for creating a full privilege group and a read only group, as well as a script for moving non-mfa'd users from the privileged group to the read only group
Ruby
6
star
41

aws-inspector-quickstart

aws-inspector-quickstart
Python
6
star
42

test-platform

Python
5
star
43

cfn_nag_examples

5
star
44

lockdown

AWS Emergency Compromise Response
Python
5
star
45

openvpn-ami

Automation for generating an OpenVPN AMI
Ruby
5
star
46

aws-int-test-rspec-helper

RSpec helper for doing AWS SDK integration testing
Ruby
5
star
47

ciexample_jenkins

5
star
48

honolulu_jenkins_cookbooks

Cookbooks for spinning up a Jenkins Server for the Honolulu Answers application
Ruby
5
star
49

jenkins_chef_cookbooks

A collection of cookbooks used to set up a Jenkins server
Ruby
4
star
50

empty-stack

Creating an empty stack in cloudformation to reduce the errors on creation.
Python
4
star
51

yq

YAML query, tool for querying YAML from the command line
Go
4
star
52

mu-cloud9

mu extension for AWS Cloud9
4
star
53

vpc-with-client-vpn

Shell
4
star
54

developer-sandboxes

Using Access Based Access Controls (Tags) in AWS to create Developer Sandboxes for EC2.
Python
4
star
55

stellitime-api

Example mini-app to use during interview process.
Python
3
star
56

cfn-nag-service

Exposes cfn-nag as a service through a Lambda/APIGW or Docker image
Ruby
3
star
57

drifter

Demo of CloudFormation Drift Detection
Shell
3
star
58

stelligent_jenkins_cookbooks

Cloudformation template, startup script, OpsWorks repo for setting up a production account VPC + Jenkins instance
Ruby
3
star
59

ghost-in-shell

Stelligent ghost in shell project repository
CSS
3
star
60

cloud-custodian-example

Example project for Cloud Custodian deployment using CloudFormation
3
star
61

cumulogenesis

Python
3
star
62

nando_automation_demo

nando_automation_demo
Python
3
star
63

sample-pipeline-with-cfn-nag

Sample repository to demonstrate using cfn_nag in CodePipeline
Makefile
3
star
64

deploy-button

functions and templates to have a deploy button for your code pipeline
Python
3
star
65

hab-demo-pipeline

POC for automating Habitat with AWS CodePipeline
JavaScript
2
star
66

utility-vagrants

A collection of utility VMs defined in a Vagrantfile
Shell
2
star
67

hamburgerstore

Data store for pipeline instance metadata. Nothing to do with hamburgers. Sorry.
Ruby
2
star
68

jenkins-factory

Ruby
2
star
69

banana-service

Sample microservice for mu Edit Add topics
Java
2
star
70

amz-linux-hardening

Ruby
2
star
71

aws-stubs-intro

Demonstrates the use of AWS Stubs for the Ruby v2 SDK
Ruby
2
star
72

devopsinthecloudpuppet

Puppet
2
star
73

jenkins_cookbooks

This is Stelligent's open source Jenkins server setup. It only have a few Jenkins-server-maintenance jobs, but is designed to be easily extended to create a pipeline for your application.
Ruby
2
star
74

mu-cfn_nag

mu extension for adding cfn_nag to your pipeline
2
star
75

parameter-store-example

Shows an example how to use the AWS Parameter Store Service
Ruby
2
star
76

serverless-synchronous-resource-plugin

Serverless plugin for deploying custom CFN stacks
JavaScript
2
star
77

mu-extension-example

JavaScript
2
star
78

docker-api-ecr-sample

Ruby
2
star
79

devopsinthecloudjenkins

1
star
80

mu-pipeline-dashboard

mu extension for Stelligent's Pipeline Dashboard
1
star
81

mu-elasticsearch

1
star
82

mu-minimal-ec2

Continuous Delivery for Microservices on EC2 with mu
Shell
1
star
83

iam_complexity_metrics

Experimenting with the notion of complexity metrics for IAM policy documents
Ruby
1
star
84

aws-trend-micro-dssc

An example of how to integrate Trend Micro Deep Security Smart Check with AWS CodePipeline
Makefile
1
star
85

dns-test

Testing multi-account public hosted zones
HTML
1
star
86

cfn-man

command line documentation for cloud formation resources
Python
1
star
87

MySQL-Vault

Shell
1
star
88

BenchOps-Resources

Useful resources from the bench
1
star
89

homebrew-tap

This is Stelligent's homebrew tap. Formulas should go in here.
Ruby
1
star
90

mu-workshop-lab1

Lab for learning mu
Java
1
star
91

lz-lambdas

Landing Zone Lambda Code
Python
1
star
92

iot-pipeline

JavaScript
1
star
93

elastic-volumes-lambda

Lambda and example terraform to demo automation of elastic volume live modifications
HCL
1
star
94

mu-workshop-lab2

Lab for learning mu
1
star
95

jenkins-worker-base

Provide a base docker image for jenkins workers
Shell
1
star
96

munatra

Mu implementation with Sinatra 'Hello World' app and CasperJS acceptance testing.
Ruby
1
star
97

opendelivery_jenkins

1
star
98

mu-workshop-lab3

Lab for learning mu
Java
1
star
99

cfn-nag-rule-repository-complete

Ruby
1
star
100

chat-app

A simple chat application for demo purposes
CSS
1
star