Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mswertz opened this issue Feb 22, 2024 · 6 comments
Open

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

mswertz opened this issue Feb 22, 2024 · 6 comments
Assignees
Labels
Milestone

Comments

@mswertz
Copy link
Member

mswertz commented Feb 22, 2024

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

@mswertz mswertz added this to the Sprint 217 milestone Feb 22, 2024
@clemens-tolboom
Copy link
Collaborator

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 clemens-tolboom modified the milestones: Sprint 217, Sprint 218 Mar 5, 2024
@clemens-tolboom clemens-tolboom self-assigned this Mar 5, 2024
@clemens-tolboom
Copy link
Collaborator

clemens-tolboom commented Mar 11, 2024

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
Copy link
Collaborator

clemens-tolboom commented Mar 11, 2024

Findings ✅

Linux ✅

  • ${PWD} does not work on Linux ... use ./ instead (project/profiles/etc not found) fixed by fix(demo): relative path #690
  • Via UI config is not config is not editable (user running containers is not current (using sudo) nor root) solved by the above
  • ?

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
Copy link
Collaborator

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
  3. You can add configuration by downloading application.template.yml and move it to `confg/application.yml
  4. Download the Dockerfile
  5. 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
Copy link
Collaborator

clemens-tolboom commented Mar 12, 2024

  • Check with EMX2 for adding files to Docker image
  • make 2 /docs/ documents for each variant
  • cleanup README.md
    • keep opening line
    • make list of feature of the bold text
  • Add QuickStart section
    • Link to "Using Armadillo compose" with text like "Install docker, unzip the zip, type shell commands"
    • Link to "Using Dockerfile" with text like "Install docker, run shell commands to fetch requirements, run"

@clemens-tolboom
Copy link
Collaborator

clemens-tolboom commented Mar 26, 2024

Using the jar file

  • Install Java from https://jdk.java.net shows version 22
    • brew install openjdk gives version 21
    • winget ?
  • Install Docker Destop

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants