GithubHelp home page GithubHelp logo

nfdi4health / ldh-deployment Goto Github PK

View Code? Open in Web Editor NEW
1.0 5.0 2.0 617 KB

Deployment instructions and resources for an NFDI4Health Local Access Point

Home Page: https://nfdi4health.github.io/ldh-deployment/

License: MIT License

Smarty 5.43% Shell 94.57%

ldh-deployment's Introduction

NFDI4Health LDH Deployment

Deployment instructions and resources for an NFDI4Health Local Data Hub.

Disclaimer

This project and it's components are subject to heavy development. However, if you wish to participate in the development of the software, you are strongly encouraged to do so. Feel free to submit bug reports and suggestions in the issue tracker.

Prerequisites

Docker

  • Docker must be installed on the system (Windows/Linux/MacOS). Please follow the official installation instructions
  • docker-compose is used instead of docker compose for compatibility with older installations
  • You need a compose version v2 - test with docker-compose version
  • LDH works perfectly even with root-less docker; there is no need to have root right on the host
  • Consider allowing your non-root Linux user to use docker by adding to the docker group (see docker docs) otherwise only a root user will be able to execute docker

Download and Install

For a first and simple glimpse of what an LDH will look like follow the steps below.

  • Clone this repository
git clone https://github.com/nfdi4health/ldh-deployment.git
cd ldh-deployment

Configuration

  • Basic configuration is done in .env. You have to change nothing now.

    • COMPOSE_PROJECT_NAME is a prefix for all container names; useful if you have multiple instances of LDH on your host
    • SEEK_PORT is the port you will reach LDH on this host, standard would be localhost:3000
    • DB_PORT is the port of underlying mysql database; this is optional
  • Database configuration is specified in docker-compose.env. This is created by copying docker-compose.env.tpl to docker-compose.env and replace <some-password> with a password- either manually or using the openssl command, e.g.

cat docker-compose.env.tpl \
  | sed "s|<db-password>|$(openssl rand -base64 21)|" \
  | sed "s|<root-password>|$(openssl rand -base64 21)|" \
  > docker-compose.env
  • Create Volumes (internal Volumes are created automatically) using prefix in COMPOSE_PROJECT_NAME in .env
source .env
docker volume create ${COMPOSE_PROJECT_NAME}_filestore
docker volume create ${COMPOSE_PROJECT_NAME}_db

Startup the LDH

docker-compose up -d

Wait a minute and direct browser to http://localhost:3000 to reach signup page. If you get a "502 Bad Gateway" wait a litte longer. You can watch the logs with

docker-compose logs -f seek

Backup & Restore

There is a simple backup script backup.sh include which will dump your database and filestore to a backup directory. You can configure the number of copies to be held in backup.

bash backup.sh

You may destroy all data, including passwords. The only thing you need is to keep a valid copy of filestore and mysqldump:

bash restore.sh <your database.sql.gz from backup> <your filestore.tar.gz from backup>

Update image

Follow "Upgrading between versions" in https://docs.seek4science.org/tech/docker/docker-compose.html But use LDH image name "ghcr.io/nfdi4health/ldh:latest" (or release like ghcr.io/nfdi4health/ldh:v0.2.1, see https://github.com/nfdi4health/ldh/releases) instead of "fairdom/seek:1.14".

Destroy all

  • If you like to completely destroy your testing installation including data and password
source .env
docker-compose down -v
docker volume rm ${COMPOSE_PROJECT_NAME}_filestore ${COMPOSE_PROJECT_NAME}_db
rm docker-compose.env

Go further

The above working setting can be altered in many ways:

  • like to use an undockered, external mysql database? (configure docker-compose.env; remove db from docker-compose.yml)
  • like to put the filestore on external undockered file space? (use bind mounts)
  • like to use Container-Orchestration like Kubernetes?
  • want to expose your LDH to the internet - ask you local sysadmin!
  • Backup/Restore can be based on volumes too
  • see https://docs.docker.com/ from more

ldh-deployment's People

Contributors

knoppiks avatar fmeineke avatar

Stargazers

Marko Jovanovic avatar

Watchers

Matthias Löbe avatar ReneHaensel avatar  avatar Marko Jovanovic avatar  avatar

ldh-deployment's Issues

docker-compose with hyphen

better replace in readme
docker compose up -d
by
docker-compose up-d
which is more compatible; in my setting this was an unneccessary stumbling block

LHA id missing

The ever-persisting LHA id scheme seems to be not included in the current stack.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.