-
Notifications
You must be signed in to change notification settings - Fork 0
/
stack.yml
103 lines (96 loc) · 2.42 KB
/
stack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
AWSTemplateFormatVersion: 2010-09-09
Description: The Kafka Stack
####################
Parameters:
GitHubToken:
Description: The GitHub OAuth token
Type: String
####################
Resources:
CodeBuild:
Type: AWS::CodeBuild::Project
Properties:
Artifacts:
Type: NO_ARTIFACTS
Environment:
ComputeType: BUILD_GENERAL1_SMALL
Image: aws/codebuild/docker:1.12.1
Type: LINUX_CONTAINER
Name: Kafka
ServiceRole: !GetAtt [CodeBuildRole, Arn]
Source:
Auth:
Resource: !Ref GitHubToken
Type: OAUTH
Location: https://github.com/varunmc/docker-kafka.git
Type: GITHUB
CodeBuildRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Action:
- sts:AssumeRole
Effect: Allow
Principal:
Service:
- codebuild.amazonaws.com
ManagedPolicyArns:
- arn:aws:iam::aws:policy/PowerUserAccess
CodePipeline:
Type: AWS::CodePipeline::Pipeline
Properties:
ArtifactStore:
Location: !Ref Store
Type: S3
Name: Kafka
RoleArn: !GetAtt [CodePipelineRole, Arn]
Stages:
- Name: Source
Actions:
- Name: Checkout
ActionTypeId:
Category: Source
Owner: ThirdParty
Provider: GitHub
Version: 1
Configuration:
Branch: master
OAuthToken: !Ref GitHubToken
Owner: varunmc
Repo: docker-kafka
OutputArtifacts:
- Name: Sources
- Name: Build
Actions:
- Name: Build
ActionTypeId:
Category: Build
Owner: AWS
Provider: CodeBuild
Version: 1
Configuration:
ProjectName: !Ref CodeBuild
InputArtifacts:
- Name: Sources
CodePipelineRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Action:
- sts:AssumeRole
Effect: Allow
Principal:
Service:
- codepipeline.amazonaws.com
ManagedPolicyArns:
- arn:aws:iam::aws:policy/AdministratorAccess
ImageRepository:
Type: AWS::ECR::Repository
Properties:
RepositoryName: mc.varun/kafka
Store:
Type: AWS::S3::Bucket