Skip to content

Commit d580345

Browse files
committed
Add submodule 3 for CICD
1 parent 7c40e4e commit d580345

File tree

195 files changed

+12634
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+12634
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# -*-perl-*-
2+
3+
package.Petclinic-microservices-cicd = {
4+
interfaces = (1.0);
5+
6+
deploy = {
7+
generic = true;
8+
};
9+
10+
build-environment = {
11+
chroot = basic;
12+
network-access = blocked;
13+
};
14+
15+
# Use NoOpBuild. See https://w.amazon.com/index.php/BrazilBuildSystem/NoOpBuild
16+
build-system = no-op;
17+
build-tools = {
18+
1.0 = {
19+
NoOpBuild = 1.0;
20+
};
21+
};
22+
23+
# Use runtime-dependencies for when you want to bring in additional
24+
# packages when deploying.
25+
# Use dependencies instead if you intend for these dependencies to
26+
# be exported to other packages that build against you.
27+
dependencies = {
28+
1.0 = {
29+
};
30+
};
31+
32+
runtime-dependencies = {
33+
1.0 = {
34+
};
35+
};
36+
37+
};
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
FROM docker:17.06-rc
3+
#https://github.com/frol/docker-alpine-openjdk7/blob/master/Dockerfile
4+
ENV JAVA_HOME=/usr/lib/jvm/default-jvm
5+
6+
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
7+
RUN apk add --no-cache \
8+
btrfs-progs \
9+
e2fsprogs \
10+
e2fsprogs-extra \
11+
iptables \
12+
xfsprogs \
13+
xz
14+
15+
# TODO aufs-tools
16+
17+
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
18+
RUN set -x \
19+
&& addgroup -S dockremap \
20+
&& adduser -S -G dockremap dockremap \
21+
&& echo 'dockremap:165536:65536' >> /etc/subuid \
22+
&& echo 'dockremap:165536:65536' >> /etc/subgid
23+
24+
ENV DIND_COMMIT 3b5fac462d21ca164b3778647420016315289034
25+
26+
RUN set -ex; \
27+
apk add --no-cache --virtual .fetch-deps libressl; \
28+
wget -O /usr/local/bin/dind "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind"; \
29+
chmod +x /usr/local/bin/dind; \
30+
apk del .fetch-deps
31+
32+
#install java and mvn, aws cli for aws ecr cli
33+
RUN apk add --no-cache coreutils git openssh-client curl zip unzip bash ttf-dejavu ca-certificates openssl groff \
34+
py-pip python jq coreutils curl zip unzip bash ttf-dejavu ca-certificates openssl openjdk8 maven \
35+
&& pip install awscli
36+
37+
COPY dockerd-entrypoint.sh /usr/local/bin/
38+
39+
VOLUME /var/lib/docker
40+
EXPOSE 2375
41+
42+
ENTRYPOINT ["dockerd-entrypoint.sh"]
43+
CMD []
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
put these files
2+
in your codecommit repo [1].
3+
4+
launch the ../infra-automation/codebuild-custom-container-ci.yaml
5+
with param: CodeCommitRepo : repo name of [1]
6+
ECR Repo name for this codebuild custom environment [You need this as a param to ../infra-automation/master-ecs-yaml - CodeBuildContainerSpringBootDocker ]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# no arguments passed
5+
# or first arg is `-f` or `--some-option`
6+
if [ "$#" -eq 0 -o "${1#-}" != "$1" ]; then
7+
# add our default arguments
8+
set -- dockerd \
9+
--host=unix:///var/run/docker.sock \
10+
--host=tcp://0.0.0.0:2375 \
11+
--storage-driver=vfs \
12+
"$@"
13+
fi
14+
15+
if [ "$1" = 'dockerd' ]; then
16+
# if we're running Docker, let's pipe through dind
17+
# (and we'll run dind explicitly with "sh" since its shebang is /bin/bash)
18+
set -- sh "$(which dind)" "$@"
19+
fi
20+
21+
exec "$@"
22+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<settings>
2+
<activeProfiles>
3+
<!--make the profile active all the time -->
4+
<activeProfile>securecentral</activeProfile>
5+
</activeProfiles>
6+
<profiles>
7+
<profile>
8+
<id>securecentral</id>
9+
<!--Override the repository (and pluginRepository) "central" from the
10+
Maven Super POM -->
11+
<repositories>
12+
<repository>
13+
<id>central</id>
14+
<url>https://repo1.maven.org/maven2</url>
15+
<releases>
16+
<enabled>true</enabled>
17+
</releases>
18+
</repository>
19+
</repositories>
20+
<pluginRepositories>
21+
<pluginRepository>
22+
<id>central</id>
23+
<url>https://repo1.maven.org/maven2</url>
24+
<releases>
25+
<enabled>true</enabled>
26+
</releases>
27+
</pluginRepository>
28+
</pluginRepositories>
29+
</profile>
30+
</profiles>
31+
</settings>
Loading
Loading
Loading
Loading
Loading
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
2+
3+
Parameters:
4+
EnvironmentName:
5+
Type: String
6+
7+
PubELBSubnets:
8+
Type: CommaDelimitedList
9+
VpcId:
10+
Type: String
11+
ElbSecurityGroup:
12+
Type: String
13+
14+
Outputs:
15+
LoadBalancer:
16+
Description: Your ALB DNS URL
17+
Value: !Join ['', ["http://",!GetAtt [LoadBalancer, DNSName]]]
18+
ALBListener:
19+
Description: ALB Port 80 http Listener
20+
Value: !Ref LoadBalancerListener
21+
22+
Resources:
23+
24+
### ALB (ELB v2)
25+
LoadBalancer:
26+
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
27+
Properties:
28+
Name: !Sub ${EnvironmentName}-ALB
29+
Scheme: internet-facing
30+
Subnets: !Ref PubELBSubnets
31+
SecurityGroups:
32+
- !Ref ElbSecurityGroup
33+
34+
LoadBalancerListener:
35+
Type: AWS::ElasticLoadBalancingV2::Listener
36+
Properties:
37+
LoadBalancerArn: !Ref LoadBalancer
38+
Port: 80
39+
Protocol: HTTP
40+
DefaultActions:
41+
- Type: forward
42+
TargetGroupArn: !Ref DefaultTargetGroup
43+
44+
# We define a default target group here, as this is a mandatory Parameters
45+
# when creating an Application Load Balancer Listener. This is not used, instead
46+
# a target group is created per-service.
47+
DefaultTargetGroup:
48+
Type: AWS::ElasticLoadBalancingV2::TargetGroup
49+
Properties:
50+
Name: !Sub ${EnvironmentName}-Def-TG
51+
VpcId: !Ref VpcId
52+
Port: 80
53+
Protocol: HTTP
54+
Matcher:
55+
HttpCode: 200-299
56+
HealthCheckIntervalSeconds: 10
57+
HealthCheckPath: /
58+
HealthCheckProtocol: HTTP
59+
HealthCheckTimeoutSeconds: 5
60+
HealthyThresholdCount: 2
61+
TargetGroupAttributes:
62+
- Key: deregistration_delay.timeout_seconds
63+
Value: 30

0 commit comments

Comments
 (0)