Repositories are where package metadata and package .zip files are hosted. Repositores can be local or remote, were local means backed by Skipper’s relational database and remote means a filesystem exposed over http.
When registering a remote registry, for example, the experimental
one that is currently defined by default in addition to one named local` use the following format:
spring cloud: skipper: server: packageRepositories: - name: experimental url: http://skipper-repository.cfapps.io/repository/experimental description: Experimental Skipper Repository repoOrder: 0 - name: local url: http://${spring.cloud.client.hostname}:7577 local: true description: Default local database backed repository repoOrder: 1
The repoOrder
determines which repository will serve up a package if one with the same name is registered in two or more repositories.
The directory structure assumed for a remote repository is the registered url
value followed by the package name and then the zip file name., e.g. skipper-repository.cfapps.io/repository/experimental/helloworld/helloworld-1.0.0.zip
for the package helloworld
with the version 1.0.0
. Directly under the registered url
is expected to be a file named index.yml
, e.g. skipper-repository.cfapps.io/repository/experimental/index.yml. This contains the package metadata for all the packages hosted by the repository.
It is up to you to update the index.yml
file 'by-hand' for remote repositories.
'local' repositories are backed by Skipper’s database. In the 1.0 M1 release they does not expose the index.yml or the .zip files under a filesystem like URL structure as with remote repositories. This will be provided in the next version. However, on the positive side, you can upload packages to a local repository and don’t need to maintain an index file. See the skipper command section for information on creating local repositories.
A good example that shows using a Spring Boot web application with static resources to host a Repository can be found here. This application is currently running under skipper-repository.cfapps.io/repository/experimental.