Aagent-new-service-parent - A Springboot Rest Webservice Project that can be deployed to a Docker container

Overview

Webservice in a Docker Container A Springboot Rest Webservice Project that can be deployed to a Docker container.

This is a simple Springboot application created at https://start.spring.io/ and then augmented with a few features:

A single greeting REST json service accessible by GET request with optional name parameter. Available Open API docs for the service(s) automatically created and available as json or yaml Swagger UI page showing the available annotation driven docs and allowing test calls Build Locally Maven Use Maven Wrapper Build ./mvnw packaage will create the jar in the target folder.

Run ./mvnw spring-boot:run or java -jar target/

Use Maven Locally Build mvn clean package will create the jar in the targer folder

Running Locally Set up environment variables Refer to Azure KeyVault (ct-s-zeaus-aagent-kv) for the following variables.

AZURE_KEYVAULT_URL AZURE_KEYVAULT_CLIENT_ID AZURE_TENANT_ID Refer to CYBERARK for following environment variable.

AZURE_KEYVAULT_SECRET Setting up environment variables locally in IntelliJ IDE: Run > Edit Configurations... > Kotlin > ApplicationKt > Configuration > Environment Variables

Docker Refer here for how to run the docker image locally.

CI / CD There are 3 GitHub Actions workflows for CI / CD pipelines:

CI per PR Build (ci-per-pr.yml) This workflow will run whenever a pull request is opened, synchronized, or closed. It builds the source code with maven and publish the java artifact (jar) to Artifactory. It also builds the docker image and publishes the docker image to Artifactory. It will then deploy the docker image to sandbox in Kubernetes. Once the PR is closed, it will delete the deployment in sandbox. CI Build (ci.yml) This workflow will run whenever code is being merged to the main/master branch. It will build the source code with maven and publish the java artifact (jar) to Artifactory. It also builds the docker image and publishes the docker image to artifactory. It will then create a deployment for the docker image in the aptagnext-nonprod namespace in Kubernetes. This is done by triggering a workflow to run in AAInternal/aagent-deploy-kubernetes that updates the corresponding webapp.yaml, which ArgoCD watches. Promote Dev -> Prod (cd.yml) This workflow will run whenever a release tag is created on the app repo. It will promote the jar and docker image from dev to prod in Artifactory (i.e. dev-releases to prod-releases, docker-dev to docker-prod). It will then create a deployment for the docker image in the aptagnext-prod namespace in Kubernetes. This is done by triggering a workflow to run in AAInternal/aagent-deploy-kubernetes that updates the corresponding webapp.yaml, which ArgoCD watches. The workflows in this repository reference reusable workflows in AAInternal/aagent-workflow-actions. Refer to this wiki, for more information on these workflows.

Rest Service HTML test endpoint localhost:8080/ Exposes links to the various "information" pages under the API

Hello World Greeting: Hello World Greeting: Hello Friend Swagger UI Docs with testing Actuator Health Actuator Info Open API JSON Open API download YAML Endpoint: localhost:8080/greeting Response: { "id": 2, "content": "Hello, World!" } Health Check / Application Info localhost:8080/actuator/health localhost:8080/actuator/info Open API Docs localhost:8080/docs You can see the full Open API at:

localhost:8080/openapi.json - json format
localhost:8080/openapi.json.yaml - yaml format (download)

API Spec Currently, the api definition found in catalog-info-api.yaml refers to the api.json file found in the repo. In order to have the api definition use the one found in the kubernetes instance change the last line in catalog-info-api.yaml from:

$text: ./api.json

to

$text: https://aagent-new-service-parent.drke.ok8s.aa.com/openapi.json

For more information about how the catalog yaml file is structured, please refer to backstage's documentation: https://backstage.io/docs/features/software-catalog/descriptor-format#substitutions-in-the-descriptor-format

You might also like...
intera.kt is a Kotlin library for interacting with the Discord Interactions API through a gateway service or a REST API.

🗿 Overview ⚠️ WARNING: intera.kt is a work in progress. It is not yet ready for use. You may encounter bugs and other issues, but please report if yo

intera.kt is a Kotlin library for interacting with the Discord Interactions API through a gateway service or a REST API.

