Categorygithub.com/epos-eu/opensource-docker
modulepackage
0.0.0-20240908110141-4b422787b014
Repository: https://github.com/epos-eu/opensource-docker.git
Documentation: pkg.go.dev

# README

EPOS Open Source - Docker installer

Introduction

EPOS Open Source - Docker installer is part of the EPOS Open Source project for local installation using Docker. It contains a set of docker images to deploy the EPOS ecosystem.

Use opensource-docker binary to spin up local environment on Linux, Mac OS X or Windows.

Prerequisites

Docker Engine and Docker Compose installed on your host machine. For further information follow the official guidelines: https://docs.docker.com/get-docker/

Installation

Download the binary file according to your OS.

Give permissions on opensource-docker file and move on binary folder from a Terminal (in Linux/MacOS):

chmod +x opensource-docker
sudo mv opensource-docker /usr/local/bin/opensource-docker

Usage

./opensource-docker <command>

The <command> field value is one of the following listed below:

EPOS Open Source CLI installer to deploy the EPOS System using docker-compose

Usage:
  opensource-docker [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  delete      Delete an environment on docker
  deploy      Deploy an environment on docker
  export      Export configuration files in output folder, options: [env, compose]
  help        Help about any command
  populate    Populate the existing environment with metadata information

Flags:
  -h, --help      help for opensource-docker
  -v, --version   version for opensource-docker

Use "opensource-docker [command] --help" for more information about a command.

Deploy a new environment

Deploy an enviroment with .env set up on docker

Usage:
  opensource-docker deploy [flags]

Flags:
      --autoupdate string      Auto update the images versions (true|false)
      --dockercompose string   Docker compose file, use default if not provided
      --env string             Environment variable file, use default if not provided
      --envname string         Set name of the environment
      --envtag string          Set tag of the environment
      --externalip string      IP address used to expose the services, use automatically generated if not provided
  -h, --help                   help for deploy
      --update string          Update of an existing deployment (true|false), default false

Delete the existing environment

Delete an enviroment with .env set up on docker

Usage:
  opensource-docker delete [flags]

Flags:
      --dockercompose string   Docker compose file, use default if not provided
      --env string             Environment variable file, use default if not provided
      --envname string         Set name of the environment
      --envtag string          Set tag of the environment
  -h, --help                   help for delete

Populate the existing environment with metadata

Automatic option:

Download or create TTL files according to EPOS-DCAT-AP and use the following command:

Populate the existing environment with metadata information in a specific folder

Usage:
  opensource-docker populate [flags]

Flags:
      --env string       Environment variable file
      --envname string   Set name of the environment
      --envtag string    Set tag of the environment
      --folder string    Fullpath folder where ttl files are located
  -h, --help             help for populate

Manual option

Use the API Gateway endpoint to manually ingest metadata TTL files into the catalogue.

Export configuration file and docker-compose

Export configuration files for customization in output folder, options: [env, compose]

Usage:
  opensource-docker export [flags]

Flags:
      --file string     File to export, available options: [env, compose]
  -h, --help            help for export
      --output string   Full path utput folder

Access URLs

EPOS Data Portal:

http://<your-ip>:<GUI_PORT><DEPLOY_PATH>

EPOS API Gateway:

http://<your-ip>:<API_PORT><DEPLOY_PATH><API_PATH>

Environment Variables

Base environment configuration

NameStandard ValueDescription
API_HOST_ENV${API_HOST_ENV}API Host Environment IP provided by user, if not set is generated automatically using machine IP
API_HOST${API_HOST_ENV}API Host IP, if not set is generated automatically using machine IP
EXECUTE_HOST${API_HOST_ENV}Internal variable to setup redirections for the external access service, if not set is generated automatically using machine IP
DEPLOY_PATH/Context path of the environment
BASE_CONTEXTempty valueContext path name of the environment (similar to DEPLOY_PATH but without the initial /)
API_PATH/api/v1API GATEWAY access path
DATA_PORTAL_PORT32000Port used by EPOS Data Portal or other GUIs
API_PORT33000Port used by EPOS API Gateway

RabbitMQ configuration

NameStandard ValueDescription
BROKER_HOSTrabbitmqName of the RabbitMQ container
BROKER_USERNAMEchangemeRabbitMQ username
BROKER_PASSWORDchangemeRabbitMQ password
BROKER_VHOSTchangemeRabbitMQ vhost

RabbitMQ configuration

NameStandard ValueDescription
POSTGRESQL_HOSTmetadata-catalogue:5432Name and port of the metadata catalogue container
POSTGRES_USERpostgresDatabase user
POSTGRESQL_PASSWORDchangemeDatabase password
POSTGRES_DBcerifDatabase name
PERSISTENCE_NAMEEPOSDataModelPersistence Name of scientific metadata
PERSISTENCE_NAME_PROCESSINGEPOSProcessingPersistence Name of processing metadata

Data Metadata Service configuration

NameStandard ValueDescription
NUM_OF_PUBLISHERS10Number of publishers on rabbitmq
NUM_OF_CONSUMERS10Number of consumers on rabbitmq
CONNECTION_POOL_INIT_SIZE5Initial number of connections to database
CONNECTION_POOL_MIN_SIZE5Minimum number of connections to database
CONNECTION_POOL_MAX_SIZE15Maximum number of connections to database

Monitoring Service configuration

NameStandard ValueDescription
MONITORINGfalseTrue if activate interaction between system and monitoring service
MONITORING_URLchangemeMonitoring service url
MONITORING_USERchangemeMonitoring service username
MONITORING_PWDchangemeMonitoring service password

Docker Registry configuration

NameStandard ValueDescription
DOCKER_REGISTRYeposDocker registry url
REGISTRY_USERNAMEchangemeDocker registry username
REGISTRY_PASSWORDchangemeDocker registry password

Other Environment variables

NameStandard ValueDescription
LOAD_RESOURCES_APItrue
LOAD_INGESTOR_APItrue
LOAD_EXTERNAL_ACCESS_APItrue
LOAD_BACKOFFICE_APItrue
LOAD_PROCESSING_APIfalse
IS_MONITORING_AUTHfalse
IS_AAI_ENABLEDfalse
SECURITY_KEYempty
AAI_SERVICE_ENDPOINTempty
FACETS_DEFAULTtrue
FACETS_TYPE_DEFAULTcategories
REDIS_SERVERredis-server
INGESTOR_HASHFA9BEB99E4029AD5A6615399E7BBAE21356086B3"changeme" Security key

Docker Images for Open Source

Variable nameImage nameDefault Tag
MESSAGE_BUS_IMAGErabbitmq3.11.7-management
DATAPORTAL_IMAGEdata-portal1.0.1
GATEWAY_IMAGEepos-api-gateway2.0.2
RESOURCES_SERVICE_IMAGEresources-service2.0.6
INGESTOR_IMAGEingestor-service2.0.1
EXTERNAL_ACCESS_IMAGEexternal-access-service2.0.1
BACKOFFICE_SERVICE_IMAGEbackoffice-service2.3.9
CONVERTER_IMAGEconverter-service2.0.0
METADATA_DB_IMAGEmetadata-database-deploy2.4.20

Maintenance

We regularly update images used in this stack.

Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

How to make a clean pull request

Look for a project's contribution instructions. If there are any, follow them.

  • Create a personal fork of the project on Github/GitLab.
  • Clone the fork on your local machine. Your remote repo on Github/GitLab is called origin.
  • Add the original repository as a remote called upstream.
  • If you created your fork a while ago be sure to pull upstream changes into your local repository.
  • Create a new branch to work on! Branch from develop if it exists, else from master or main.
  • Implement/fix your feature, comment your code.
  • Follow the code style of the project, including indentation.
  • If the project has tests run them!
  • Write or adapt tests as needed.
  • Add or change the documentation as needed.
  • Squash your commits into a single commit with git's interactive rebase. Create a new branch if necessary.
  • Push your branch to your fork on Github/GitLab, the remote origin.
  • From your fork open a pull request in the correct branch. Target the project's develop branch if there is one, else go for master or main!
  • If the maintainer requests further changes just push them to your branch. The PR will be updated automatically.
  • Once the pull request is approved and merged you can pull the changes from upstream to your local repo and delete your extra branch(es).

And last but not least: Always write your commit messages in the present tense. Your commit message should describe what the commit, when applied, does to the code – not what you did to the code.

# Packages

EPOS Open Source - Local installation with Docker Copyright (C) 2023 EPOS ERIC This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.