Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Bump h2 from 1.4.200 to 2.1.210 in /services/account-management-service #44

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy

on:
workflow_call:
inputs:
artifact_name:
description: 'Artifact name'
required: true
type: string
service_name:
description: 'Name of the AWS cluster service'
required: true
type: string
cluster_name:
description: 'Name of the AWS cluster'
required: true
type: string
secrets:
aws-access-key-id:
description: 'AWS_ACCESS_KEY_ID'
required: true
aws-secret-access-key:
description: 'AWS_SECRET_ACCESS_KEY'
required: true
aws-region:
description: 'AWS_DEFAULT_REGION'
required: true
service_repository_url:
description: 'ECR url'
required: true
jobs:
push-ecr:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{secrets.aws-access-key-id}}
aws-secret-access-key: ${{secrets.aws-secret-access-key}}
aws-region: ${{secrets.aws-region}}
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: ${{inputs.artifact_name}}
- run: docker load --input image.tar
- run: docker push ${{secrets.service_repository_url}}
restart-services:
runs-on: ubuntu-latest
needs: push-ecr
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{secrets.aws-access-key-id}}
aws-secret-access-key: ${{secrets.aws-secret-access-key}}
aws-region: ${{secrets.aws-region}}
- run: aws ecs update-service --force-new-deployment --service ${{inputs.service_name}} --cluster ${{inputs.cluster_name}}
110 changes: 110 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
on: [push]
jobs:
call-maven-build-orchestration:
uses: csum112/oha/.github/workflows/maven_build.yml@pipelines
with:
service_dir: services/orchestration-service
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/orchestration-service-bar
artifact_name: orchestration-service-image
call-deploy-build-orchestration:
needs: call-maven-build-orchestration
uses: csum112/oha/.github/workflows/deploy.yml@pipelines
with:
artifact_name: orchestration-service-image
service_name: orchestration-service
cluster_name: smpip-cluster
secrets:
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/orchestration-service-bar
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
call-maven-build-account-management:
uses: csum112/oha/.github/workflows/maven_build.yml@pipelines
with:
service_dir: services/account-management-service
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/account-management-service-bar
artifact_name: account-management-service-image
call-deploy-build-account-management:
needs: call-maven-build-account-management
uses: csum112/oha/.github/workflows/deploy.yml@pipelines
with:
artifact_name: account-management-service-image
service_name: account-management-service
cluster_name: smpip-cluster
secrets:
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/account-management-service-bar
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
call-maven-build-predictions-management:
uses: csum112/oha/.github/workflows/maven_build.yml@pipelines
with:
service_dir: services/predictions-management-service
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/prediction-management-service-bar
artifact_name: predictions-management-service-image
call-deploy-build-predictions-management:
needs: call-maven-build-predictions-management
uses: csum112/oha/.github/workflows/deploy.yml@pipelines
with:
artifact_name: predictions-management-service-image
service_name: prediction-management-service
cluster_name: smpip-cluster
secrets:
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/prediction-management-service-bar
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
call-maven-build-eureka:
uses: csum112/oha/.github/workflows/maven_build.yml@pipelines
with:
service_dir: services/eureka
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/eureka-bar
artifact_name: eurerka-image
call-deploy-build-eureka:
needs: call-maven-build-eureka
uses: csum112/oha/.github/workflows/deploy.yml@pipelines
with:
artifact_name: eurerka-image
service_name: eureka
cluster_name: smpip-cluster
secrets:
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/eureka-bar
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
call-npm-build:
uses: csum112/oha/.github/workflows/npm_build.yml@pipelines
with:
service_dir: social-media-post-impact-prediction-ui
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/ui-core-service-bar
artifact_name: ui-service-image
call-npm-deploy:
needs: call-npm-build
uses: csum112/oha/.github/workflows/deploy.yml@pipelines
with:
artifact_name: ui-service-image
service_name: ui-core-service
cluster_name: smpip-cluster
secrets:
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/ui-core-service-bar
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
call-python-build:
uses: csum112/oha/.github/workflows/python_build.yml@pipelines
with:
service_dir: prediction
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/prediction-service-bar
artifact_name: prediction-service-image
call-python-deploy:
needs: call-python-build
uses: csum112/oha/.github/workflows/deploy.yml@pipelines
with:
artifact_name: prediction-service-image
service_name: prediction-service
cluster_name: smpip-cluster
secrets:
service_repository_url: 366257853867.dkr.ecr.eu-west-1.amazonaws.com/prediction-service-bar
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
44 changes: 44 additions & 0 deletions .github/workflows/maven_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Maven build

on:
workflow_call:
inputs:
service_dir:
description: 'Path of service directory containing a valid java spring boot project'
required: true
type: string
service_repository_url:
description: 'ECR url'
required: true
type: string
artifact_name:
description: 'Artifact nam'
required: true
type: string
jobs:
test:
runs-on: ubuntu-latest
container: maven:3-openjdk-11
steps:
- uses: actions/checkout@v2
- run: cd ${{inputs.service_dir}} && mvn clean test
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.8.2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- uses: actions/checkout@v2
- run: mvn spring-boot:build-image -DskipTests -Dspring-boot.build-image.imageName=${{inputs.service_repository_url}}
working-directory: ${{inputs.service_dir}}
- run: docker save ${{inputs.service_repository_url}} > image.tar
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{inputs.artifact_name}}
path: image.tar
42 changes: 42 additions & 0 deletions .github/workflows/npm_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Npm build

on:
workflow_call:
inputs:
service_dir:
description: 'Path of service directory containing a valid npmjs project'
required: true
type: string
service_repository_url:
description: 'ECR url'
required: true
type: string
artifact_name:
description: 'Artifact name'
required: true
type: string
jobs:
test:
runs-on: ubuntu-latest
container: node:14
steps:
- uses: actions/checkout@v2
- run: npm install -D
working-directory: ${{inputs.service_dir}}
- run: npm run test
working-directory: ${{inputs.service_dir}}
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- uses: actions/checkout@v2
- run: cd ${{inputs.service_dir}} && docker build -t ${{inputs.service_repository_url}} .
- run: docker save ${{inputs.service_repository_url}} > image.tar
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{inputs.artifact_name}}
path: image.tar
32 changes: 32 additions & 0 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Python build

on:
workflow_call:
inputs:
service_dir:
description: 'Path of service directory containing a valid npmjs project'
required: true
type: string
service_repository_url:
description: 'ECR url'
required: true
type: string
artifact_name:
description: 'Artifact name'
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- uses: actions/checkout@v2
- run: cd ${{inputs.service_dir}} && docker build -t ${{inputs.service_repository_url}} .
- run: docker save ${{inputs.service_repository_url}} > image.tar
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{inputs.artifact_name}}
path: image.tar
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/Social-Media-Post-Impact-Prediction.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ FII's Master students ASET Social Media Post Impact Prediction project

Team coordinator: Simionescu Cristian

[Technical report](https://www.overleaf.com/read/msccvfhyxdqp)

[Google Docs](https://docs.google.com/document/d/17-i0q_29vPZMftnWDd8_PdwHBRvu75ktIhGteaEPhDM/edit#heading=h.1endmhexzdq3)

[~~Trello~~](https://trello.com/b/0rzeIAg8/aset-2021-2022)


2 changes: 1 addition & 1 deletion infrastructure/init/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ provider "aws" {

# Configure S3 bucket for terraform backend
resource "aws_s3_bucket" "s3_bucket_terraform_backend" {
bucket = "smpip-terraform-backend"
bucket = "smpip-terraform-backendv2"
acl = "private"

tags = {
Expand Down
Loading