This file contains hidden or 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
/* | |
* Just consume events from Kinesis in a sink | |
*/ | |
const pause = parseInt(process.env.PAUSE_TIME || '0'); | |
//const pause = 0; | |
const sleep = (ms) => { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
}; |
This file contains hidden or 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", | |
"EntitySequenceId": "0", |
This file contains hidden or 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": 1521218149.056, | |
"kinesisSchemaVersion": "1.0", | |
"partitionKey": "post-4897249772", | |
"sequenceNumber": "49582644240588213996014774893954419364389880543362154498", | |
"data": { | |
"MessageType": "Claps", | |
"EntityId": "claps-32142459-4897249772", |
This file contains hidden or 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", |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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: |