Skip to content

Commit

Permalink
migration from gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
dkijania committed Oct 29, 2018
0 parents commit a666734
Show file tree
Hide file tree
Showing 176 changed files with 7,841 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
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
52 changes: 52 additions & 0 deletions .gitlab-ci.yml
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 added README.md
Empty file.
4 changes: 4 additions & 0 deletions aws/.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
5 changes: 5 additions & 0 deletions aws/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
199 changes: 199 additions & 0 deletions aws/Dockerrun.aws.json
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"
}
]
}
]
}
23 changes: 23 additions & 0 deletions backend-model/pom.xml
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 backend-model/src/main/java/com/chariot/backend/model/Channel.java
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 backend-model/src/main/java/com/chariot/backend/model/License.java
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;
}
}
Loading

0 comments on commit a666734

Please sign in to comment.