Skip to content

Commit

Permalink
feat: migrate to new eps + proxy-services based architecture
Browse files Browse the repository at this point in the history
Migrate to new eps + proxy-services based architecture.

Highlights:
- the location-service now uses json-rpc / eps instead of REST
- the deployment config in the infrastructure directory was adjusted accordingly
- demo-checkin-app now receives data requests via json-rpc / eps
- demo-checkin-app now submits data via json-rpc / eps

Notes for developers:
- iris-client-eps directory contains all files / information to set up a local development environment

Co-authored-by: Claudio Bianucci <[email protected]>
Co-authored-by: lucky-lusa <[email protected]>

Refs iris-backlog/issues/81 , /iris-backlog/issues/92

BREAKING CHANGES
  • Loading branch information
bianucci authored May 26, 2021
1 parent fecb9a7 commit 68f6eda
Show file tree
Hide file tree
Showing 92 changed files with 2,220 additions and 1,546 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/location-service_develop.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/public-server_develop.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/push-to-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build, package and deploy (to test) all services on push to develop branch

on:
push:
branches:
- develop
paths:
- iris-location-service/**
- .github/workflows/push-to-develop.yml

jobs:
# https://docs.spring.io/spring-boot/docs/current/maven-plugin/reference/htmlsingle/#build-image
build-location-service:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Cache local Maven repository
uses: actions/[email protected]
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: build, package and publish the image
run: >
mvn -B spring-boot:build-image -am -pl iris-location-service
-Dspring-boot.build-image.publish=true
-Dversion.tag="${{ github.sha }}"
env:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }}

deployment:
needs: build-location-service
runs-on: self-hosted
container: alpine/helm:3.5.4

steps:
- uses: actions/checkout@v1

- name: Prepare k8s config
run: >
rm -rf ~/.kube &&
mkdir ~/.kube &&
echo "${{ secrets.KUBECONFIG_TEST }}" > ~/.kube/config
- name: Run helm deployment
run: >
helm upgrade --install
--namespace iris-gateway
--set environment=test
--set locations.tag="${{ github.sha }}"
iris-gateway ./infrastructure/iris-gateway
220 changes: 119 additions & 101 deletions demo-checkin-app/pom.xml
Original file line number Diff line number Diff line change
@@ -1,106 +1,124 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.4</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>iris-gateway</groupId>
<artifactId>demo-checkin-app</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Demo for Checkin Apps</name>
<properties>
<java.version>11</java.version>
<docker.image.prefix>inoeg</docker.image.prefix>
<version.tag>${project.version}</version.tag>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.12</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.58</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
<version>2.2.7.RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>iris-gateway</groupId>
<artifactId>demo-checkin-app</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Demo for Checkin Apps</name>
<properties>
<java.version>11</java.version>
<docker.image.prefix>inoeg</docker.image.prefix>
<version.tag>${project.version}</version.tag>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.12</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.58</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
<version>2.2.7.RELEASE</version>
<scope>test</scope>
</dependency>

<build>
<finalName>${project.artifactId}-${version.tag}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
<image>
<name>${docker.image.prefix}/${project.artifactId}:${version.tag}</name>
<env>
<!-- embeds environment variables into an image: https://github.com/paketo-buildpacks/environment-variables -->
<BPE_SPRING_PROFILES_ACTIVE>docker</BPE_SPRING_PROFILES_ACTIVE>
<!-- with GraalVM <BP_BOOT_NATIVE_IMAGE>true</BP_BOOT_NATIVE_IMAGE> -->
</env>
</image>
<docker>
<publishRegistry>
<username>${env.DOCKER_HUB_USER}</username>
<password>${env.DOCKER_HUB_PW}</password>
<!-- <token></token> <url>https://docker.example.com/v1/</url> <email>[email protected]</email> -->
</publishRegistry>
</docker>
</configuration>
</plugin>
</plugins>
</build>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>

<!-- jsonrpc4j -->
<dependency>
<groupId>com.github.briandilley.jsonrpc4j</groupId>
<artifactId>jsonrpc4j</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-ri</artifactId>
<version>2.3.3</version>
<type>pom</type>
</dependency>
</dependencies>

<build>
<finalName>${project.artifactId}-${version.tag}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
<image>
<name>${docker.image.prefix}/${project.artifactId}:${version.tag}</name>
<env>
<!-- embeds environment variables into an image: https://github.com/paketo-buildpacks/environment-variables -->
<BPE_SPRING_PROFILES_ACTIVE>docker</BPE_SPRING_PROFILES_ACTIVE>
<!-- with GraalVM <BP_BOOT_NATIVE_IMAGE>true</BP_BOOT_NATIVE_IMAGE> -->
</env>
</image>
<docker>
<publishRegistry>
<username>${env.DOCKER_HUB_USER}</username>
<password>${env.DOCKER_HUB_PW}</password>
<!-- <token></token> <url>https://docker.example.com/v1/</url> <email>[email protected]</email> -->
</publishRegistry>
</docker>
</configuration>
</plugin>
</plugins>
</build>

</project>
Loading

0 comments on commit 68f6eda

Please sign in to comment.