Skip to end of banner
Go to start of banner

Local deployment and development

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Table of Contents

Overview

Provides explicit information about the local deployment of the Eureka platform and useful development notes.

System pre-requisites

Windows

The local deployment will work with installed Docker Desktop or with Windows WSL: https://learn.microsoft.com/en-us/windows/wsl/install.

Working with the virtual machine is possible, make sure that Docker and Docker-Compose CLI are compatible.

WSL preparation

1. Install WSL and OS (of your choice)

Follow the guide to install WSL: How to install Linux on Windows with WSL
Make sure that the installed distribution is run with WSL v2.0. It can be checked with the following command:

$ wsl -l -v
  NAME            STATE           VERSION
* Ubuntu-22.04    Running         2

2. Enable systemd

Enable systemd: Use systemd to manage Linux services with WSL
NOTE: Before performing this operation you can check if systemd is already enabled:

# in WSL:
sudo cat /etc/wsl.conf

if it contains the following lines then this step can skipped.

[boot]
systemd=true

Ensure systemd is running

systemctl --no-pager status user.slice > /dev/null 2>&1 && echo 'OK: Systemd is running' || echo 'FAIL: Systemd not running'

3. Install docker for your distribution

  1. Ensure WSL is up-to-date

    wsl --update
  2. Install prerequisites for Docker

    sudo apt update && sudo apt upgrade
    sudo apt install --no-install-recommends apt-transport-https ca-certificates curl gnupg2

    Still in the terminal, change the network config so that Docker can interact with the firewall using the command below:

    sudo update-alternatives --config iptables

    When asked, choose iptables-legacy.

  3. Install Docker
    Make sure Ubuntu trusts the Docker packages

    . /etc/os-release
    curl -fsSL https://download.docker.com/linux/${ID}/gpg | sudo tee /etc/apt/trusted.gpg.d/docker.asc
    echo "deb [arch=amd64] https://download.docker.com/linux/${ID} ${VERSION_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/docker.list
    sudo apt update

    Then install Docker, Docker-Compose CLI, and containerd:

    sudo apt install docker-ce docker-ce-cli containerd.io

    Verify the Docker service status

    sudo systemctl status docker
  4. Configure a user to work with Docker (Optional, it will allow to run docker command without root access)
    Add our user to the Docker group:

    sudo usermod -aG docker $USER

    To confirm the change worked, close the terminal tab and open a new Ubuntu tab, then run:

    groups

    It should now list the docker group if it doesn't, repeat the previous command.

    Now, we'll need to assign a group ID to Docker. First, let's check if an example ID is unused:

    getent group | grep 36257 || echo "This ID is not in use."

    If not, retry with another ID. After finding an unused ID, use it in the following step:

    sudo sed -i -e 's/^\(docker:x\):[^:]\+/\1:36257/' /etc/group

    We'll need to restart Ubuntu now. To do this, close the terminal, then open the command line as administrator and run:

    wsl --shutdown

    Wait 7-10 seconds to open the Linux terminal and run the following commands:

    sudo systemctl status docker
    docker ps -a

Linux

Will be added

MacOS

Will be added

Container management

A suggested solution is to use the Portainer (under Zip License).

It can be set by following the guide: https://docs.portainer.io/start/install

Create a volume to persist Portainer information

docker volume create portainer_data

Then run a container, it will start automatically with Docker

docker run -d -p 18000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

It became available in the browser via

http://localhost:9000
# or
https://localhost:9443

Docker compose profiles

core-components

Provides base infrastructure to run the Eureka platform, such as database, secret management, etc.

mgr-components

Provides a deployment for Eureka platform management:

  • mgr-tenants is responsible for managing tenants in the system

  • mgr-applications is responsible for applications and module discovery

  • mgr-tenant-entitlements is responsible for managing applications per tenant (entitlement, upgrade and revoke processes per tenant)

app-platform-minimal

This deployment contains a set of required modules to operate with Folio platform

  • No labels