Skip to content

Commit

Permalink
Move files to top level and update README (#4)
Browse files Browse the repository at this point in the history
* Moved nomad-oasis and docker-compose

* Updated initialize.yml workflow to new paths

* Updated both READMEs
  • Loading branch information
hampusnasstrom authored Mar 7, 2024
1 parent 630e3a5 commit 81210d7
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 136 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/initialize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand All @@ -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
```
File renamed without changes.
Binary file not shown.
82 changes: 0 additions & 82 deletions nomad-oasis_files/nomad-oasis/configs/nginx.conf

This file was deleted.

34 changes: 0 additions & 34 deletions nomad-oasis_files/nomad-oasis/configs/nomad.yaml

This file was deleted.

36 changes: 25 additions & 11 deletions template_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# GITHUB_REPOSITORY_OWNER's NOMAD Oasis Distribution

This is the NOMAD Oasis distribution of GITHUB_REPOSITORY_OWNER.
Below are instructions for how to [deploy this image](#deploying-the-image) and how to
customize it through [adding plugins](#adding-a-plugin).
Below are instructions for how to [deploy this distribution](#deploying-the-distribution)
and how to customize it through [adding plugins](#adding-a-plugin).

> [!IMPORTANT]
> Depending on the settings of the owner of this repository, the distributed image might
Expand All @@ -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)


Expand All @@ -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.
Expand Down

0 comments on commit 81210d7

Please sign in to comment.