Skip to content
Snippets Groups Projects
Forked from ildg / hands-on / workshop-image
13 commits behind the upstream repository.
user avatar
basbs authored
    * Polished the README.md with minimal instructions.
    * Moving the build instruction from README.md to HOWTO-build.md
    * Added jq utility command to the image.
    * Cleaned up the Dockerfile{0,2}
    * Updated test-ildg.sh with new fc endpoint.
    * Removed the install-ildg.sh
0f1e7b91
History

Container for using ILDG services

Table of Contents

  1. Introduction
  2. Install container platforms
    1. Install Docker
    2. Install Podman
    3. Install Apptainer (singularity)
  3. Get a pre-built image
    1. Using Docker and Podman
    2. Using Apptainer
  4. Run the image as container
    1. Using Docker
    2. Using Podman
    3. Using Apptainer
  5. Test inside the container
  6. Troubleshooting tips

1. Introduction

In order to run the pre-built image with the binaries used for ILDG activities as a container or to build from the source, it is required to have one of the container platform installed. If you never tried any container platform on your machine before and not sure which container platform to install, the recommended option is to go with docker installation.

2. Install container platforms

If you have one of the container platforms already running on your machine. You may skip the below steps and move to the next section.

Install Docker

  • Follow the instructions provided in this link. As the overview page loads, one must choose their desired operating system from the left menu to follow the OS specific instructions to complete the installation procedure.
  • Once the docker is installed, optionally one can also configure Linux hosts to work better with Docker. Click here for the post installation steps.
  • After the successful installation, running docker --version should display the version you installed. The recommended version at the time of writing the instruction is Docker version 24.0.1
  • Optionally one can also verify the docker installation by running a simple Hello-world container, refer this link for the same.

Install Podman

  • If you are using any Red Hat based Linux derivatives, you would have the podman installed by default.
  • If you insist to install on other platforms, Follow the instructions provided in this link.

Install Apptainer (singularity)

  • Follow the instructions provided in this link to install the binaries. As the overview page loads, one must choose their desired operating system from the left menu to follow the OS specific instructions to complete the installation.
  • It is always recommended to have the latest binaries installed. When this document was written the latest version of apptainer was v1.1.8.
  • If the latest binaries are not available in the package registry, one can use this link to download it directly from Github.
  • If you prefer to install it from source,use the instructions from this link.
  • After the successful installation, To check the version of container platform (either apptainer or singularity)installed on your machine, run <platform> --version.

3. Get a pre-built image

Using Docker and Podman

docker pull gitlab.desy.de:5555/ildg/hands-on/workshop-image:latest

Using Apptainer (singularity)

apptainer pull docker://gitlab.desy.de:5555/ildg/hands-on/workshop-image:latest

4. Run the image as container

Using Docker

docker run -it -v $HOME/.globus:/root/.globus gitlab.desy.de:5555/ildg/hands-on/workshop-image:latest

Using Podman

docker run -it -v $HOME/.globus:/root/.globus:Z gitlab.desy.de:5555/ildg/hands-on/workshop-image:latest

Using Apptainer (singularity)

apptainer shell workshop-image_latest.sif

5. Test inside the container:

To test if everyhting works;

  • Try accessing one of the ILDG service using curl.

      curl -X 'GET' 'https://idefix-vm10.zeuthen.desy.de/ildg/mdc/info' -H 'accept: */*'

    You must get the 200 OK along with the json response.

  • Try running grid-proxy-init to generate a new proxy certificate. If you encounter any error, Take a look at Troubleshooting Tips.

  • If the above command runs without an error, you should be able to run voms-proxy-info and see the certificate information.

  • update-crl.sh needs to be executed at least every 2 days to update the trust-store.

6. Troubleshooting Tips

Q: How to run the pre-built image in Mac computers with Apple silicon?

A: docker run --platform linux/amd64 -it -v $HOME/.globus:/root/.globus gitlab.desy.de:5555/ildg/hands-on/workshop-image:latest

Q: How can i run the docker commands without sudo

A: sudo usermod -aG docker $USER. Log out and log back in for the changes to take affect.