Setup
It is possible to integrate micro-lc
inside the Mia-Platform Console with almost zero configurations.
Integration requirements
Follow the requirements below to integrate this functionality:
- access to the Console into the desired project;
- the authentication configuration
JSON
and the core configurationJSON
to expose.
Integration steps
Following steps must be made on Console, and will deploy a micro-lc
configured instance.
1. Microservice creation for fe-container
Here is the process to create an instance of fe-container
.
- Go to the
Microservices
section; - Create a new microservice using the
Microlc frontend
plugin (available in theMicrofrontend
section of the marketplace); - Configure the microservice with a custom name and description;
- Complete the creation to deploy an instance of the
fe-container
.
2. Microservice creation for be-config
Here is the process to create an instance of be-config
.
- Go to the
Microservices
section; - Create a new microservice using the
Microlc backend
plugin (available in theMicrofrontend
section of the marketplace); - Configure the microservice with a custom name and description;
- Complete the creation of the
be-container
instance; - In the
ConfigMap
section, edit theconfiguration.json
and theauthentication.json
, according to your needs
At the end of these 2 steps, the situation should be similar to the following:
3. Endpoint configuration for fe-container
- Create a new endpoint;
- Define the
Base path
where you want to exposefe-container
(e.g./microlc
); - As type, use
Microservice
; - Select the microservice name used for
fe-container
; - Complete the creation.
After that, the situation should be similar to the following:
4. Endpoint configuration for be-config
- Create a new endpoint;
- As
Base path
, use/api/v1/microlc
;cautionThe endpoints exposed by the
be-container
microservice must always be reachable at/api/v1/microlc/...
: as in the microservice we defined the environment variableSERVICE_PREFIX=/
, here/api/v1/microlc
is enough. - As type, use
Microservice
; - Select the microservice name used for
be-container
; - Complete the creation.
From the outside, the endpoints /api/v1/microlc/configuration
and /api/v1/microlc/authentication
exposed by this microservice must be always reachable.
So, if you set /
as Base path
, the SERVICE_PREFIX
environment variable must be set to /api/v1/microlc
.
While, if you set /api
as Base path
, the SERVICE_PREFIX
environment variable must be set to /v1/microlc
;
and so on...
After that, the situation should be similar to the following:
Result
At the end of this, you should have a complete instance of micro-lc
up and running,
exposed at the Base path
provided for the fe-container
(e.g. https://your-host.com/microlc
).