Manage Public Hub manifests
This document describes how to manage manifests in Public Hub.
Prerequisites​
populatorinstalled from a Capact release.- Capact CLI or Helm v3 installed.
Check the Hub manifests sources​
To check the Public Hub manifests sources, run:
kubectl -n capact-system get deploy capact-hub-public -o=jsonpath='{$.spec.template.spec.containers[?(@.name=="hub-public-populator")].env[?(@.name=="MANIFESTS_SOURCES")].value}'
The empty response means that the populator sidecar is not enabled and manifests are not synchronized into Public Hub automatically.
NOTE: Check the
go-getterproject to understand the URL format.
Change the Hub manifest source​
By default, the Hub manifests are synchronized with the manifests directory from the hub-manifests repository on a specific release branch. To change that, follow one of the alternatives below.
During Capact installation​
- Public git repository
- Private git repository
- Embedded
# The git repository URL
export SOURCE_REPO_URL="{url}" # e.g. github.com/capactio/hub-manifests
# The git ref to checkout. It can point to a commit SHA, a branch name, or a tag.
export SOURCE_REPO_REF="{ref}" # e.g. main
capact install --capact-overrides="hub-public.populator.enabled=true,hub-public.populator.manifestsLocations[0].repository=${SOURCE_REPO_URL},hub-public.populator.manifestsLocations[0].branch=${SOURCE_REPO_REF}"
# The git repository URL
export SOURCE_REPO_URL="{url}" # e.g. github.com/capactio/hub-manifests
# The git ref to checkout. It can point to a commit SHA, a branch name, or a tag.
export SOURCE_REPO_REF="{ref}" # e.g. main
# The Base64 encoded private ssh key used by the populator to download manifests. It needs the read-only access.
export SOURCE_SSH_KEY="{key}"
capact install --capact-overrides="hub-public.populator.enabled=true,hub-public.populator.manifestsLocations[0].repository=${SOURCE_REPO_URL},hub-public.populator.manifestsLocations[0].branch=${SOURCE_REPO_REF},hub-public.populator.manifestsLocations[0].sshKey=${SOURCE_SSH_KEY}"
Use embedded Hub manifests for a given release:
capact install --capact-overrides="hub-public.populator.useEmbeddedSourceOnly=true"
Once you have your Capact cluster set up​
- Public GitHub repository
- Private GitHub repository
- Embedded
# The git repository URL
export SOURCE_REPO_URL="{url}" # e.g. github.com/capactio/hub-manifests
# The git ref to checkout. It can point to a commit SHA, a branch name, or a tag.
export SOURCE_REPO_REF="{ref}" # e.g. main
helm repo add capactio https://storage.googleapis.com/capactio-stable-charts
helm upgrade capact --version {VERSION} capactio/capact -n capact-system --reuse-values --set hub-public.populator.enabled=true --set hub-public.populator.manifestsLocations[0].repository=${SOURCE_REPO_URL} --set hub-public.populator.manifestsLocations[0].branch=${SOURCE_REPO_REF}
# The git repository URL
export SOURCE_REPO_URL="{url}" # e.g. github.com/capactio/hub-manifests
# The git ref to checkout. It can point to a commit SHA, a branch name, or a tag.
export SOURCE_REPO_REF="{ref}" # e.g. main
# The Base64 encoded private ssh key used by the populator to download manifests. It needs the read-only access.
export SOURCE_SSH_KEY="{key}"
helm repo add capactio https://storage.googleapis.com/capactio-stable-charts
helm upgrade capact --version {VERSION} capactio/capact -n capact-system --reuse-values --set hub-public.populator.enabled=true --set hub-public.populator.manifestsLocations[0].repository=${SOURCE_REPO_URL} --set hub-public.populator.manifestsLocations[0].branch=${SOURCE_REPO_REF} --set hub-public.populator.manifestsLocations[0].sshKey=${SOURCE_SSH_KEY}
Use embedded Hub manifests for a given release:
helm repo add capactio https://storage.googleapis.com/capactio-stable-charts
helm upgrade capact --version {VERSION} capactio/capact -n capact-system --reuse-values --set hub-public.populator.useEmbeddedSourceOnly=true
Disable automated synchronization with an external source​
The commands bellow disable the populator sidecar in Public Hub. This is useful when you want to populate manifests manually.
During Capact installation​
capact install --capact-overrides=hub-public.populator.enabled=false
Once you have your Capact cluster set up​
helm repo add capactio https://storage.googleapis.com/capactio-stable-charts
helm upgrade capact --version {VERSION} capactio/capact -n capact-system --reuse-values --set hub-public.populator.enabled=false
Enable automated synchronization with an external source​
During Capact installation​
capact install --capact-overrides=hub-public.populator.enabled=true
Once you have your Capact cluster set up​
helm repo add capactio https://storage.googleapis.com/capactio-stable-charts
helm upgrade capact --version {VERSION} capactio/capact -n capact-system --reuse-values --set hub-public.populator.enabled=true
Populate the manifests into Hub​
In one terminal window, expose Neo4j:
kubectl -n capact-system port-forward svc/neo4j-neo4j 7687:7687Execute
populator:APP_JSON_PUBLISH_ADDR=http://{your_ip_address} populator register ocf-manifests --source {PATH_TO_DIR_WITH_MANIFESTS}NOTE: More information about using
populator, can be found inpopulator_register-ocf-manifests.md.
Using multiple manifest sources​
You can provide multiple manifest sources by setting overrides using different indexes of the hub-public.populator.manifestsLocations.
For example, for a fresh Capact installation, provide these values as the --capact-overrides flag value:
NOTE: All manifest source locations must contain manifests with unique paths. In case of a path conflict, the Populator will fail before populating the Public Hub database.
# First git repository URL
export SOURCE_REPO_1_URL="{url}" # e.g. github.com/capactio/hub-manifests
# The git ref to checkout. It can point to a commit SHA, a branch name, or a tag.
export SOURCE_REPO_1_REF="{ref}" # e.g. main
# Second git repository URL
export SOURCE_REPO_2_URL="{url}" # e.g. git@example.com/extra-manifests-repo.git
export SOURCE_REPO_2_REF="{ref}" # e.g. main
capact install --capact-overrides="hub-public.populator.enabled=true,hub-public.populator.manifestsLocations[0].repository=${SOURCE_REPO_1_URL},hub-public.populator.manifestsLocations[0].branch=${SOURCE_REPO_1_REF},hub-public.populator.manifestsLocations[1].repository=${SOURCE_REPO_2_URL},hub-public.populator.manifestsLocations[1].branch=${SOURCE_REPO_2_REF}"
Submit manifest to the community repository​
Any type of contribution is welcome! To start contributing, follow these steps:
- Set up a local
hub-manifestsrepository. - Create a pull request in our Hub Manifests repository.