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

document running local Artifactory via Homebrew #667

Closed
SethTisue opened this issue Jan 20, 2018 · 7 comments
Closed

document running local Artifactory via Homebrew #667

SethTisue opened this issue Jan 20, 2018 · 7 comments
Labels

Comments

@SethTisue
Copy link
Member

SethTisue commented Jan 20, 2018

for a long time I've been running a local Artifactory inside a Docker container, following some of @eed3si9n's instructions. but I was setting up a new laptop today and I decided to see if involving Docker was really necessary.

I found that this works (on MacOS):

brew install artifactory
brew services start artifactory

now Artifactory is running at http://127.0.0.1:8081

if Artifactory fails to start, it could be because you have Java 9 installed and it seems that at present, the Artifactory version Homebrew installs can't cope with that (the problem appears to be this)

but I found this can be worked around by (after brew install but before brew services start) editing /usr/local/Cellar/artifactory/5.8.3/libexec/bin/artifactory.sh and adding this at the top:

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

with that change, Artifactory starts and the config file in the repo (artifactory/artifactory-lightbend.xml) works just fine when loaded in the web UI via Admin -> Config Descriptor (just paste in the contents of the file). ezpz!

UPDATE: I see @lrytz has his own writeup on this at https://gist.github.com/lrytz/202aa06b0153dbd6c606fef3b6b4c713

@SethTisue
Copy link
Member Author

within Lightbend I got one "I don't use Docker, and use the brew install way too" and one "For me, Docker is preferred in cases where I want to be able to swap between specific version" (not a consideration for the community build I think, I've never had an issue that depended on Artifactory version)

@SethTisue SethTisue added the doc label Feb 12, 2018
@SethTisue
Copy link
Member Author

SethTisue commented May 7, 2018

I've encountered another problem where every time you brew upgrade artifactory, it won't start up again. doesn't matter what that the two versions are. un-installing and re-installing doesn't fix it because some database files are left behind.

so my current recommendation is: after installing, use brew pin to stick with whatever version you have.

I thought I had it written down somewhere how this can be repaired, or at least what directory you have to blow away in order for the uninstall-and-reinstall route to work, but I can't seem to find it :-/

@SethTisue
Copy link
Member Author

SethTisue commented May 7, 2018

(oh btw I don't actually know if the Java 9 workaround described above is even necessary anymore with current Artifactory versions, I'm brew pinned so I don't know)

@SethTisue
Copy link
Member Author

SethTisue commented Aug 12, 2018

at least what directory you have to blow away in order for the uninstall-and-reinstall route to work

after brew uninstall artifactory, do rm -rf /usr/local/var/artifactory /usr/local/Cellar/artifactory before reinstalling

@dwijnand
Copy link
Member

I've stuck to pinning (still on 5.1.3) and editing /usr/local/opt/artifactory/libexec/bin/artifactory.default. I posted in Lukas' gist.

@dwijnand
Copy link
Member

I think I was the "I don't use Docker, and use the brew install way too", JFYI I'm thinking of switching to Docker in the future.

@SethTisue SethTisue added process and removed doc labels Aug 21, 2019
@SethTisue
Copy link
Member Author

the doc at https://github.com/scala/community-builds/wiki/Local-Artifactory is in reasonably good shape

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants