- A working Kubernetes cluster. To follow along with this guide, you should set up Minikube on your machine. Minikube provides a great way to test and experiment around with Kubernetes locally.
kubectlbinary should be installed and in your path on your workstation.
helmbinary should be installed and in your path on your workstation.
1 - Adding the Helm Repository
In order to leverage the deps.cloud Helm charts, you first need to add the deps.cloud stable repository.
$ helm repo add depscloud https://depscloud.github.io/deploy/charts "depscloud" has been added to your repositories $ helm repo update
2 - Deploy the deps.cloud Infrastructure
Once the deps.cloud chart repository has been added, you can install the charts as follows.
$ kubectl create ns depscloud namespace/depscloud created $ helm upgrade -n depscloud -i depscloud depscloud/depscloud Release "depscloud" does not exist. Installing it now. NAME: depscloud LAST DEPLOYED: Sat Jun 20 16:50:57 2020 NAMESPACE: depscloud STATUS: deployed REVISION: 1 TEST SUITE: None
This same command can be used to upgrade the system in the future.
3 - Querying the deps.cloud Infrastructure
Once all processes have completed and are healthy, you should be able to interact with the API pretty easily.
Note that there will be no data in the API until the indexer process has run.
To quickly test this, you can port forward the
$ kubectl port-forward -n depscloud svc/depscloud-gateway 8080:80 Forwarding from 127.0.0.1:8080 -> 8080 Forwarding from [::1]:8080 -> 8080
Once the port is forwarded, the following endpoints should be able to be reached.
- What sources have been indexed?
- What modules are produced by this repository?
- What modules do I depend on and what version?
- What modules depend on me and what version?
- What repositories can produce this module?
4 - Configuring using values.yaml
values.yaml file can be used to maintain deployment specific configuration.
The content below provides an example of how to configure the indexer to crawl the depscloud account.
# contents of values.yaml indexer: config: accounts: - github: clone: strategy: HTTP organizations: - depscloud tracker: storage: driver: sqlite|mysql|postgres address: "" readOnlyAddress: ""
Then during install, you can pass in the
$ helm upgrade -n depscloud -i depscloud depscloud/depscloud -f values.yaml
5 - Optional Installments
The following are optional considerations. You do not need to install them to run the system, but can make managing it easier.
By using an ingress address and controller, you can easily expose the REST API.
apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: namespace: depscloud name: depscloud spec: rules: - host: depscloud.internal.company.net http: paths: - path: / backend: serviceName: depscloud-gateway servicePort: 80
The helm-operator provided by fluxcd is an extremely powerful resource. If provides a way to manage Helm releases within a cluster through custom resource definitions.
apiVersion: helm.fluxcd.io/v1 kind: HelmRelease metadata: namespace: depscloud name: depscloud spec: releaseName: depscloud chart: repository: https://depscloud.github.io/deploy/charts name: depscloud values: indexer: schedule: "@daily" config: accounts: - github: clone: strategy: HTTP organizations: - depscloud
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.