molgenis / molgenis-service-armadillo

Armadillo; a DataSHIELD implementation, part of the MOLGENIS suite
https://molgenis.github.io/molgenis-service-armadillo/
GNU Lesser General Public License v3.0
7 stars 10 forks source link

As user I want all I need to start Armadillo on README.md #654

Open mswertz opened 6 months ago

mswertz commented 6 months ago

Shortest description how to start is on in README. (as it used to be). Link to docs for the details

clemens-tolboom commented 6 months ago

Something like a quick start?

I need some context for that:

I would opt for armadillo-compose as that only requires shell + docker

What do you think?

clemens-tolboom commented 5 months ago

Running Armadillo locally using armadillo-compose.zip

You can choose either the latests build version (pre release) or the official (stable) release.

These steps require Docker Desktop installed as the profiles require it and this version of Armadillo needs it.

  1. From the chosen version page at the Assets section download armadillo-compose.zip
  2. Unzip the file ... directory armadillo-compose is extracted
  3. Open a terminal in the armadillo-compose directory
  4. Run docker compose build (or docker-compose using depending on OS)
  5. Run docker compose up (to stop later on press CTRL-C)
  6. Navigate to http://localhost:8080
  7. Login using basic auth with user admin and password admin

For more info about editing the configuration and cleanup read the supplied README.md file

clemens-tolboom commented 5 months ago

Findings ✅

Linux ✅

Release test script ✅

We were testing against v4.1.3 which did not support linked view yet. used wrong version

── Creating linked view on table ──

Created project 'qlzvezj3v9' without users
✖ 
Error in stop(cond) : bad error message
Calls: exit_test
Execution halted
clemens-tolboom commented 5 months ago

Run Armadillo using the Dockerfile


Run the Dockerfile

Steps

To run the Dockerfile you first need to

  1. Make directory demo-armadillo and cd into demo-armadillo
  2. Make sub directories data config logs
    1. You can add configuration by downloading application.template.yml and move it to `confg/application.yml
  3. Download the Dockerfile
  4. Download the molgenis-armadillo-*.jar file from the assets of latest or one of the other releases

Shell prepare

mkdir demo-armadillo
cd demo-armadillo
mkdir data config logs

wget https://raw.githubusercontent.com/molgenis/molgenis-service-armadillo/master/Dockerfile

# change name and version to your likings
wget https://github.com/molgenis/molgenis-service-armadillo/releases/download/v4.3.1/molgenis-armadillo-4.3.1.jar

# Not needed unless
wget https://raw.githubusercontent.com/molgenis/molgenis-service-armadillo/master/application.template.yml --output-document=config/application.yml

Build a local image

# Change name or version
docker build --tag demo_armadillo:local --build-arg JAR_FILE="./*.jar" .

Run the container

docker run \
  --detach \
  --publish 8080:8080 \
  --volume ./data:/data \
  --volume ./config:/config \
  --volume ./logs:/logs \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  --name demo_armadillo \
  demo_armadillo:local

Container life cycle

docker container stop demo_armadillo
docker run ...

Cleanup

docker container rm demo_armadillo
docker image ls
docker image rm <hash of demo_armadillo>
clemens-tolboom commented 5 months ago
clemens-tolboom commented 5 months ago

Using the jar file

To test as a new user remove all related docker containers and images and stop docker daemon

mkdir test
cd test
wget https://github.com/molgenis/molgenis-service-armadillo/releases/download/v4.5.0/molgenis-armadillo-4.5.0.jar

java -jar molgenis-armadillo-4.5.0.jar
# fails on missing docker daemon: 
# - Error creating bean with name 'profilesDockerController'
# - install Docker Desktop and run it
java -jar molgenis-armadillo-4.5.0.jar
# fails on missing data dir

mkdir data
java -jar molgenis-armadillo-4.5.0.jar
# Check projects (empty)
# Check users (empty)
# Check profiles (default datashield/rock-base:latest)
# Check insight file audit exists
# Check insight file Log is empty
CTRL-C

ls -l
# data/
# logs/
# molgenis-armadillo-4.5.0.jar
# - logs/ dir is created automagically