Skip to content

Commit

Permalink
Prepare chart for publishing and add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
taylanisikdemir authored Sep 18, 2024
2 parents a56fb3d + d55fb06 commit ab8439a
Show file tree
Hide file tree
Showing 23 changed files with 550 additions and 244 deletions.
Binary file removed .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cadencechart-*.tgz
.DS_Store
template_out.yaml
78 changes: 78 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# CONTRIBUTING

## Build and generate template yml locally

```
helm package ./charts/cadence
helm template cadence-release cadencechart-0.1.0.tgz > template_out.yaml
```

## Build and deploy to a k8s cluster

```
helm package ./charts/cadence
helm upgrade --install cadence-release cadencechart-0.1.0.tgz \
-n cadencetest \
--create-namespace
```

Port forward to check the UI
```
kubectl port-forward svc/cadence-web-service 8088:8088 -n cadencetest
```

Port forward frontend service to run CLI commands
```
kubectl port-forward svc/cadence-frontend 7933:7933 -n cadencetest
```

Register domain:
```
cadence --address localhost:7933 \
--env development \
--domain samples-domain domain register
```

Run samples:
1. Clone https://github.com/uber-common/cadence-samples

2. Change host in config/development.yaml
```
host: "localhost:7833"
```

3. Port forward to frontend on 7833
```
kubectl port-forward svc/cadence-frontend-headless 7833:7833 -n cadencetest
```

4. Run sample worker (run at samples repo root)
```
./bin/helloworld -m worker
```

5. Trigger a workflow (run at samples repo root)
```
./bin/helloworld -m trigger
```

Visit localhost:8088 and validate the new workflow exists!

## Generate helmdocs

Install [helm-docs](https://github.com/norwoodj/helm-docs):
```
go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
```

Run it
```
helm-docs
```

cadencechart/README.md file should be updated.


## Publish chart

Cadence chart is hosted on github pages and automation is done using [Chart Releaser Action](https://helm.sh/docs/howto/chart_releaser_action/).
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Cadence Charts

This repo contains Cadence helm chart maintained by original Cadence team @Uber.
This is an early version with known gaps and not production ready yet. Please create an issue explaining your use case and what you would want us to prioritize.

**What is included:**
- Cadence backend services as separate deployments: frontend, history, matching, worker
- An ephemeral Cassandra instance

**What is missing:**
- Support for advanced visibility store such as Elasticsearch/Pinot
- Support for databases other than Cassandra
- Metrics integration with Prometheus
- Custom annotations/labels/tolerations/security context etc.
- Support for ingress

## Usage

[Helm](https://helm.sh) must be installed to use the charts. Please refer to
Helm's [documentation](https://helm.sh/docs) to get started.

Once Helm has been set up correctly, add the repo as follows:

helm repo add cadence https://uber.github.io/cadence-charts

If you had already added this repo earlier, run `helm repo update` to retrieve
the latest versions of the packages. You can then run `helm search repo
cadence` to see the charts.

To install the cadence chart:

helm install my-cadence cadence/cadence

To uninstall the chart:

helm delete my-cadence
Binary file removed cadencechart/.DS_Store
Binary file not shown.
13 changes: 0 additions & 13 deletions cadencechart/templates/_helpers.tpl

This file was deleted.

14 changes: 0 additions & 14 deletions cadencechart/templates/server-configmap.yaml

This file was deleted.

99 changes: 0 additions & 99 deletions cadencechart/templates/server-deployment.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions cadencechart/templates/server-service.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions cadencechart/values.yaml

This file was deleted.

7 changes: 3 additions & 4 deletions cadencechart/Chart.yaml → charts/cadence/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: cadencechart
description: A Helm chart for Kubernetes
name: cadence
description: Cadence Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -21,5 +21,4 @@ version: 0.1.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

appVersion: "0.0.1"
File renamed without changes.
Loading

0 comments on commit ab8439a

Please sign in to comment.