From 5c3c112dcdfb216de7adb54af5cf3c5730c9bcb7 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 1 Oct 2024 08:40:54 +0000 Subject: [PATCH] Repository initialization --- .github/workflows/initialize.yml | 58 -------------------------------- README.md | 26 ++++---------- configs/nomad.yaml | 2 +- docker-compose.yaml | 8 ++--- 4 files changed, 12 insertions(+), 82 deletions(-) delete mode 100644 .github/workflows/initialize.yml diff --git a/.github/workflows/initialize.yml b/.github/workflows/initialize.yml deleted file mode 100644 index 401c556..0000000 --- a/.github/workflows/initialize.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Template Repository Initialization - -on: - # Triggers the workflow on creation of repository - create: - workflow_dispatch: - -env: - # Use docker.io for Docker Hub if empty - REGISTRY: ghcr.io - # github.repository as / - IMAGE_NAME: ${{ github.repository }} - -permissions: - contents: write - -jobs: - initialize_repository: - if: github.repository != 'FAIRmat-NFDI/nomad-distribution-template' - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - # Replaces the template repository name in the README with the new one - - name: Update README - run: | - sed -i "/# NOMAD Oasis Distribution/,/button on the right./d" README.md - sed -i "s|FAIRmat-NFDI/nomad-distribution-template|${{ github.repository }}|g" README.md - sed -i "s|FAIRmat-NFDI|${{ github.repository_owner }}|g" README.md - sed -i "s|nomad-distribution-template|${{ github.event.repository.name }}|g" README.md - sed -i "s|template https://github.com/${{ github.repository }}|template https://github.com/FAIRmat-NFDI/nomad-distribution-template|g" README.md - sed -i "s|${{ github.repository }}/releases/latest|FAIRmat-NFDI/nomad-distribution-template/releases/latest|g" README.md - sed -i "s|@ git+https://github.com/${{ github.repository_owner }}|@ git+https://github.com/FAIRmat-NFDI|g" README.md - - # Replaces the template repository name in the docker config file with the new one - - name: Update docker-compose.yaml - run: | - export image_name="${{ github.repository }}" - sed -i "s|fairmat-nfdi/nomad-distribution-template|${image_name,,}|g" docker-compose.yaml - - # Replaces the template repository name in the nomad config with the new one - - name: Update nomad.yaml - run: | - export image_name="${{ github.repository }}" - sed -i "s|fairmat-nfdi/nomad-distribution-template|${image_name,,}|g" configs/nomad.yaml - - # Deletes this workflow file to prevent it from running on branch creation - - name: Delete initialization workflow - run: rm .github/workflows/initialize.yml - - # Commits all changes - - name: Commit repository initialization - run: | - git config --global user.name github-actions - git config --global user.email github-actions@github.com - git commit -am "Repository initialization" - git push diff --git a/README.md b/README.md index 0a8e68d..b78096b 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,9 @@ -![docker image](https://github.com/FAIRmat-NFDI/nomad-distribution-template/actions/workflows/docker-publish.yml/badge.svg) +![docker image](https://github.com/blueraft/nomad-distribution-template/actions/workflows/docker-publish.yml/badge.svg) -# NOMAD Oasis Distribution *Template* -This repository is a template for creating your own custom NOMAD Oasis distribution image. -Click [here](https://github.com/new?template_name=nomad-distribution-template&template_owner=FAIRmat-NFDI) -to use this template, or click the `Use this template` button in the upper right corner of -the main GitHub page for this template. -> [!IMPORTANT] -> The templated repository will run a GitHub action on creation which might take a few minutes. -> After the workflow finishes you should refresh the page and this message should disappear. -> If this message persists you might need to trigger the workflow manually by navigating to the -> "Actions" tab at the top, clicking "Template Repository Initialization" on the left side, -> and triggering it by clicking "Run workflow" under the "Run workflow" button on the right. +# blueraft's NOMAD Oasis Distribution -# FAIRmat-NFDI's NOMAD Oasis Distribution - -This is the NOMAD Oasis distribution of FAIRmat-NFDI. +This is the NOMAD Oasis distribution of blueraft. Below are instructions for how to [deploy this distribution](#deploying-the-distribution) and how to customize it through [adding plugins](#adding-a-plugin). @@ -53,14 +41,14 @@ Below are instructions for how to deploy this NOMAD Oasis distribution 2. Clone the repository or download the repository as a zip file. ```sh - git clone https://github.com/FAIRmat-NFDI/nomad-distribution-template.git + git clone https://github.com/blueraft/nomad-distribution-template.git cd nomad-distribution-template ``` or ```sh - curl-L -o nomad-distribution-template.zip "https://github.com/FAIRmat-NFDI/nomad-distribution-template/archive/main.zip" + curl-L -o nomad-distribution-template.zip "https://github.com/blueraft/nomad-distribution-template/archive/main.zip" unzip nomad-distribution-template.zip cd nomad-distribution-template ``` @@ -115,7 +103,7 @@ You can find more details on setting up and maintaining an Oasis in the NOMAD do ### For an existing Oasis If you already have an Oasis running you only need to change the image being pulled in -your `docker-compose.yaml` with `ghcr.io/FAIRmat-NFDI/nomad-distribution-template:main` for the services +your `docker-compose.yaml` with `ghcr.io/blueraft/nomad-distribution-template:main` for the services `worker`, `app`, `north`, and `logtransfer`. If you want to use the `nomad.yaml` from this repository you also need to comment out @@ -202,7 +190,7 @@ Ideally all workflows should be triggered automatically but you might need to ru ## FAQ/Trouble shooting -_I get an_ `Error response from daemon: Head "https://ghcr.io/v2/FAIRmat-NFDI/nomad-distribution-template/manifests/main": unauthorized` +_I get an_ `Error response from daemon: Head "https://ghcr.io/v2/blueraft/nomad-distribution-template/manifests/main": unauthorized` _when trying to pull my docker image._ Most likely you have not made the package public or provided a personal access token (PAT). diff --git a/configs/nomad.yaml b/configs/nomad.yaml index b23f063..7950404 100644 --- a/configs/nomad.yaml +++ b/configs/nomad.yaml @@ -11,7 +11,7 @@ north: tools: options: jupyter: - image: ghcr.io/fairmat-nfdi/nomad-distribution-template/jupyter:main + image: ghcr.io/blueraft/nomad-distribution-template/jupyter:main meta: deployment: "oasis" diff --git a/docker-compose.yaml b/docker-compose.yaml index 2fbfb4d..7d48ea3 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -68,7 +68,7 @@ services: # nomad worker (processing) worker: restart: unless-stopped - image: ghcr.io/fairmat-nfdi/nomad-distribution-template:main + image: ghcr.io/blueraft/nomad-distribution-template:main container_name: nomad_oasis_worker environment: NOMAD_SERVICE: nomad_oasis_worker @@ -91,7 +91,7 @@ services: # nomad app (api + proxy) app: restart: unless-stopped - image: ghcr.io/fairmat-nfdi/nomad-distribution-template:main + image: ghcr.io/blueraft/nomad-distribution-template:main container_name: nomad_oasis_app environment: NOMAD_SERVICE: nomad_oasis_app @@ -130,7 +130,7 @@ services: # nomad remote tools hub (JupyterHUB, e.g. for AI Toolkit) north: restart: unless-stopped - image: ghcr.io/fairmat-nfdi/nomad-distribution-template:main + image: ghcr.io/blueraft/nomad-distribution-template:main container_name: nomad_oasis_north environment: NOMAD_SERVICE: nomad_oasis_north @@ -165,7 +165,7 @@ services: # to enable the logtransfer service run "docker compose --profile with_logtransfer up" logtransfer: restart: unless-stopped - image: ghcr.io/fairmat-nfdi/nomad-distribution-template:main + image: ghcr.io/blueraft/nomad-distribution-template:main container_name: nomad_oasis_logtransfer environment: NOMAD_SERVICE: nomad_oasis_logtransfer