File: spack_cache_start.sh

package info (click to toggle)
cp2k 2025.2-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 372,052 kB
  • sloc: fortran: 963,262; ansic: 64,495; f90: 21,676; python: 14,419; sh: 11,382; xml: 2,173; makefile: 953; pascal: 845; perl: 492; cpp: 345; lisp: 297; csh: 16
file content (27 lines) | stat: -rwxr-xr-x 645 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash -e

# author: Ole Schuett

if podman start spack-cache; then
  echo "Re-started existing spack cache."

else
  # Start MinIO server.
  podman run --name spack-cache --detach -p 9000:9000 -p 9001:9001 \
    quay.io/minio/minio server /data --console-address ":9001"

  sleep 3
  podman container logs spack-cache

  # Configure localhost.
  podman exec spack-cache mc alias set local http://localhost:9000 minioadmin minioadmin

  # Create bucket.
  podman exec spack-cache mc mb local/spack-cache

  # Make bucket public.
  podman exec spack-cache mc anonymous set public local/spack-cache
  echo "Started new spack cache."
fi

#EOF