Skip to content

Commit

Permalink
Cease and desist destructive tendencies (#24)
Browse files Browse the repository at this point in the history
I'm hitting a problem when restarting nexus, where the `registry` suddenly changes blobstore and repos vanish.

The problem is that `nexus-setup.sh` runs as an `ExecPostStart` script on the systemd service, and when it runs it has two destructive options.

These destructive options make it impossible to restart the nexus service without harming an existing registry. For example, in Fawkes we create a registry in the fawkes blobstore. Restarting nexus causes that registry to be recreated again under the default blobstore, this ends up breaking image pulls.

Signed-off-by: Russell Bunch <[email protected]>
  • Loading branch information
rustydb authored Oct 17, 2023
1 parent 2a8fa04 commit 8eb10fe
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions systemd/nexus-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,5 @@ done
nexus-upload-script /usr/local/share/nexus-setup/groovy/*.groovy >&2
nexus-enable-anonymous-access >&2
nexus-remove-default-repos >&2
cat > /tmp/nexus-repositories.yaml << EOF
---
cleanup: null
docker:
forceBasicAuth: false
httpPort: 5000
httpsPort: null
v1Enabled: false
format: docker
name: registry
online: true
storage:
blobStoreName: default
strictContentTypeValidation: false
writePolicy: ALLOW
${config}
EOF
nexus-repositories-create /tmp/nexus-repositories.yaml >&2
nexus-enable-docker-realm >&2
" || exit

0 comments on commit 8eb10fe

Please sign in to comment.