-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a666734
Showing
176 changed files
with
7,841 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Build folder | ||
target/ | ||
|
||
## IntelliJ environment setting folder | ||
.idea/ | ||
|
||
## IntelliJ project file | ||
*.iml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
|
||
variables: | ||
MEASUREMENT_REPOSITORY_URL: 673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/measurement-service | ||
GATEWAY_HARDWARE_REPOSITORY_URL: 673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/gateway-hardware | ||
GATEWAY_WEBAPP_REPOSITORY_URL: 673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/gateway-webapp | ||
LICENSE_STATUS_REPOSITORY_URL: 673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/license-status-service | ||
USER_LICENSE_REPOSITORY_URL: 673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/userlicense-service | ||
MYSQLDB_REPOSITORY_URL: 673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/mysqldb | ||
|
||
stages: | ||
- build | ||
- package | ||
|
||
|
||
maven-build: | ||
image: maven:3-jdk-8 | ||
stage: build | ||
script: "mvn package -B" | ||
artifacts: | ||
paths: | ||
- "*/target/Dockerfile" | ||
- "*/target/*.jar" | ||
- "docker/*" | ||
|
||
build: | ||
image: docker:latest | ||
services: | ||
- docker:dind | ||
stage: package | ||
script: | ||
- apk add --no-cache curl jq python py-pip tree | ||
- pip install awscli | ||
- $(aws ecr get-login --no-include-email --region eu-central-1 | sed 's|https://||') | ||
- docker build -t $MEASUREMENT_REPOSITORY_URL -f measurement-service/target/Dockerfile . | ||
- docker push $MEASUREMENT_REPOSITORY_URL | ||
- docker build -t $GATEWAY_HARDWARE_REPOSITORY_URL -f gateway-hardware/target/Dockerfile . | ||
- docker push $GATEWAY_HARDWARE_REPOSITORY_URL | ||
- docker build -t $GATEWAY_WEBAPP_REPOSITORY_URL -f gateway-webapp/target/Dockerfile . | ||
- docker push $GATEWAY_WEBAPP_REPOSITORY_URL | ||
- docker build -t $LICENSE_STATUS_REPOSITORY_URL -f license-status-service/target/Dockerfile . | ||
- docker push $LICENSE_STATUS_REPOSITORY_URL | ||
- docker build -t $USER_LICENSE_REPOSITORY_URL -f userlicense-service/target/Dockerfile . | ||
- docker push $USER_LICENSE_REPOSITORY_URL | ||
- docker build -t $USER_LICENSE_REPOSITORY_URL -f userlicense-service/target/Dockerfile . | ||
- docker push $USER_LICENSE_REPOSITORY_URL | ||
- docker build -t $MYSQLDB_REPOSITORY_URL -f docker/mysql/Dockerfile . | ||
- docker push $MYSQLDB_REPOSITORY_URL | ||
only: | ||
- master | ||
tags: | ||
- docker |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Elastic Beanstalk Files | ||
.elasticbeanstalk/* | ||
!.elasticbeanstalk/*.cfg.yml | ||
!.elasticbeanstalk/*.global.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
# Elastic Beanstalk Files | ||
.elasticbeanstalk/* | ||
!.elasticbeanstalk/*.cfg.yml | ||
!.elasticbeanstalk/*.global.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
{ | ||
"AWSEBDockerrunVersion":2, | ||
"family":"", | ||
"volumes":[ | ||
|
||
], | ||
"containerDefinitions":[ | ||
{ | ||
"image":"mongo", | ||
"name":"mongo", | ||
"essential":true, | ||
"memory":200, | ||
"portMappings":[ | ||
{ | ||
"containerPort":27017, | ||
"hostPort":27017 | ||
} | ||
] | ||
}, | ||
{ | ||
"name":"mysqldb", | ||
"image":"673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/mysqldb:latest", | ||
"essential":true, | ||
"memory":200, | ||
"portMappings":[ | ||
{ | ||
"containerPort":3306, | ||
"hostPort":3306 | ||
} | ||
] | ||
}, | ||
{ | ||
"name":"userlicense-service", | ||
"image":"673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/userlicense-service:latest", | ||
"essential":true, | ||
"memory":250, | ||
"portMappings":[ | ||
{ | ||
"containerPort":8080, | ||
"hostPort":8081 | ||
}, | ||
{ | ||
"containerPort":8000, | ||
"hostPort":8002 | ||
} | ||
], | ||
"links":[ | ||
"mysqldb" | ||
], | ||
"environment":[ | ||
{ | ||
"name":"LS_JAVA_OPTS", | ||
"value":"-Xmx50m -Xms30m" | ||
} | ||
] | ||
}, | ||
{ | ||
"name":"gateway-webapp", | ||
"image":"673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/gateway-webapp:latest", | ||
"essential":true, | ||
"memory":250, | ||
"portMappings":[ | ||
{ | ||
"containerPort":8080, | ||
"hostPort":80 | ||
}, | ||
{ | ||
"containerPort":8000, | ||
"hostPort":9000 | ||
} | ||
], | ||
"links":[ | ||
"mysqldb" | ||
], | ||
"environment":[ | ||
{ | ||
"name":"LS_JAVA_OPTS", | ||
"value":"-Xmx50m -Xms30m" | ||
} | ||
] | ||
}, | ||
{ | ||
"image":"confluentinc/cp-zookeeper", | ||
"name":"zookeeper", | ||
"essential":true, | ||
"memory":50, | ||
"portMappings":[ | ||
{ | ||
"containerPort":2181, | ||
"hostPort":2181 | ||
} | ||
], | ||
"environment":[ | ||
{ | ||
"name":"ZOOKEEPER_TICK_TIME", | ||
"value":"2000" | ||
}, | ||
{ | ||
"name":"ZOOKEEPER_CLIENT_PORT", | ||
"value":"2181" | ||
} | ||
] | ||
}, | ||
{ | ||
"image":"confluentinc/cp-kafka", | ||
"name":"kafka", | ||
"essential":true, | ||
"memory":300, | ||
"portMappings":[ | ||
{ | ||
"containerPort":9092, | ||
"hostPort":9092 | ||
} | ||
], | ||
"environment":[ | ||
{ | ||
"name":"KAFKA_HEAP_OPTS", | ||
"value":"-Xmx200m -Xms200m" | ||
}, | ||
{ | ||
"name":"KAFKA_DEFAULT_REPLICATION_FACTOR", | ||
"value":"1" | ||
}, | ||
{ | ||
"name":"KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR", | ||
"value":"1" | ||
}, | ||
{ | ||
"name":"KAFKA_ADVERTISED_HOST_NAME", | ||
"value":"127.0.0.1" | ||
}, | ||
{ | ||
"name":"KAFKA_ADVERTISED_LISTENERS", | ||
"value":"PLAINTEXT://172.31.37.144:9092" | ||
}, | ||
{ | ||
"name":"KAFKA_BROKER_ID", | ||
"value":"1" | ||
}, | ||
{ | ||
"name":"KAFKA_ZOOKEEPER_CONNECT", | ||
"value":"172.31.37.144:2181" | ||
} | ||
] | ||
}, | ||
{ | ||
"name":"gateway-hardware", | ||
"image":"673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/gateway-hardware", | ||
"essential":true, | ||
"memory":200, | ||
"portMappings":[ | ||
{ | ||
"containerPort":8080, | ||
"hostPort":8090 | ||
}, | ||
{ | ||
"containerPort":8000, | ||
"hostPort":8004 | ||
} | ||
], | ||
"links":[ | ||
"kafka" | ||
], | ||
"environment":[ | ||
{ | ||
"name":"SPRING_KAFKA_BOOTSTRAP_SERVERS", | ||
"value":"kafka:9092" | ||
} | ||
] | ||
}, | ||
{ | ||
"name":"license-status-service", | ||
"image":"673796305703.dkr.ecr.eu-central-1.amazonaws.com/chariot/license-status-service", | ||
"essential":true, | ||
"memory":200, | ||
"portMappings":[ | ||
{ | ||
"containerPort":8080, | ||
"hostPort":8082 | ||
}, | ||
{ | ||
"containerPort":8000, | ||
"hostPort":8003 | ||
} | ||
], | ||
"links":[ | ||
"mongo", | ||
"userlicense-service", | ||
"kafka" | ||
], | ||
"environment":[ | ||
{ | ||
"name":"SPRING_KAFKA_BOOTSTRAP_SERVERS", | ||
"value":"kafka:9092" | ||
} | ||
] | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>backend</artifactId> | ||
<groupId>com.chariot.backend</groupId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>backend-model</artifactId> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</project> |
35 changes: 35 additions & 0 deletions
35
backend-model/src/main/java/com/chariot/backend/model/Channel.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.chariot.backend.model; | ||
|
||
import java.util.UUID; | ||
|
||
/** | ||
* Created by Dariusz Kijania on 7/23/2017. | ||
*/ | ||
public class Channel { | ||
private String name; | ||
private UUID id; | ||
|
||
public Channel() { | ||
} | ||
|
||
public Channel(UUID id, String name) { | ||
setId(id); | ||
setName(name); | ||
} | ||
|
||
public UUID getId() { | ||
return id; | ||
} | ||
|
||
public void setId(UUID id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
backend-model/src/main/java/com/chariot/backend/model/License.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.chariot.backend.model; | ||
|
||
/** | ||
* Created by Dariusz Kijania on 7/26/2017. | ||
*/ | ||
public class License { | ||
private int requestsPerSeconds; | ||
private LicenseType licenseType; | ||
|
||
public License(int requestsPerSeconds, LicenseType licenseType) { | ||
this.requestsPerSeconds = requestsPerSeconds; | ||
this.licenseType = licenseType; | ||
} | ||
|
||
public License() { | ||
} | ||
|
||
public int getRequestsPerSeconds() { | ||
return requestsPerSeconds; | ||
} | ||
|
||
public void setRequestsPerSeconds(int requestsPerSeconds) { | ||
this.requestsPerSeconds = requestsPerSeconds; | ||
} | ||
|
||
public LicenseType getLicenseType() { | ||
return licenseType; | ||
} | ||
|
||
public void setLicenseType(LicenseType licenseType) { | ||
this.licenseType = licenseType; | ||
} | ||
} |
Oops, something went wrong.