mikelangelo-project / capstan

Capstan, a tool for packaging and running your application on OSv.
http://osv.io/capstan/
Other
19 stars 7 forks source link

how to create a shared private repository #85

Closed redblade closed 6 years ago

redblade commented 6 years ago

Hi, I'd like to setup a private shared repository that multiple users can use as their remote repo. Basically a clone of the public repo on which to manage the upload of images by CLI (if feasible). I could not find documentation about this, would it be possible and how?

Many thanks Francesco

miha-plesko commented 6 years ago

Hi @redblade , it should be very easy to switch to your own repository. I've opened a PR to provide some more documentation about this (link), please let me know if there is something missing.

gberginc commented 6 years ago

@miha-plesko I think the main problem for @redblade currently is that they need a private shared repository. Because Capstan relies on publicly accessible S3 buckets, this is an unfortunate limitation of the current implementation.

Two questions for you @redblade, though

redblade commented 6 years ago

Hi @gberginc, we don't have an S3 compliant service available but a plain http/https service is ok for our use-cases. According to @miha-plesko it should be only a matter of creating two folders on an http/https service, set the new remote repository url, (copy the packages there) and pull the packages by name. BTW, is there a command from CLI to push an artefact to the remote repository? Thanks again

miha-plesko commented 6 years ago

Unfortunately command like capstan package push is not available at the moment. Currently we're pushing base unikernel and all the packages to the S3 using this script:

https://github.com/mikelangelo-project/capstan-packages/blob/master/publish.sh

We can probably implement the capstan package push command for you if you depend on it, but we would need to know what mechanism is used for uploading?

redblade commented 6 years ago

First of all thanks for the availability! I don't know if this is what you need: I think a basic upload on a http/https service would be enough; later, the management of a basic authentication through let's say env variables could be a plus

miha-plesko commented 6 years ago

@redblade I don't think there is such thing as "basic upload to http/https service". Usually http/https servers are used to serve content, not to receive one (which is great, because you don't want anyone out in the wild to be able to upload child porn stuff to your server 😈 ).

Basically it depends on your server's setup how files can be uploaded. If you were using S3 repository, we could support uploading files to S3 bucket. If you're using nginx to just serve files for you, then it's going to be a bit more complicated (perhaps we could employ FTP, but you need to configure that).

Anyway, may I ask you to open another issue for this so that we can close this one once the documentation PR is merged? I'm looking forward to continue discussion there!

redblade commented 6 years ago

ok, done ( #89 )

redblade commented 6 years ago

Thanks @miha-plesko , I have replicated the folder structure following your suggestion and I can now use it as a local repository. Uploading the packages in my folder is not a problem, a custom script will be enough or we can setup a basic (authenticated) http service to upload them if needed