🗿 Overview ⚠️ WARNING: intera.kt is a work in progress. It is not yet ready for use. You may encounter bugs and other issues, but please report if yo

Cargo service: REST API, Spring Boot, Kotlin, JDBC, PostgreSQL

cargo-jdbc Cargo service, training project with Spring Boot, JDBC and Kotlin. To

Kotlin Ktor REST Service
Kotlin Ktor REST Service

Servicio web para crear una API REST usando Kotlin y Kator asĂ­ como otras tecnologĂ­as propuestas por JetBrains.

Blog Backend Api built with Kotlin, Springboot and AWS

Kotlin, Spring Boot, MySQL, JPA, Hibernate Rest API for Blogs A Restful CRUD API using Kotlin, Spring Boot, Mysql, JPA and Hibernate hosted on AWS Ela

Desenvolvimento de uma API utilizando SpringBoot + Kotlin com o intuito de cadastro de Vingadores.

Avengers API - Curso de introdução á Arquitetura Hexagonal com Spring Boot e Kotlin Desenvolvimento de uma API utilizando SpringBoot + Kotlin com o in

A springboot secure web app with thymeleaf support.

kotlin-web-maven-spring-thyme-challenge-question-aes-encoded-scrypt-encode Description A springboot secure web app with thymeleaf support. Three roles

A springboot secure web app with jsp support.

kotlin-web-maven-spring-jsp-register-rsa-encrypt-argon2-encoded Description A springboot secure web app with jsp support. Three roles are defined; USE

SpringBoot SpringDoc JWT
SpringBoot SpringDoc JWT

springboot-springdoc-jwt Things todo list Clone this repository: git clone https

Owner
ReeceRiley-aa
ReeceRiley-aa
Web Container: A simple web container library for Android to help fellow developer to open WebView easily

WebContainer Description Web Container is a simple web container library for And

Achmad Ichsan Thaib 8 Nov 22, 2022
A sample skeleton backend app built using Spring Boot kotlin, Expedia Kotlin Graphql, Reactive Web that can be deployed to Google App Engine Flexible environmennt

spring-kotlin-gql-gae This is a sample skeleton of a backend app that was built using: Spring Boot(Kotlin) Reactive Web Sprinng Data R2DBC with MYSQL

Dario Mungoi 7 Sep 17, 2022
Shoppe - Kotlin and Ktor app, which can easily be deployed to Heroku

[ ?? Work in progress ??‍♀️ ⛏ ?? ??️ ?? ?? ?? ] Shoppe Kotlin Multiplatform App

Adrian Witaszak 33 Jul 12, 2022
A project that takes advantage of docker and makes the load test easier

Performance Test It's a project that takes advantage of docker and makes the load test easier. Also, it collects metrics from each running container.

jorge cabrera 1 Dec 9, 2021
Michal Kubele 0 Jan 6, 2022
Team management service is a production ready and fully tested service that can be used as a template for a microservices development.

team-mgmt-service Description Team management service is a production ready and fully tested service that can be used as a template for a microservice

Albert Llousas Ortiz 18 Oct 10, 2022
A simple GUI frontend for the norns docker environment

This is a simple GUI frontend for the norns docker environment. It displays the virtual norns UI using the screenshot server and exposes OSC controls.

Will Winder 4 Jul 30, 2022
Android SDK development environment Docker image

AndroidSDK Android SDK development environment Docker image Goals It contains the complete Android SDK enviroment, is able to perform all regular Andr

Jing Li 1k Dec 30, 2022
For Kotlin with SpringBoot project that have multi-module-structure template

Goals kotlin + spring-boot + gradle + multi-module building Module-Structure ---root |--- src.main.kotlin.KotlinSpringbootMultiModuleTemplateAppl

pguma 1 Jul 24, 2022
Demo Spting REST Service on Kotlin. Works with PostgreSQL via Spring Data. Data initialization provided by liquibase

Spring Boot REST API with Kotlin Spring Boot REST API service. Spring Data with PostgreSQL. Data initialization with Liquibase. Swagger UI Reference D

null 0 Jun 10, 2022