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

Move to github builds and configurable ConfigServer #2

Merged
merged 5 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Docker Image CI

on:
release:
types: [released]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v5
with:
# push: true
context: .
platforms: linux/amd64,linux/arm64
tags: alexanderrichards/dirac_ui:${{ github.event.release.tag_name }},alexanderrichards/dirac_ui:latest
build-args: |
dirac_version=${{ github.event.release.tag_name }}
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# syntax = docker/dockerfile:1.0-experimental
# syntax = docker/dockerfile:1

FROM centos:7
ARG dirac_version=7.3.26
ARG dirac_version

RUN mkdir /root/dirac_ui
WORKDIR /root/dirac_ui
Expand All @@ -9,11 +10,8 @@ RUN curl -LO https://github.com/DIRACGrid/DIRACOS2/releases/latest/download/DIRA
RUN bash DIRACOS-Linux-$(uname -m).sh
RUN rm DIRACOS-Linux-$(uname -m).sh
RUN source diracos/diracosrc && pip install DIRAC==$dirac_version
RUN --mount=type=secret,id=proxy,dst=/tmp/x509up_u0 source diracos/diracosrc && dirac-configure -F -S GridPP -C dips://dirac01.grid.hep.ph.ic.ac.uk:9135/Configuration/Server -I

WORKDIR /root
COPY startup.sh /root/startup.sh

CMD ["/bin/bash", "--init-file", "/root/startup.sh"]


3 changes: 0 additions & 3 deletions build.sh

This file was deleted.

18 changes: 0 additions & 18 deletions build_env/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions build_env/build.sh

This file was deleted.

7 changes: 0 additions & 7 deletions build_env/startup.sh

This file was deleted.

12 changes: 11 additions & 1 deletion startup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/bash
read -p 'Creating grid proxy for which DIRAC group (i.e. <vo>_user): ' vo

read -p 'Enter setup name [GridPP]: ' setupname
read -p 'Enter configuration server URL [dips://dirac01.grid.hep.ph.ic.ac.uk:9135/Configuration/Server]: ' configurl
setupname=${setupname:-'GridPP'}
configurl=${configurl:-'dips://dirac01.grid.hep.ph.ic.ac.uk:9135/Configuration/Server'}
. /root/dirac_ui/diracos/diracosrc
dirac-proxy-init -x -N
dirac-configure -F -S ${setupname} -C ${configurl} -I
echo "Configured OK."

read -p 'Creating grid proxy for which DIRAC group (i.e. <vo>_user) [dirac_user]: ' vo
vo=${vo:-'dirac_user'}
dirac-proxy-init -g $vo -M -U --Cert /root/.globus/usercert.pem --Key /root/.globus/userkey.pem
echo "proxy created OK."