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

feat: use docker volumes & nxrm pro to use PostgreSQL #38

Merged
merged 6 commits into from
Oct 16, 2024

Conversation

madpah
Copy link
Contributor

@madpah madpah commented Oct 15, 2024

This PR initially set out to resolve #37 - however in order to achieve this, #16 was also required to be included.

This is due to the nature of how the Sonatype Nexus Repository Container Images use the /nexus-data directory.

Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <phorton@sonatype.com>
@madpah madpah added the enhancement New feature or request label Oct 15, 2024
@madpah madpah requested a review from hboutemy October 15, 2024 08:42
@madpah madpah self-assigned this Oct 15, 2024
@paul-botsco-2-0 paul-botsco-2-0 bot added the 😍 cla signed The CLA is signed label Oct 15, 2024
@madpah madpah linked an issue Oct 15, 2024 that may be closed by this pull request
Signed-off-by: Paul Horton <phorton@sonatype.com>
@hboutemy
Copy link
Contributor

Tested on Linux, with a license copied to config/sonatype-license-all.lic:

  • proxied profile works (just has warning on postgres-nxrm_1 FATAL: sorry, too many clients already)
  • direct profile is not ok, issue accessing the same license file through volume:
ERROR: for sonatype-platform-reference_nxiq-direct_1  Cannot start service nxiq-direct: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/herve/tmp/sonatype-platform-reference/config/sonatype-license-all.lic" to rootfs at "/sonatype-license.lic": mount /home/herve/tmp/sonatype-platform-reference/config/sonatype-license-all.lic:/sonatype-license.lic (via /proc/self/fd/6), flags: 0x500
Starting sonatype-platform-reference_nxrm3-direct_1  ... error

@madpah
Copy link
Contributor Author

madpah commented Oct 15, 2024

Can you confirm whether volumes were cleanup up / removed (docker volume prune --all) between testing the different profiles @hboutemy ?

@hboutemy
Copy link
Contributor

ok, after docker volume prune --all, direct works exactly as proxied

I need to test also on Mac...

@hboutemy
Copy link
Contributor

hboutemy commented Oct 15, 2024

on Mac, direct profile works but not proxied:

 ✔ Container sonatype-platform-reference-postgres-1                   Created                                                                                                                                                                                         0.0s
 ✔ Container sonatype-platform-reference-postgres-nxrm-1              Created                                                                                                                                                                                         0.0s
 ✔ Container sonatype-platform-reference-proxy-1                      Stopped                                                                                                                                                                                         0.0s
 ✔ Container 9a1a53017ec7_sonatype-platform-reference-nxiq-proxied-1  Removed                                                                                                                                                                                         0.0s
 ⠋ Container sonatype-platform-reference-nxiq-proxied-1               Recreate                                                                                                                                                                                        0.0s
 ⠋ Container sonatype-platform-reference-nxrm3-proxied-1              Recreate                                                                                                                                                                                        0.0s
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /Users/hboutemy/dev/git/sonatype-nexus-community/sonatype-platform-reference/data/nexus-data

I had to mkdir data/nexus-data and it's ok

Copy link
Contributor

@hboutemy hboutemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great to see Linux working as smoothly as Mac now :)

@madpah madpah merged commit 0ff3244 into main Oct 16, 2024
1 check passed
@madpah madpah deleted the feat/use-docker-volumes branch October 16, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 😍 cla signed The CLA is signed
Projects
None yet
2 participants