/gridcapa-deployment

Deployment repository for gridcapa

Primary LanguagePythonMozilla Public License 2.0MPL-2.0

GridCapa deployment module

MPL-2.0 License

This repository contains all the deployment files for GridCapa applications:

  • Docker Compose scripts for test and development usage
  • Kubernetes scripts for production usage

Deploying using Docker Compose

GridCapa framework instantiates different GridCapa applications by business process. Docker Compose script is designed to run all GridCapa applications together.

GridCapa currently contains the following applications.

  • GridCapa CSE D2CC
  • GridCapa CORE Validation

Prerequisites

Docker Compose scripts needs Docker (version >= 18) and docker-compose.

Default GridCapa environment

cd docker-compose
docker-compose up -d

Multiple environment are available:

Specific GridCapa front-end app development environment

cd docker-compose-for-front-end-development
docker-compose up -d
  • Now you have the gridcapa back-end running with docker-compose
  • Then run locally gridcapa-app following the application README.
  • You should be able now to debug locally your front-end application

MinIO bucket notifications

GridCapa platform needs bucket notifications activated on MinIO server to run correctly.

First, start by downloading MinIO client application. Then add the MinIO server to the list of servers available:

./mc alias set gridcapa_compose http://localhost:9000 gridcapa gridcapa

Check correct connectivity:

./mc ls gridcapa_compose

Register all PULL and DELETE events to be notified by MinIO in the RabbitMQ broker. MinIO bucket ARN (herearn:minio:sqs::_:amqp) can be obtained in MinIO logs at startup.

./mc event add gridcapa_compose/gridcapa arn:minio:sqs::_:amqp --event put,delete

Check that they have been correctly saved by listing current notifications enabled.

./mc event list gridcapa_compose/gridcapa

Deploying using Kubernetes

Kubernetes deployment is still under development. This documentation is still to be provided.

Prerequisites

Some secrets are needed on the cluster as deployment prerequisites. Encrypted password can be obtained by default bcrypt algorithm.

kubectl create secret generic gridcapa-rabbitmq-credentials --from-literal='rabbitmq-user=<RABBITMQ_USER>' --from-literal='rabbitmq-password=<RABBITMQ_PASSWORD>'
kubectl create secret generic admin-rabbitmq-credentials --from-literal='rabbitmq-user=<RABBITMQ_USER>' --from-literal='rabbitmq-password=<RABBITMQ_PASSWORD>'
kubectl create secret generic rabbitmq-secrets --from-literal='rabbitmq-erlang-cookie=<RABBITMQ_ERLANG_COOKIE>'
kubectl create secret generic gridcapa-minio-credentials --from-literal='minio-access-key=<MINIO_ACCESS_KEY>' --from-literal='minio-secret-key=<MINIO_SECRET_KEY>'
kubectl create secret generic gridcapa-ftp-credentials --from-literal='ftp-user=<FTP_USER>' --from-literal='ftp-password=<FTP_PASSWORD>'
kubectl create secret generic gridcapa-postgresql-credentials --from-literal='postgres-password=<POSTGRES_PASSWORD>' --from-literal='config-user=<CONFIG_USER>' --from-literal='config-password=<CONFIG_PASSWORD>' --from-literal='cse-idcc-user=<CSE_IDCC_USER>' --from-literal='cse-idcc-password=<CSE_IDCC_PASSWORD>' --from-literal='cse-d2cc-user=<CSE_D2CC_USER>' --from-literal='cse-d2cc-password=<CSE_D2CC_PASSWORD>' --from-literal='core-valid-user=<CORE_VALID_USER>' --from-literal='core-valid-password=<CORE_VALID_PASSWORD>'

MinIO bucket notifications

GridCapa platform needs bucket notifications activated on MinIO server to run correctly.

First, start by downloading MinIO client application. Then add the MinIO server to the list of servers available:

./mc alias set gridcapa_k8s <minio-url> <minio-user> <minio-password>

Check correct connectivity:

./mc ls gridcapa_k8s

Register all PULL and DELETE events to be notified by MinIO in the RabbitMQ broker. MinIO bucket ARN (herearn:minio:sqs::_:amqp) can be obtained in MinIO logs at startup.

./mc event add gridcapa_k8s/gridcapa arn:minio:sqs::_:amqp --event put,delete

Check that they have been correctly saved by listing current notifications enabled.

./mc event list gridcapa_k8s/gridcapa