Skip to content

Commit

Permalink
Replace GitLab CI with GitHub Actions (#11)
Browse files Browse the repository at this point in the history
Replace GitLab CI with GitHub Actions
  • Loading branch information
iamjoemccormick authored Oct 6, 2023
1 parent 1fabbef commit 9621d2f
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 95 deletions.
68 changes: 0 additions & 68 deletions .ci/build.sh

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/build-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "Build and Publish"

on:
workflow_dispatch:
push:
tags:
- "*"

env:
REGISTRY: ghcr.io
IMAGE_NAMES: "beegfs-all\nbeegfs-mgmtd\nbeegfs-meta\nbeegfs-storage"

jobs:
publish-images:
runs-on: ubuntu-22.04
timeout-minutes: 10
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install Cosign
uses: sigstore/cosign-installer@v3.1.1
with:
cosign-release: "v2.1.1"

- name: Build, tag, sign, and push the container images to GitHub Container Registry
run: |
beegfs_version=$(git describe --tags --match '*.*' --abbrev=10)
names=$(echo "${{ env.IMAGE_NAMES }}" | tr '\n' ' ')
for name in $names; do
image=ghcr.io/thinkparq/${name}:${beegfs_version}
docker build -t $image --build-arg BEEGFS_VERSION=${beegfs_version} --target ${name} .
docker push $image
DIGEST=$(docker image inspect $image --format '{{index .RepoDigests 0}}')
cosign sign --yes --key env://COSIGN_PRIVATE_KEY \
-a "repo=${{ github.repository }}" \
-a "run=${{ github.run_id }}" \
-a "ref=${{ github.sha }}" \
$DIGEST
docker tag $image ghcr.io/thinkparq/${name}:latest
docker push ghcr.io/thinkparq/${name}:latest
done
env:
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
18 changes: 0 additions & 18 deletions .gitlab-ci.yml

This file was deleted.

31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@

## Overview

This repository contains files needed to build and run BeeGFS Docker images. The repository is laid out to support both server and client images, though only server images exist
today. For BeeGFS server services a single Dockerfile and supporting files exists under `servers/` and the Docker build arg `BEEGFS_SERVICE` is used to control what type of server service Docker
image is built.
This repository contains files needed to build and run BeeGFS Docker images. The
repository is laid out to support both server and client images, though only
server images exist today. For BeeGFS server services a single Dockerfile and
supporting files exists under `servers/` and the Docker build arg
`BEEGFS_SERVICE` is used to control what type of server service Docker image is
built.

Generally users will not need to build images themselves, and can just use the
pre-built images for each BeeGFS release hosted on [GitHub Container
Registry](https://github.com/orgs/ThinkParQ/packages?repo_name=beegfs-containers).
Refer to the BeeGFS doc section on [Running BeeGFS in
Containers](https://doc.beegfs.io/latest/advanced_topics/containers.html) for
how to get started.

### BeeGFS Server Images

Expand All @@ -23,9 +33,9 @@ server services will be built/tagged and containers started. By default two inte
To just build the Docker images from the `servers/` directory run:

```
docker build -t beegfs/beegfs-mgmtd:7.3.1 --target beegfs-mgmtd .
docker build -t beegfs/beegfs-meta:7.3.1 --target beegfs-meta .
docker build -t beegfs/beegfs-storage:7.3.1 --target beegfs-storage .
docker build -t beegfs-mgmtd:latest --target beegfs-mgmtd .
docker build -t beegfs-meta:latest --target beegfs-meta .
docker build -t beegfs-storage:latest --target beegfs-storage .
```

***
Expand All @@ -39,15 +49,17 @@ Management:
```
docker run --privileged \
--env beegfs_setup_1="beegfs-setup-mgmtd -p /mnt/mgmt_tgt_mgmt01 -C -S mgmt_tgt_mgmt01" \
-it beegfs/beegfs-mgmtd:7.3.0 storeMgmtdDirectory=/mnt/mgmt_tgt_mgmt01 storeAllowFirstRunInit=false connInterfacesList=eth0,eth1
--env CONN_AUTH_FILE_DATA="myconnauthsecret" \
-it beegfs-mgmtd:latest storeMgmtdDirectory=/mnt/mgmt_tgt_mgmt01 storeAllowFirstRunInit=false connInterfacesList=eth0,eth1
```

Metadata:

```
docker run --privileged \
--env beegfs_setup_1="beegfs-setup-meta -C -p /mnt/meta_01_tgt_0101 -s 1 -S meta_01" \
-it beegfs/beegfs-meta:7.3.0 storeMetaDirectory=/mnt/meta_01_tgt_0101 storeAllowFirstRunInit=false connInterfacesList=eth0,eth1 sysMgmtdHost=beegfs-management
--env CONN_AUTH_FILE_DATA="myconnauthsecret" \
-it beegfs-meta:latest storeMetaDirectory=/mnt/meta_01_tgt_0101 storeAllowFirstRunInit=false connInterfacesList=eth0,eth1 sysMgmtdHost=beegfs-management
```

Storage:
Expand All @@ -56,6 +68,7 @@ Storage:
docker run --privileged \
--env beegfs_setup_1="beegfs-setup-storage -C -p /mnt/stor_01_tgt_101 -s 1 -S stor_01_tgt_101 -i 101" \
--env beegfs_setup_2="beegfs-setup-storage -C -p /mnt/stor_01_tgt_102 -s 1 -S stor_01_tgt_101 -i 102" \
-it beegfs/beegfs-storage:7.3.0 storeStorageDirectory=/mnt/stor_01_tgt_101,/mnt/stor_01_tgt_102 storeAllowFirstRunInit=false connInterfacesList=eth0,eth1 sysMgmtdHost=beegfs-management
--env CONN_AUTH_FILE_DATA="myconnauthsecret" \
-it beegfs-storage:latest storeStorageDirectory=/mnt/stor_01_tgt_101,/mnt/stor_01_tgt_102 storeAllowFirstRunInit=false connInterfacesList=eth0,eth1 sysMgmtdHost=beegfs-management
```
***

0 comments on commit 9621d2f

Please sign in to comment.