The instance will be installed on pilots premises.
Note: The repository and full deployment guide (including supporting images) can be found at: https://gitlab.h2020-demeter-cloud.eu/demeterproject/wp4/decisionsupport/4.a.cropgrowthstatusyield/4.a.5-estimatebeehive/estimatebeehive/-/blob/6-simplification-to-provide-singular-endpoint/docs/deployment-guide.md
Refer to the following sections for installation and usage:
| Name | Version | Notes |
|---|---|---|
| Docker | 20.10.10 | Docker docs |
| Docker-Compose | 2.1.1 | Docker Compose docs |
Sign-up on ACS (follow Option A in this guide: Demeter User Signup & Activate.
Sign into the Demeter Access Control System to access its Home Page.
In the Home Page, select the Register button.
Once Register has been selected, a three-step registration form will be presented.
Complete the following fields and then select Next:
http://localhost:8071/Select an image to use as an application icon (Optional) and then Select Next.
Select the "+" on the roles section and add the role "USER".
Next, with the USER role selected, Select the "+" on the Permissions section and complete the following fields:
Finally, select the "beehive-estimation" permission for the USER role, and then the Save button to complete the application's registrations in the ACS.
** Note: The Url and Role fields can be updated as required. However, the corresponding variables will need to be updated in the applications .env file before deployment.
Select OAuth2 Credentials and note down the Client ID and Client Secret.
The Estimate Beehive Component can be called by other applications registered in the ACS, and Users.
On the Trusted Applications section, select the "+ Add" button.
In the Applications field, search for the client application intending to use the Estimate Beehive Component. Once found, select the "+" button. When the application is displayed in the Trusted Applications section, select the Save button.
On the Authorized Users section, select the "Authorize" button.
In the Users field, search for the user intending to use the Estimate Beehive Component. Once found, select the "+" button.
Next, select the Roles drop-down box, and apply the "USER" role, or the role applied in the ".env" file above.
When the user is displayed in the Authorized Users section, and a tick is displayed next to the role "USER", select the Save button.
Before proceeding to the next steps, it is recommended that you verify the communication between the docker Virtual Machine (VM) and ACS by running the following command:
for bash shell use this:
curl --location --request POST 'https://acs.bse.h2020-demeter-cloud.eu:5443/v1/auth/tokens' --header 'Content-Type: application/json' --data '{
"name": "ACS_MAIL",
"password": "ACS_PASSWORD"
}'
for native cmd shell use this:
curl --location --request POST "https://acs.bse.h2020-demeter-cloud.eu:5443/v1/auth/tokens" --header "Content-Type: application/json" ^
--data "{ \"name\": \"ACS_MAIL\" , \"password\": \"ACS_PASSWORD\" } "
Put your ACS account mail on ACS_MAIL and your ACS password on ACS_PASSWORD.
The communication test is considered successful if the following response is received:
{"token":{"methods":["password"],"expires_at":"2021-11-30T12:36:50.671Z"},"idm_authorization_config":{"level":"advanced","authzforce":false}}
If this test is not successful, then you must check with the ACS administrator that port 5443 is open and can connect to the ACS host.
version: '3.8'
services:
estimate-beehive-component:
image: informationcatalyst/estimate-beehive:v2
container_name: estimate-beehive-component
ports:
- ${SERVER_PORT}:${SERVER_PORT}
environment:
- SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
- SERVER_PORT=${SERVER_PORT}
- ACS_ESTIMATE_BEEHIVE_CLIENT_ID=${ACS_ESTIMATE_BEEHIVE_CLIENT_ID}
- ACS_ESTIMATE_BEEHIVE_CLIENT_SECRET=${ACS_ESTIMATE_BEEHIVE_CLIENT_SECRET}
- ACS_ESTIMATE_BEEHIVE_ADMIN_EMAIL=${ACS_ESTIMATE_BEEHIVE_ADMIN_EMAIL}
- ACS_ESTIMATE_BEEHIVE_ADMIN_PASSWORD=${ACS_ESTIMATE_BEEHIVE_ADMIN_PASSWORD}
- ACS_ESTIMATE_BEEHIVE_ROLE=${ACS_ESTIMATE_BEEHIVE_ROLE}
SPRING_PROFILES_ACTIVE=prod
SERVER_PORT=8071
ACS_ESTIMATE_BEEHIVE_CLIENT_ID=<CLIENT ID FROM ACS>
ACS_ESTIMATE_BEEHIVE_CLIENT_SECRET=<CLIENT SECRET FROM ACS>
ACS_ESTIMATE_BEEHIVE_ADMIN_EMAIL=<ADMIN EMAIL>
ACS_ESTIMATE_BEEHIVE_ADMIN_PASSWORD=<ADMIN PASSWORD>
ACS_ESTIMATE_BEEHIVE_ROLE=USER
Set ACS_ESTIMATE_BEEHIVE_CLIENT_ID= to the acs client id noted down in the registration process.
Set ACS_ESTIMATE_BEEHIVE_CLIENT_SECRET= to the acs client secret noted down in the registration process.
Set ACS_ESTIMATE_BEEHIVE_ADMIN_EMAIL= to the email of the account used to register the application in the ACS.
Set ACS_ESTIMATE_BEEHIVE_ADMIN_PASSWORD= to the password of the account used to register the application in the ACS.
If the host port 8071 is already taken, set another one, i.e. "8080".
Set ACS_ESTIMATE_BEEHIVE_ROLE= to the role creating in the registration process.
Run the command docker-compose up -d to start the service.
Run the command docker-compose down to stop the service.
A successful deployment can be seen below, where docker ps is also used to check on the deployment status.
To validate network access to the component, paste the following URL into a browser to view the API Swagger Documentation. http://localhost:8071/documentation/swagger-ui
Content type
Image
Digest
Size
306.3 MB
Last updated
over 4 years ago
docker pull informationcatalyst/estimate-beehive