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

36 update docs with new repository name #37

Merged
merged 3 commits into from
Nov 11, 2024
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
16 changes: 8 additions & 8 deletions .github/workflows/initialize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:

jobs:
initialize_repository:
if: github.repository != 'FAIRmat-NFDI/nomad-distribution-template'
if: github.repository != 'FAIRmat-NFDI/nomad-distro-template'
runs-on: ubuntu-latest

steps:
Expand All @@ -27,25 +27,25 @@ jobs:
run: |
sed -i "/# NOMAD Oasis Distribution/,/button on the right./d" README.md
export image_name="${{ github.repository }}"
sed -i "s|fairmat-nfdi/nomad-distribution-template|${image_name,,}|g" README.md
sed -i "s|FAIRmat-NFDI/nomad-distribution-template|${{ github.repository }}|g" README.md
sed -i "s|fairmat-nfdi/nomad-distro-template|${image_name,,}|g" README.md
sed -i "s|FAIRmat-NFDI/nomad-distro-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|nomad-distro-template|${{ github.event.repository.name }}|g" README.md
sed -i "s|template https://github.com/${{ github.repository }}|template https://github.com/FAIRmat-NFDI/nomad-distro-template|g" README.md
sed -i "s|${{ github.repository }}/releases/latest|FAIRmat-NFDI/nomad-distro-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
sed -i "s|fairmat-nfdi/nomad-distro-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
sed -i "s|fairmat-nfdi/nomad-distro-template|${image_name,,}|g" configs/nomad.yaml

# Deletes this workflow file to prevent it from running on branch creation
- name: Delete initialization workflow
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
![docker image](https://github.com/FAIRmat-NFDI/nomad-distribution-template/actions/workflows/docker-publish.yml/badge.svg)
![docker image](https://github.com/FAIRmat-NFDI/nomad-distro-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)
Click [here](https://github.com/new?template_name=nomad-distro-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.

Expand Down Expand Up @@ -54,16 +54,16 @@ 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
cd nomad-distribution-template
git clone https://github.com/FAIRmat-NFDI/nomad-distro-template.git
cd nomad-distro-template
```

or

```sh
curl-L -o nomad-distribution-template.zip "https://github.com/FAIRmat-NFDI/nomad-distribution-template/archive/main.zip"
unzip nomad-distribution-template.zip
cd nomad-distribution-template
curl-L -o nomad-distro-template.zip "https://github.com/FAIRmat-NFDI/nomad-distro-template/archive/main.zip"
unzip nomad-distro-template.zip
cd nomad-distro-template
```

3. _On Linux only,_ recursively change the owner of the `.volumes` directory to the nomad user (1000)
Expand Down Expand Up @@ -118,7 +118,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/fairmat-nfdi/nomad-distro-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
Expand Down Expand Up @@ -183,7 +183,7 @@ This image has been added to the [`configs/nomad.yaml`](configs/nomad.yaml) duri
The image is quite large and might cause a timeout the first time it is run. In order to avoid this you can pre pull the image with:

```
docker pull ghcr.io/fairmat-nfdi/nomad-distribution-template/jupyter:main
docker pull ghcr.io/fairmat-nfdi/nomad-distro-template/jupyter:main
```

If you want additional python packages to be available to all users in the jupyter hub you can add those to the jupyter table in the [`pyproject.toml`](pyproject.toml):
Expand All @@ -205,7 +205,7 @@ jupyter = [
In order to update an existing distribution with any potential changes in the template you can add a new `git remote` for the template and merge with that one while allowing for unrelated histories:

```
git remote add template https://github.com/FAIRmat-NFDI/nomad-distribution-template
git remote add template https://github.com/FAIRmat-NFDI/nomad-distro-template
git fetch template
git merge template/main --allow-unrelated-histories
```
Expand All @@ -217,7 +217,7 @@ git checkout --theirs Dockerfile
git checkout --theirs .github/workflows/docker-publish.yml
```

For detailed instructions on how to resolve the merge conflicts between different version we refer you to the latest template release [notes](https://github.com/FAIRmat-NFDI/nomad-distribution-template/releases/latest)
For detailed instructions on how to resolve the merge conflicts between different version we refer you to the latest template release [notes](https://github.com/FAIRmat-NFDI/nomad-distro-template/releases/latest)

Once the merge conflicts are resolved you should add the changes and commit them

Expand All @@ -230,7 +230,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/FAIRmat-NFDI/nomad-distro-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).
Expand Down
2 changes: 1 addition & 1 deletion configs/nomad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ north:
tools:
options:
jupyter:
image: ghcr.io/fairmat-nfdi/nomad-distribution-template/jupyter:main
image: ghcr.io/fairmat-nfdi/nomad-distro-template/jupyter:main

meta:
deployment: "oasis"
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ services:
# nomad worker (processing)
worker:
restart: unless-stopped
image: ghcr.io/fairmat-nfdi/nomad-distribution-template:main
image: ghcr.io/fairmat-nfdi/nomad-distro-template:main
container_name: nomad_oasis_worker
environment:
NOMAD_SERVICE: nomad_oasis_worker
Expand All @@ -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/fairmat-nfdi/nomad-distro-template:main
container_name: nomad_oasis_app
environment:
NOMAD_SERVICE: nomad_oasis_app
Expand Down Expand Up @@ -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/fairmat-nfdi/nomad-distro-template:main
container_name: nomad_oasis_north
environment:
NOMAD_SERVICE: nomad_oasis_north
Expand Down Expand Up @@ -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/fairmat-nfdi/nomad-distro-template:main
container_name: nomad_oasis_logtransfer
environment:
NOMAD_SERVICE: nomad_oasis_logtransfer
Expand Down