-
Notifications
You must be signed in to change notification settings - Fork 48
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
How can I use this for a non General registry? #39
Comments
We support multiple registries. You have to say |
@davidanthoff: please give it a try and file issues if there are any problems. |
So that would require that we run a server somewhere? |
Yes. Credentials to your private registry and repositories, that Registrator.jl needs to work with, would then remain on your server. |
Hm, I actually would much prefer a setup where we could just use the normal registrator bot, and for example have a config file in the root of our packages where we can specify the URL of the registry for that specific package. If the choice is between a) giving access to our private repos to the central registrator bot and b) running our own server, a) easily wins out. Running our own infrastructure for this kind of thing is really kind of a no-starter for us... |
I'm actually wondering whether JuliaLang/PkgDev.jl#144 wouldn't be a perfectly fine workflow for our use-case... |
It isn't necessary that you run your own server. Just install the normal registrator bot on both your private repo and the private registry. However, Registrator will not know which registry you are referring to when you just say |
Is there a way to then tell it about the private registry? |
We need to update the config on our end to whitelist your registry. |
We can't really have the public registrator instance be an "open relay" to arbitrary private registries since that opens the server up to all sorts of mischief. The way this will have to work is that people can run their own registrator instances which are configured to run against their private registries. |
Is this simple to deploy on Heroku? I'd love to deploy this to manage the planned BioJulia registry |
Not sure... the only way to find out is to give it a try and see. |
Also, Julia Computing will host and manage an instance of this for General and we would be happy to run instances for any public registry of open source packages too. (Private registries of closed-source packages are a different story, of course.) |
@StefanKarpinski I'm having an experiment now to see how I get on, but I may well take you up on the offer if Julia Computing would be happy to run an instance for a BioJulia registry. |
We have a public registry (https://github.com/mimiframework/MimiRegistry) that contains some public and some private packages. The private packages are all research work-in-progress that will be made public once we have the associated research published in journals. If there was a way to get a hosted version of Registrator for that, it would be awesome. But I also totally understand if that doesn't work, given that this is somewhere in the middle between public and private... |
What goes in the token field in the [github] section of the config? I've made a "BioJulia Registrar" GitHub app and am filling out a config so as to test this server locally on my laptop before I try any pushing to Heroku business. I've filled in:
Presumably I can just provide the private-key.pem file for the app in the scripts folder and the Dockerfile will include it in any built image. |
|
I can see tokens for my user BenJWard in Settings/Developer Settings/Personal Access tokens, but I can't see anything like that for the BioJulia org's settings. Do I have to set the [github] info to use my personal account details? |
Yes the user needs to be an actual user not an org. You don't have to use your personal token. You can create a new user on GitHub say "BioJuliaRegistrar" and use that token. Also note that permissions can be set to the token. The token has to have permissions to create a pull request on the registry repo and to comment on the package repo issues and commits. |
We'll figure something out for this as well. The intention is to support the open source ecosystem and the private development of soon-to-be-public packages is part of that. But obviously we have to figure out using this for General first and then work on other registries... |
“Soon-to-be-public” of course often means years, because of the wonderful joys of the extremely slow peer review process in many (including mine) fields :) |
How do I need to edit this section? Some of the fields like the
|
You want to set |
Note that the trigger is the @ prefix to the command, Ex: @BioJuliaRegistrar |
Just to chime in that we're in the exact same boat as @davidanthoff. As long as there are clear instructions about how to set this up, I don't care very much what the solution looks like (as long as it isn't heroically difficult). To me it seems another option would be a PkgDev-like solution that prepares a commit with the appropriate changes to the 4 TOML files, e.g., julia> Registrator.commit("HolyLabRegistry", "SomeCoolPkg", v"0.4.1") where all changes to "SomeCoolPkg"'s We can handle pushing these commits up ourselves; the annoying part is the fiddly detail involved in getting the correct changes to those 4 TOML files in the registry. It seems there must be code out there to do this now, it's "just" a question of packaging it. |
I actually always thought that the PkgDev workflow was in theory pretty good, and that I almost preferred that over a bot. The reason the bot then was just way nicer was that PkgDev was pretty unreliable and the bot always worked, but that (at least to me) seems more a question of code quality than design. |
See #45 for a PkgDev like workflow. |
What was unreliable about it? |
It's been a while, but I have vague memories that it interacted with github, and that often failed because of credential problems and stuff like that. I might well misremember. |
That makes sense. I would imagine that for a private registry you may want to just generate a registry commit for the new version and just push it, assuming every one who would be tagging new versions would have push rights to the registry? |
Exactly, or it could create a local branch with the commit and then they could open a PR, if they don't have push access. |
@nkottary I've tried to deploy the docker image to Heroku free tier, with some success, however, I think I need to refine how the port for the webhook is set: Here's a log:
Can we add a way for the app to get the port number from the $PORT environment variable, if it is not set in the config? Using the docker EXPOSE command does not work for Heroku. I can see a few ways of doing it in the |
The key |
in case it is useful, there's an example of registering a package in a private registry in #197 (although this is not very nice, and I interact with a private registry via a hosted Registrator instance because the REPL's not so nice... hence the issue). |
We have our own registry for a bunch of lab internal stuff. Can I use Registrator for that use case? How would I configure it so that it works on our own registry, and not the General public one?
Is it general ready to be used?
The text was updated successfully, but these errors were encountered: