Skip to content

Commit

Permalink
ci: add minio s3 as tape
Browse files Browse the repository at this point in the history
  • Loading branch information
kofemann committed Sep 6, 2024
1 parent 45a6cc1 commit d74fd8a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 3 deletions.
37 changes: 35 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -425,16 +425,49 @@ Clean k8s environment:
#
# infrastructure required to run dCache
#
Deploy 3rd party infrastructure services:
Deploy PostgreSQL:
stage: test_infra
extends: .helm_image
script:
- helm repo add bitnami https://charts.bitnami.com/bitnami
- helm repo update
- helm -n ${K8S_NAMESPACE} install ${HELM_OPTS} --wait --set auth.username=dcache --set auth.password=let-me-in --set auth.database=chimera chimera bitnami/postgresql --version=12.12.10

#
# infrastructure required to run dCache
#
Deploy Zookeeper:
stage: test_infra
extends: .helm_image
script:
- helm repo add bitnami https://charts.bitnami.com/bitnami
- helm repo update
- helm -n ${K8S_NAMESPACE} install ${HELM_OPTS} --wait cells bitnami/zookeeper

#
# infrastructure required to run dCache
#
Deploy Kafka:
stage: test_infra
extends: .helm_image
needs:
- Deploy Zookeeper
script:
- helm repo add bitnami https://charts.bitnami.com/bitnami
- helm repo update
- helm -n ${K8S_NAMESPACE} install ${HELM_OPTS} --wait --set externalZookeeper.servers=cells-zookeeper --set kraft.enabled=false billing bitnami/kafka --version 23.0.7

#
# infrastructure required to run dCache
#
Deploy MinIO as Tape:
stage: test_infra
extends: .helm_image
script:
- helm repo add bitnami https://charts.bitnami.com/bitnami
- helm repo update
- helm -n ${K8S_NAMESPACE} install ${HELM_OPTS} --set-string auth.rootUser=dcache --set-string auth.rootPassword=let-me-in --set-string defaultBuckets="hsm" --wait tape bitnami/minio

#
# Start Current dCache version and an old pools
#
Expand All @@ -449,7 +482,7 @@ Deploy dCache Helm Chart:
fi
- helm repo add dcache ${DCACHE_HELM_REPO}
- helm repo update
- helm -n ${K8S_NAMESPACE} install ${HELM_OPTS} --wait --set image.tag=${tag} --set image.repository=${CI_REGISTRY_IMAGE} store dcache/dcache
- helm -n ${K8S_NAMESPACE} install ${HELM_OPTS} --wait --set image.tag=${tag} --set dcache.hsm.enabled=true --set image.repository=${CI_REGISTRY_IMAGE} store dcache/dcache
- helm -n ${K8S_NAMESPACE} install ${HELM_OPTS} --wait --set image.tag=9.2.20 --set "dcache.pools={d,f}" --set dcache.door.enabled=false --set image.repository=${CI_REGISTRY_IMAGE} old-store dcache/dcache


Expand Down
7 changes: 6 additions & 1 deletion packages/tar/src/main/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN echo "dcache:x:994:1000::/home/dcache:/bin/bash" >> /etc/passwd
RUN echo "dcache:!!:18438::::::" >> /etc/shadow

# Add JRE
RUN microdnf -y install java-17-openjdk-headless hostname which procps-ng
RUN microdnf -y install java-17-openjdk-headless hostname which procps-ng tar gzip

# Add dCache
COPY maven /opt/dcache
Expand All @@ -42,6 +42,7 @@ COPY dcache.conf ${DCACHE_INSTALL_DIR}/etc/dcache.conf
COPY docker-layout.conf ${DCACHE_INSTALL_DIR}/etc/layouts/docker-layout.conf
COPY exports ${DCACHE_INSTALL_DIR}/etc/exports
COPY run.sh /run.sh
COPY s3-tape.yml /${DCACHE_INSTALL_DIR}/etc/s3-tape.yml

# where we store the data
# location of init scripts
Expand All @@ -51,6 +52,10 @@ RUN mkdir -p /pool /dcache.init.d /etc/grid-security/certificates
# adjust permissions
RUN chown -R dcache:dcache ${DCACHE_INSTALL_DIR}/var /pool

# add s3hsm for fake tape interraction
RUN curl -s -L -o /tmp/s3hsm.tar.gz https://github.com/kofemann/s3hsm/releases/download/v0.1.0/s3hsm_0.1.0_linux_amd64.tar.gz
RUN cd /usr/bin && tar xzf /tmp/s3hsm.tar.gz s3hsm

# the data log files must survive container restarts
VOLUME ${DCACHE_INSTALL_DIR}/var
VOLUME /pool
Expand Down
13 changes: 13 additions & 0 deletions packages/tar/src/main/container/s3-tape.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
s3:
endpoint: tape-minio:9000
region: us-east-1
access_key: dcache
secret_key: let-me-in
ssl: false
enc: false
trace: false
s3version: 4

hsm:
instance: s3
type: osm

0 comments on commit d74fd8a

Please sign in to comment.