From 81210d79e7914c191317b707a2125150ff1e4b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hampus=20N=C3=A4sstr=C3=B6m?= Date: Thu, 7 Mar 2024 15:55:51 +0100 Subject: [PATCH] Move files to top level and update README (#4) * Moved nomad-oasis and docker-compose * Updated initialize.yml workflow to new paths * Updated both READMEs --- .github/workflows/initialize.yml | 8 +- README.md | 29 +++++-- ...docker-compose.yaml => docker-compose.yaml | 0 .../nomad-oasis.zip => nomad-oasis.zip | Bin 4918 -> 4918 bytes .../nomad-oasis/configs/nginx.conf | 82 ------------------ .../nomad-oasis/configs/nomad.yaml | 34 -------- template_README.md | 36 +++++--- 7 files changed, 53 insertions(+), 136 deletions(-) rename nomad-oasis_files/nomad-oasis/docker-compose.yaml => docker-compose.yaml (100%) rename nomad-oasis_files/nomad-oasis.zip => nomad-oasis.zip (92%) delete mode 100644 nomad-oasis_files/nomad-oasis/configs/nginx.conf delete mode 100644 nomad-oasis_files/nomad-oasis/configs/nomad.yaml diff --git a/.github/workflows/initialize.yml b/.github/workflows/initialize.yml index 3420d03..40faec5 100644 --- a/.github/workflows/initialize.yml +++ b/.github/workflows/initialize.yml @@ -31,10 +31,12 @@ jobs: # Replaces the template repository name in the docker config file with the new one - name: Update docker-compose.yaml - working-directory: ./nomad-oasis_files run: | - sed -i "s|FAIRmat-NFDI/nomad-distribution-template|${{ github.repository }}|g" nomad-oasis/docker-compose.yaml - zip -r nomad-oasis.zip nomad-oasis + sed -i "s|FAIRmat-NFDI/nomad-distribution-template|${{ github.repository }}|g" docker-compose.yaml + mkdir nomad-oasis + cp docker-compose.yaml nomad-oasis + zip -ur nomad-oasis.zip nomad-oasis + rm -r nomad-oasis # Deletes this workflow file to prevent it from running on branch creation - name: Delete initialization workflow diff --git a/README.md b/README.md index 3647ce1..d5aec24 100644 --- a/README.md +++ b/README.md @@ -10,19 +10,18 @@ Click [here](https://github.com/new?template_name=nomad-distribution-template&te to use this template, or click the `Use this template` button in the upper right corner of the main GitHub page for this template. -## Deploying the image +## Deploying the distribution -To deploy this NOMAD Oasis image you should follow the instructions on [nomad-lab.eu/prod/v1/docs/oasis/install.html](https://nomad-lab.eu/prod/v1/docs/oasis/install.html) but replace the Docker image in `docker-compose.yaml` with `ghcr.io/FAIRmat-NFDI/nomad-distribution-template:main` for the services `worker`, `app`, `north`, and `logtransfer`. +Below are instructions for how to deploy this NOMAD Oasis distribution +[for a new Oasis](#for-a-new-oasis) and [for an existing Oasis](#for-an-existing-oasis) -Remember to also update the `nomad.yaml` config file to include the new plugins. - -### Quick-start +### For a new Oasis - Find a linux computer. - Make sure you have [docker](https://docs.docker.com/engine/install/) installed. Docker nowadays comes with `docker compose` build in. Prior, you needed to install the stand alone [docker-compose](https://docs.docker.com/compose/install/). -- Download the modified configuration files [nomad-oasis.zip](nomad-oasis_files/nomad-oasis.zip) from this repository. +- Download the modified configuration files [nomad-oasis.zip](nomad-oasis.zip) from this repository. - Run the following commands (skip `chown` on MacOS and Windows computers) @@ -42,3 +41,21 @@ the container has to be run under the docker group. You need to replace the defa id `991` in the `docker-compose.yaml`'s `hub` section with your systems docker group id. Run `id` if you are a docker user, or `getent group | grep docker` to find our your systems docker gid. The user id 1000 is used as the nomad user inside all containers. + +You can find more details on setting up and maintaining an Oasis in the NOMAD docs here: +[nomad-lab.eu/prod/v1/docs/oasis/install.html](https://nomad-lab.eu/prod/v1/docs/oasis/install.html) + +### 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/GITHUB_REPOSITORY: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 +the inclusion of the `nomad.yaml` under the volumes key of those services in the +`docker-compose.yaml`. + +```yaml + volumes: + # - ./configs/nomad.yaml:/app/nomad.yaml +``` diff --git a/nomad-oasis_files/nomad-oasis/docker-compose.yaml b/docker-compose.yaml similarity index 100% rename from nomad-oasis_files/nomad-oasis/docker-compose.yaml rename to docker-compose.yaml diff --git a/nomad-oasis_files/nomad-oasis.zip b/nomad-oasis.zip similarity index 92% rename from nomad-oasis_files/nomad-oasis.zip rename to nomad-oasis.zip index 1d6684ef9dc7ab7c3a6d51f626071c9693330c97..75b59d7c3430634705f76c922c011685cd56a97c 100644 GIT binary patch delta 100 zcmdm{woQ#Uz?+$civa|-2c}QtRbuySeVGcxllge0HU_w`G6RJtPiHlSiEqBln#}mwhcV@aOHMvnxceA [!IMPORTANT] > Depending on the settings of the owner of this repository, the distributed image might @@ -18,22 +18,18 @@ customize it through [adding plugins](#adding-a-plugin). > greatly appreciate it if you would add the topic `nomad-distribution` by clicking the > ⚙️ next to "About" on the main GitHub page for this repository. -## Deploying the image +## Deploying the distribution -To deploy this NOMAD Oasis image you should follow the instructions on -[nomad-lab.eu/prod/v1/docs/oasis/install.html](https://nomad-lab.eu/prod/v1/docs/oasis/install.html) -but replace the Docker image in `docker-compose.yaml` with `ghcr.io/GITHUB_REPOSITORY:main` -for the services `worker`, `app`, `north`, and `logtransfer`. - -Remember to also update the `nomad.yaml` config file to include the new plugins. +Below are instructions for how to deploy this NOMAD Oasis distribution +[for a new Oasis](#for-a-new-oasis) and [for an existing Oasis](#for-an-existing-oasis) -### Quick-start +### For a new Oasis - Find a linux computer. - Make sure you have [docker](https://docs.docker.com/engine/install/) installed. Docker nowadays comes with `docker compose` build in. Prior, you needed to install the stand alone [docker-compose](https://docs.docker.com/compose/install/). -- Download the modified configuration files [nomad-oasis.zip](nomad-oasis_files/nomad-oasis.zip) from this repository. +- Download the modified configuration files [nomad-oasis.zip](nomad-oasis.zip) from this repository. - Run the following commands (skip `chown` on MacOS and Windows computers) @@ -54,6 +50,24 @@ id `991` in the `docker-compose.yaml`'s `hub` section with your systems docker g Run `id` if you are a docker user, or `getent group | grep docker` to find our your systems docker gid. The user id 1000 is used as the nomad user inside all containers. +You can find more details on setting up and maintaining an Oasis in the NOMAD docs here: +[nomad-lab.eu/prod/v1/docs/oasis/install.html](https://nomad-lab.eu/prod/v1/docs/oasis/install.html) + +### 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/GITHUB_REPOSITORY: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 +the inclusion of the `nomad.yaml` under the volumes key of those services in the +`docker-compose.yaml`. + +```yaml + volumes: + # - ./configs/nomad.yaml:/app/nomad.yaml +``` + ## Adding a plugin To add a new plugin to the docker image you should add it to the [plugins.txt](plugins.txt) file.