Skip to content

Commit

Permalink
authorized_keys now reads public keys directly from ~/.ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
wtripp180901 committed Jul 10, 2023
1 parent d3b2f9c commit ec900f3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A named RWM volume mounted to `/home` is also expected, this can be external or

## Configuring the Cluster

All config files in `slurm-cluster-chart/files` will be mounted into the container to configure their respective services on startup. The `authorized_keys` file contains authorised public keys for the user `rocky`, add your public key to access the cluster. Note that changes to these files will not all be propagated to existing deployments (see "Reconfiguring the Cluster").
All config files in `slurm-cluster-chart/files` will be mounted into the container to configure their respective services on startup. Note that changes to these files will not all be propagated to existing deployments (see "Reconfiguring the Cluster").
Additional parameters can be found in the `values.yaml` file, which will be applied on a Helm chart deployment. Note that some of these values will also not propagate until the cluster is restarted (see "Reconfiguring the Cluster").

## Deploying the Cluster
Expand All @@ -48,6 +48,12 @@ An RWM volume is required, if a named volume exists, set `nfs.claimName` in the
```
and leaving `nfs.claimName` as the provided value

To access the cluster via `ssh`, you will need to make your public keys available. Do this by running

```console
./publish-keys.sh
```

After configuring `kubectl` with the appropriate `kubeconfig` file, deploy the cluster using the Helm chart:
```console
helm install <deployment-name> slurm-cluster-chart
Expand Down
2 changes: 1 addition & 1 deletion generate-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ kubectl create secret generic munge-key-secret \
--dry-run=client \
--from-literal=munge.key=$(dd if=/dev/urandom bs=1 count=1024 2>/dev/null | base64 -w 0) \
-o yaml | \
kubectl apply -f -
kubectl apply -f -
3 changes: 3 additions & 0 deletions publish-keys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kubectl create configmap authorized-keys-configmap \
"--from-literal=authorized_keys=$(cat ~/.ssh/*.pub)" --dry-run=client -o yaml | \
kubectl apply -f -
2 changes: 0 additions & 2 deletions slurm-cluster-chart/files/authorized_keys

This file was deleted.

8 changes: 0 additions & 8 deletions slurm-cluster-chart/templates/authorized-keys-configmap.yaml

This file was deleted.

0 comments on commit ec900f3

Please sign in to comment.