Skip to content

Commit 620d17b

Browse files
authored
Merge pull request #9 from hasura/tskawinski/git-sync-setup
Add additional information regarding git-sync
2 parents 76cf2f4 + 57c2854 commit 620d17b

File tree

4 files changed

+70
-59
lines changed

4 files changed

+70
-59
lines changed

README.md

+57-52
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,58 @@
1-
# DDN Helm Charts
2-
3-
This repository contains Helm charts to help with the deployment of DDN on Kubernetes. This project is currently in active development.
4-
5-
## Get Started
6-
7-
See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation.
8-
9-
### Repository
10-
11-
The Charts are available in a Helm Chart Repository. [Helm](https://helm.sh) must be installed to use these charts.
12-
Please refer to the [official documentation](https://helm.sh/docs/intro/install/) to get started.
13-
14-
```bash
15-
helm repo add hasura-ddn https://hasura.github.io/ddn-helm-charts/
16-
helm repo update
17-
```
18-
19-
You can then see the charts by running:
20-
21-
```bash
22-
helm search repo hasura-ddn
23-
```
24-
25-
> You can change the repo name `hasura-ddn` to another one if getting conflicts.
26-
27-
For more information, have a look at the [Using Helm](https://helm.sh/docs/intro/using_helm/#helm-repo-working-with-repositories) documentation.
28-
29-
### Using git for metadata files
30-
To enable git-sync to read engine and connector config files from a git repository, follow the below steps,
31-
32-
Create a SSH key and grant it *read* access to the repository. It can also be a deploy key, see [set up deploy keys] https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#set-up-deploy-keys
33-
34-
Create a known hosts file, to add GitHub’s SSH host key to your known_hosts file to prevent SSH from asking for confirmation during the connection:
35-
```bash
36-
ssh-keyscan github.com >> ~/.ssh/known_hosts
37-
```
38-
39-
Create a kubernetes secret using the below command,
40-
41-
```bash
42-
kubectl create secret generic git-creds \
43-
--from-file=ssh=~/.ssh/id_rsa \
44-
--from-file=known_hosts=~/.ssh/known_hosts
45-
```
46-
47-
## Contributing
48-
49-
Check out our [contributing guide](./CONTRIBUTING.md) for more details.
50-
51-
## License
52-
1+
# DDN Helm Charts
2+
3+
This repository contains Helm charts to help with the deployment of DDN on Kubernetes. This project is currently in active development.
4+
5+
## Get Started
6+
7+
See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation.
8+
9+
### Repository
10+
11+
The Charts are available in a Helm Chart Repository. [Helm](https://helm.sh) must be installed to use these charts.
12+
Please refer to the [official documentation](https://helm.sh/docs/intro/install/) to get started.
13+
14+
```bash
15+
helm repo add hasura-ddn https://hasura.github.io/ddn-helm-charts/
16+
helm repo update
17+
```
18+
19+
You can then see the charts by running:
20+
21+
```bash
22+
helm search repo hasura-ddn
23+
```
24+
25+
> You can change the repo name `hasura-ddn` to another one if getting conflicts.
26+
27+
For more information, have a look at the [Using Helm](https://helm.sh/docs/intro/using_helm/#helm-repo-working-with-repositories) documentation.
28+
29+
### Using git for metadata files
30+
To enable git-sync to read engine or connector config files from a git repository, follow the below steps.
31+
32+
1. Create a Git repository. Depending on your use case, you can create it as `public` or `private` repo
33+
34+
2. If you create it as a `public` repository and you want to use an `https` based checkout, you have completed your base setup. In other cases, proceed to the next step.
35+
36+
3. Create a SSH key and grant it *read* access to the repository. It can also be a deploy key (See [set up deploy keys](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#set-up-deploy-keys))
37+
38+
4. Create a known hosts file, to add GitHub’s SSH host key to your known_hosts file to prevent SSH from asking for confirmation during the connection:
39+
40+
```bash
41+
ssh-keyscan github.com >> ~/.ssh/known_hosts
42+
```
43+
44+
5. Create a kubernetes secret using the below command
45+
46+
```bash
47+
kubectl create secret generic git-creds \
48+
--from-file=ssh=~/.ssh/id_rsa \
49+
--from-file=known_hosts=~/.ssh/known_hosts
50+
```
51+
52+
## Contributing
53+
54+
Check out our [contributing guide](./CONTRIBUTING.md) for more details.
55+
56+
## License
57+
5358
Resources in this repository are released under the [Apache 2.0 license](./LICENSE).

charts/ndc-connector-oracle/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ helm upgrade --install <release-name> \
3030

3131
Follow the pre-requisite [here](../../README.md#using-git-for-metadata-files) which has to be done once and deployed on the cluster.
3232

33-
Replace `org`, `repo` placeholders in the below command to suit your git repository. Additionally, ensure that `connectorEnvVars.configDirectory` is set to the given path below, providing that you are also replacing `repo` and `connector-name` placeholders within it. For clarity, `connector-name` is the name that was give to your connector (ie. Check `app/connector` under your Supergraph).
33+
Replace `git_domain`, `org` and `repo` placeholders in the below command to suit your git repository. Additionally, ensure that `connectorEnvVars.configDirectory` is set to the given path below, providing that you are also replacing `repo` and `connector-name` placeholders within it. For clarity, `connector-name` is the name that was give to your connector (ie. Check `app/connector` under your Supergraph).
34+
35+
Note: For `https` based checkout, a typical URL format for `initContainers.gitSync.repo` will be `https://<git_domain>/<org>/<repo>`. For `ssh` based checkout, a typical URL format will be `git@<git_domain>:<org>/<repo>`
3436

3537
```bash
3638
helm upgrade --install <release-name> \
@@ -39,7 +41,7 @@ helm upgrade --install <release-name> \
3941
--set image.tag="my_custom_image_tag" \
4042
--set connectorEnvVars.JDBC_URL="jdbc_url" \
4143
--set initContainers.gitSync.enabled="true" \
42-
--set initContainers.gitSync.repo="git@github.com:<org>/<repo>" \
44+
--set initContainers.gitSync.repo="git@<git_domain>:<org>/<repo>" \
4345
--set initContainers.gitSync.branch="main" \
4446
--set connectorEnvVars.configDirectory="/work-dir/<repo>/app/connector/<connector-name>" \
4547
hasura-ddn/ndc-connector-oracle

charts/ndc-mongodb/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ helm upgrade --install <release-name> \
2626
hasura-ddn/ndc-mongodb
2727
```
2828

29-
## Enabling git-sync
29+
## Deployment option via git-sync
3030

3131
Follow the pre-requisite [here](../../README.md#using-git-for-metadata-files) which has to be done once and deployed on the cluster.
3232

33-
Replace `org`, `repo` placeholders in the below command to suit your git repository. Additionally, ensure that `connectorEnvVars.configDirectory` is set to the given path below, providing that you are also replacing `repo` and `connector-name` placeholders within it. For clarity, `connector-name` is the name that was give to your connector (ie. Check `app/connector` under your Supergraph).
33+
Replace `git_domain`, `org` and `repo` placeholders in the below command to suit your git repository. Additionally, ensure that `connectorEnvVars.configDirectory` is set to the given path below, providing that you are also replacing `repo` and `connector-name` placeholders within it. For clarity, `connector-name` is the name that was give to your connector (ie. Check `app/connector` under your Supergraph).
34+
35+
Note: For `https` based checkout, a typical URL format for `initContainers.gitSync.repo` will be `https://<git_domain>/<org>/<repo>`. For `ssh` based checkout, a typical URL format will be `git@<git_domain>:<org>/<repo>`
3436

3537
```bash
3638
helm upgrade --install <release-name> \
@@ -39,7 +41,7 @@ helm upgrade --install <release-name> \
3941
--set image.tag="my_custom_image_tag" \
4042
--set connectorEnvVars.MONGODB_DATABASE_URI="db_connection_string" \
4143
--set initContainers.gitSync.enabled="true" \
42-
--set initContainers.gitSync.repo="git@github.com:<org>/<repo>" \
44+
--set initContainers.gitSync.repo="git@<git_domain>:<org>/<repo>" \
4345
--set initContainers.gitSync.branch="main" \
4446
--set connectorEnvVars.configDirectory="/work-dir/<repo>/app/connector/<connector-name>" \
4547
hasura-ddn/ndc-mongodb

charts/ndc-postgres/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ helm upgrade --install <release-name> \
3030

3131
Follow the pre-requisite [here](../../README.md#using-git-for-metadata-files) which has to be done once and deployed on the cluster.
3232

33-
Replace `org`, `repo` placeholders in the below command to suit your git repository. Additionally, ensure that `connectorEnvVars.configDirectory` is set to the given path below, providing that you are also replacing `repo` and `connector-name` placeholders within it. For clarity, `connector-name` is the name that was give to your connector (ie. Check `app/connector` under your Supergraph).
33+
Replace `git_domain`, `org` and `repo` placeholders in the below command to suit your git repository. Additionally, ensure that `connectorEnvVars.configDirectory` is set to the given path below, providing that you are also replacing `repo` and `connector-name` placeholders within it. For clarity, `connector-name` is the name that was give to your connector (ie. Check `app/connector` under your Supergraph).
34+
35+
Note: For `https` based checkout, a typical URL format for `initContainers.gitSync.repo` will be `https://<git_domain>/<org>/<repo>`. For `ssh` based checkout, a typical URL format will be `git@<git_domain>:<org>/<repo>`
3436

3537
```bash
3638
helm upgrade --install <release-name> \
@@ -39,7 +41,7 @@ helm upgrade --install <release-name> \
3941
--set image.tag="my_custom_image_tag" \
4042
--set connectorEnvVars.CONNECTION_URI="db_connection_string" \
4143
--set initContainers.gitSync.enabled="true" \
42-
--set initContainers.gitSync.repo="git@github.com:<org>/<repo>" \
44+
--set initContainers.gitSync.repo="git@<git_domain>:<org>/<repo>" \
4345
--set initContainers.gitSync.branch="main" \
4446
--set connectorEnvVars.configDirectory="/work-dir/<repo>/app/connector/<connector-name>" \
4547
hasura-ddn/ndc-postgres

0 commit comments

Comments
 (0)