Categorygithub.com/epos-eu/opensource-kubernetes
modulepackage
0.0.0-20240908110157-1faa27cf45cb
Repository: https://github.com/epos-eu/opensource-kubernetes.git
Documentation: pkg.go.dev

# README

EPOS Open Source - Kubernetes installer

Introduction

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

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

Prerequisites

Kubernetes Tools installed on your local machine and access to a Kubernetes Cluster. For further information follow the official guidelines: https://kubernetes.io/docs/home/

Installation

Download the binary file according to your OS.

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

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

Usage

./opensource-kubernetes <command>

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

EPOS Open Source CLI installer to deploy the EPOS System using Kubernetes

Usage:
  opensource-kubernetes [command]

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

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

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

Deploy a new environment

Deploy an enviroment with .env set up on Kubernetes

Usage:
  opensource-kubernetes deploy [flags]

Flags:
      --autoupdate string   Auto update the images versions (true|false)
      --context string      Kubernetes context
  -h, --help                help for deploy
      --namespace string    Kubernetes namespace
      --tag string          Version Tag
      --update string       Update of an existing deployment (true|false), default false

Delete the existing environment

Delete an enviroment on Kubernetes using Namespace

Usage:
  opensource-kubernetes delete [flags]

Flags:
      --context string     Kubernetes context
  -h, --help               help for delete
      --namespace string   Kubernetes namespace

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-kubernetes populate [flags]

Flags:
      --context string     Kubernetes context
      --env string         Environment variable file
      --folder string      Folder where ttl files are located
  -h, --help               help for populate
      --namespace string   Kubernetes namespace
      --tag string         Version Tag

Manual option

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

Export configuration file and Kubernetes-compose

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

Usage:
  opensource-kubernetes export [flags]

Flags:
      --file string     File to export, available options: [env]
  -h, --help            help for export
      --output string   Output folder

Access URLs

EPOS Data Portal:

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

EPOS Backoffice:

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

EPOS API Gateway:

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

Environment Variables

Base environment configuration

NameStandard ValueDescription
PROTOCOLhttp
API_PATH/api/v1API GATEWAY access path
INGRESS_CLASSnginxIngress class used in the Kubernetes cluster

RabbitMQ configuration

NameStandard ValueDescription
BROKER_HOSTrabbitmqRabbitMQ host
BROKER_USERNAMEchangemeRabbitMQ username
BROKER_PASSWORDchangemeRabbitMQ password
BROKER_VHOSTchangemeRabbitMQ vhost

PostgreSQL configuration

NameStandard ValueDescription
POSTGRESQL_HOSTmetadatacatalogue:5432Database service
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_SIZE1Initial number of connections to database
CONNECTION_POOL_MIN_SIZE1Minimum number of connections to database
CONNECTION_POOL_MAX_SIZE20Maximum number of connections to database

Monitoring Service configuration

NameStandard ValueDescription
MONITORINGfalseTrue if activate interaction between system and monitoring service
MONITORING_URLemptyMonitoring service url
MONITORING_USERemptyMonitoring service username
MONITORING_PWDemptyMonitoring service password

Monitoring Service 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
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 Kubernetes 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.