1. Preparation
1.1. Publish Quarkus Package
First of all the quarkus Backend needs to be in some kind of registry, so we can use the docker image. You can easily achieve this using the Github Container registry. For this we use the following Github-Workflow to publish our backend package to the Github Container registry.
Details
Github-Workflow
name: CD
on:
workflow_dispatch:
inputs:
tags:
description: 'Tags'
required: true
jobs:
build_backend:
name: Build backend
runs-on: ubuntu-latest
env:
IMAGE_NAME: backend
defaults:
run:
working-directory: ./backend
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Package
run: mvn package -Dmaven.test.skip
- name: Login to GitHub Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: docker build . -f src/main/docker/Dockerfile.jvm --tag $IMAGE_NAME
- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=$(echo "${{ github.event.inputs.tags }}" | sed -e 's,.*/\(.*\),\1,')
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
Running the Github-Workflow

1.2. Request a namespace for your deployment
Request a namespace for your deployment from a Beeyond Administratior.
2. Deploy Database
Click on template and choose the "Postgres DB" template

2.1. DB Wildcards
Fill out the wildcards for the "Postgres DB" template

Wildcardname | Description | Example |
---|---|---|
Name |
Name of the service and deployment |
auction-db |
Database |
Database name |
db |
Password |
Password for the specified user |
app |
User |
User name |
app |
Tip
|
You can preview the generated yaml using the "Evaluate and Show" button |

Since the database is an internal service we do not need an Ingress

2.2. DB Information
Fill out the information

DB Information | |
---|---|
Description |
Database for the Auction Quarkus App |
Class |
4ahif |
Namespace |
<namespace> (auction-app) |
To |
<Expiry date> |
Purpose |
Deploy the Auction Quarkus App |
3. Deploy Quarkus Backend
Create another blueprint with the "Simple Quarkus Development" template

3.1. Quarkus Wildcards
Fill out the wildcards

Wildcardname | Description | Example |
---|---|---|
Name |
Name of the service and deployment |
auction-backend |
Image |
Docker Image name |
ghcr.io/eminasljivic/backend:v0.2 |
Database URL |
URL to the database |
jdbc:postgresql://auction-db:5432/db |
Database Username |
Database user |
app |
Database Password |
Database Password for the specified user |
app |
3.2. Quarkus Ingress
Create an Ingress as the Quarkus API is an external service

3.3. Quarkus Information
Fill out the information

Quarkus Information | |
---|---|
Description |
Auction Quarkus Backend |
Class |
4ahif |
Namespace |
<namespace> (auction-app) |
To |
<Expiry date> |
Purpose |
Deploy the Auction Quarkus App |
4. Approval
Now you have to wait until a Beeyond Administrator approves your requested deployments.
Once your deployments got accepted you can view them running under the Profile tab.

5. Access Deployment
You can get information about the deployment and copy the ingress from the deployment’s review page.
The ingress follows the pattern student.cloud.htl-leonding.ac.at/{namespace}
.

5.1. Testing Endpoint
Our Auction-Deployment provides an endpoint at /api/auction/get-running
which fetches currently running auctions from the database.
In the case of our deployment the full url for the endpoint is https://student.cloud.htl-leonding.ac.at/auction-app/api/auction/get-running
.
