# Jfbus Helm package

## Getting started - Build the helm package

This is the basic helm configuration.
One can verify the configuration using:
```shell
helm lint .
```

To package the helm chart, run:
```shell
helm repo add helm-essentials https://entplus.jfrog.io/artifactory/api/helm/helm-essentials --username $artifactory_user --password $artifactory_password
helm dependency update
helm package .
```

Optional: To push the helm chart to the JFrog Artifactory, run:
```shell
curl -u $artifactory_user:$artifactory_password -T jfbus-<version>.tgz "https://entplus.jfrog.io/artifactory/jfbus-helm-jfbus-local/"

Example:
curl -u $artifactory_user:$artifactory_password -T jfbus-0.0.2.tgz "https://entplus.jfrog.io/artifactory/jfbus-helm-jfbus-local/"
```

# verify
```shell
helm repo add helm-essentials https://entplus.jfrog.io/artifactory/api/helm/helm-essentials --username $artifactory_user --password $artifactory_password
helm search repo jfbus
```


## JFrog Deployment

The following job is used to deploy: https://entplus-rt.jfrogdev.org/job/devops/job/platform/job/mt-services-dev-cell/

We use region dev-aps1 - as we have a dev-db in this region.
DEV_CELL: is the name of the cell, use: jfbus-dev-cell
MT_SERVICE: mt-jfbus

CONFIG_BRANCH / CONFIG_TAG: is the branch/tag of the jfbus-config.

## Jfbus Config
https://github.jfrog.info/projects/JFROG/repos/jfbus-config/browse

This configuration is merged with the helm values to create the final configuration per environment.
Example:
```shell
helm template my-jfbus-release . -f values.yaml -f /Users/igorg/projects/jfbus-config/mt-jfbus/saas-helm-values/values-jfrog-saas.yaml > final.yaml
```

### Relevant Fields
#### mt-jfbus.yaml: 
- <b>ingress_host, domains</b>: Ingress configurations, this will expose the public URL to the world.
- <b>docker_repo_name, docker_repository, app_version</b>: The location of Jfbus image
- <b>chart_version</b>: The version of the helm chart - See build package above.