Giter Club home page Giter Club logo

srs-fleet-manager's Introduction

Service Registry service Fleet Manager

Quickstart

To build and run the application in the dev mode, execute:

mvn clean install quarkus:dev -Ddev

Notes:

  • As a result of issues with multi-module projects, you need to use the install Maven target when running quarkus:dev.
  • The -Ddev property enables dev Quarkus profile (even for docker images), and uses a standalone database (h2) and other components to avoid dependencies.
  • You can add -Ddebug property to connect a debugger.

To build a dev application image, run:

mvn clean install -Ddev -Dquarkus.container-image.build=true

which can be executed using:

docker run -p 8080:8080 {user}/srs-fleet-manager-core:0.1.0-SNAPSHOT

Building SR-MSA for production use

The application depends on an Apicurio Registry Tenant Manager client. This dependency is not published at the moment, so you have to build the Tenant Manager and the dependency as follows:

git clone [email protected]:Apicurio/apicurio-registry.git
cd apicurio-registry
make build-tenant-manager

Now, you can build the Service API:

mvn clean install -Dquarkus.container-image.build=true

The production deployment of the application requires:

  • Postgresql database (see core/src/main/resources/application.properties for which environment variables to use for configuration)
  • Latest Apicurio Registry deployment running (2.0.0-SNAPSHOT)
  • Apicurio Registry Tenant Manager running

See dist/openshift/README.md for information about deploying the required components on OpenShift.

Deploy Postgresql locally

docker run -p 5432:5432 -e 'POSTGRES_PASSWORD=postgres' -d postgres
docker run --network host -p 8080:8080 -e 'SERVICE_API_DATASOURCE_URL=jdbc:postgresql://localhost:5432/postgres' {user}/srs-fleet-manager-core:0.1.0-SNAPSHOT

Configuring auth

In order to configure security you must configure the following values:

Option Env. variable
Enable authentication AUTH_ENABLED
Authentication server url KEYCLOAK_URL
Authentication realm KEYCLOAK_REALM
Authentication client KEYCLOAK_API_CLIENT_ID

Configuring tenant manager security

When security is enabled, the application will also expect the following values to be configured to be able to connect to the tenant-manager in a secure manner:

Option Env. variable
Tenant manager auth server url TENANT_MANAGER_AUTH_SERVER_URL
Tenant manager auth realm TENANT_MANAGER_AUTH_SERVER_REALM
Tenant manager auth client TENANT_MANAGER_AUTH_CLIENT_ID
Tenant manager auth secret TENANT_MANAGER_AUTH_SECRET

Examples

The following are several commands for working with the Service API

  • Create a Registry Deployment
curl -X POST -H "Content-Type: application/json" \
  -d '{"tenantManagerUrl":"http://tm1.app.example.com"}' \
  http://localhost:8080/api/serviceregistry_mgmt/v1/admin/registryDeployments
  • List Registry Deployments
 curl http://localhost:8080/api/serviceregistry_mgmt/v1/admin/registryDeployments
  • Create a Registry (Tenant)
curl -X POST -H "Content-Type: application/json" \
  -d '{}' \
  http://localhost:8080/api/serviceregistry_mgmt/v1/registries
  • List Registries (Tenants)
curl http://localhost:8080/api/serviceregistry_mgmt/v1/registries
  • List active Tasks
curl http://localhost:8080/api/serviceregistry_mgmt/v1/admin/tasks

Didact demo

Open VSCode on this project, go to demo/demo.didact.md file and use Ctrl + Shift + V to open the Didact view. You need to be logged to an Openshift 4 cluster to run the demo.

srs-fleet-manager's People

Contributors

andreatp avatar carlesarnal avatar dimakis avatar ericwittmann avatar famarting avatar jsenko avatar riprasad avatar sbose78 avatar smccarthy-ie avatar wtrocki avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.