This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import boto3 | |
from botocore.vendored import requests | |
import json | |
SUCCESS = "SUCCESS" | |
FAILED = "FAILED" | |
def lower(s): | |
return s[:1].lower() + s[1:] if s else s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import time | |
from datetime import datetime, timedelta | |
import boto3 | |
import json | |
import hashlib | |
from botocore.vendored import requests | |
SUCCESS = "SUCCESS" | |
FAILED = "FAILED" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:8-jdk-slim | |
# copy the application code in the container (in this case, a fat jar) | |
COPY target/application.jar /app/ | |
# copy your magic startup script and make it executable | |
COPY docker-entrypoint.sh / | |
RUN chmod +x /docker-entrypoint.sh | |
# Make this port visible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: {{APPNAME}} | |
namespace: {{NAMESPACE}} | |
spec: | |
replicas: 3 | |
template: | |
metadata: | |
labels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: {{APPNAME}} | |
namespace: {{NAMESPACE}} | |
spec: | |
replicas: 3 | |
template: | |
metadata: | |
labels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{APPNAME}} | |
namespace: {{NAMESPACE}} | |
annotations: | |
service.beta.kubernetes.io/aws-load-balancer-external: 0.0.0.0/0 | |
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http | |
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: {{CERTIFICATE_ARN}} | |
dns.alpha.kubernetes.io/internal: "{{APPNAME}}.{{NAMESPACE}}.{{CLUSTER}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" = "run" ] | |
then | |
RUN_FLAGS="" | |
case $STAGE in | |
dev) | |
# set flags for dev enviroment | |
RUN_FLAGS="-Dspring.profiles.active=dev -Dcom.example.mock=local" | |
;; | |
qa) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Id" : "3187949234", | |
"ClappeId" : "32142459", | |
"PostId" : "4897249772", | |
"Claps" : "21" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"kinesis": { | |
"approximateArrivalTimestamp": 1521218148.073, | |
"kinesisSchemaVersion": "1.0", | |
"partitionKey": "a1627837-a899-4dab-851e-98530ce557aa", | |
"sequenceNumber": "49582644240588213996014774893955628290209495172536860674", | |
"data": { | |
"MessageType": "Claps", | |
"Id": "1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"kinesis": { | |
"approximateArrivalTimestamp": 1521218148.073, | |
"kinesisSchemaVersion": "1.0", | |
"partitionKey": "claps-32142459-4897249772", | |
"sequenceNumber": "49582644240588213996014774893955628290209495172536860674", | |
"data": { | |
"MessageType": "Claps", | |
"EntityId": "claps-32142459-4897249772", |
OlderNewer