Skip to content

Commit

Permalink
03: explain images
Browse files Browse the repository at this point in the history
  • Loading branch information
katilp committed Oct 21, 2024
1 parent 3f1f1af commit d6ffb1a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions episodes/03-disk-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The output shows your account and project.
### Bucket for logs

To build an image disk, we will use a script that produces some logs.
We create a bucket for these logs with
Create a bucket for these logs with

```
gcloud storage buckets create gs://<BUCKET_FOR_LOGS>/ --location europe-west4
Expand Down Expand Up @@ -126,14 +126,24 @@ cd tools/gke-disk-image-builder/

## Create the image

To create the image with the script, you must have `go` installed.
To run the script to build the image, you must have `go` installed.

Run the script with

```bash
go run ./cli --project-name=<PROJECT_ID> --image-name=pfnano-disk-image --zone=europe-west4-a --gcs-path=gs://<BUCKET_FOR_LOGS> --disk-size-gb=50 --container-image=docker.io/cernopendata/cernopendata-client:latest --container-image=docker.io/rootproject/root:latest --container-image=ghcr.io/cms-dpoa/pfnano-image-build:main --timeout 100m
```

The script will create a secondary disk images with the container images that are needed in the processing workflow:

- `cernopendata/cernopendata-client` for getting the metadata
- `ghcr.io/cms-dpoa/pfnano-image-build:main` for the processing
- `rootproject/root` for an eventual test plot.

The container image `pfnano-image-build` is the standard [CMS Open data container image](https://opendata.cern.ch/docs/cms-guide-docker#images) with the [PFNano processing code](https://opendata.cern.ch/record/12504) compiled.

Note the `timeout` options, the default tiemout of 20 mins is not enough.

:::::::::::::::::::::::::::::::::::::::::: callout

Note that while images can in most cases be "pulled" from Dockerhub specifying only the image name (e.g. `cernopendata/cernopendata-client` and `rootproject/root`), in this script you must give the full registry address starting with `docker.io` **and** specify a tag (i.e. `:latest`).
Expand Down

0 comments on commit d6ffb1a

Please sign in to comment.