Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Commit

Permalink
adding deployment documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
frankgreco committed Apr 2, 2018
1 parent afe32bf commit 0b630d5
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 56 deletions.
23 changes: 0 additions & 23 deletions hack/helm-up.sh

This file was deleted.

8 changes: 4 additions & 4 deletions helm/kanali/templates/configmap-kanali.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ data:
[plugins.apiKey]
decryption_key_file = "/etc/pki/key.pem"
header_key = {{default "apikey" .Values.kanali.gateway.plugins.apikey.headerKey}}
header_key = {{default "apikey" .Values.kanali.gateway.plugins.apikey.headerKey | quote}}
[process]
log_level = {{default "info" .Values.kanali.logLevel}}
log_level = {{default "info" .Values.kanali.logLevel | quote}}
[profiling]
insecure_port = {{.Values.kanali.profiler.insecurePort}}
Expand All @@ -29,11 +29,11 @@ data:
[proxy]
enable_cluster_ip = true
header_mask_Value = omitted
header_mask_Value = "omitted"
enable_mock_responses = true
upstream_timeout = "0h0m10s"
mask_header_keys = [
{{default "apikey" .Values.kanali.gateway.plugins.apikey.headerKey}}
{{default "apikey" .Values.kanali.gateway.plugins.apikey.headerKey | quote}}
]
tls_common_name_validation = true
Expand Down
16 changes: 0 additions & 16 deletions hugo/content/docs/v2/contributing.md

This file was deleted.

74 changes: 73 additions & 1 deletion hugo/content/docs/v2/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,76 @@ bref= "Learn how to deploy Kanali"
toc = true
+++

### Coming soon
### Helm

> This is the recommended deployment option.
[Helm](https://helm.sh) is a package manager for Kubernetes. Helm makes it easy to deploy all the components of an application and its dependencies.

Kanali's Helm chart can be found [here](https://github.com/northwesternmutual/kanali/tree/master/helm/kanali). Before demonstrating how to use this chart, let's bootstrap a local Kubernetes environment so that you can follow along.

```
# Start a local Kubernetes cluster.
$ minikube start --kubernetes-version=v1.9.4 --feature-gates CustomResourceValidation=true
# Update a potentially stale kubeconfig context.
$ minikube update-context
Kubeconfig IP correctly configured, pointing at 192.168.64.24
# Verify that our cluster is ready.
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready <none> 17h v1.9.4
```

Now that we have have a running cluster, the Kanali Helm chart can be deployed by executing the following commands.

```
# Retrieve a local copy of Kanali. This is necessary because Kanali does not
# yet live in a chart repository.
$ git clone https://github.com/northwesternmutual/kanali.git
# To ensure that Helm has the appropriate permissions to deploy our chart,
# we need to create an RBAC policy and a service account.
$ kubectl apply -f kanali/hack/helm-rbac.yaml
# Bootstrap helm using the service account created in the previous step.
$ helm init --service-account tiller
# One of the optional dependencies for Kanali is Jaeger, whose chart lives in the following repo.
$ helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
# Install any required dependencies.
$ helm dep up kanali/helm/kanali
# Install the Kanali chart (note the relative path to the chart).
$ helm install --name kanali kanali/helm/kanali
```

Kanali is now deployed. Note that the default set of Helm values were used. You will probably want to overwrite some of these values for your deployment. All of the values that you can customize can be found [here](https://github.com/northwesternmutual/kanali/tree/master/helm/kanali). Instructions on how to set your custom values can be found [here](https://docs.helm.sh/developing_charts/#charts).

We can wait for it to complete its bootstrapping process with the following command.

```
$ kubectl rollout status -w deployment/kanali --namespace=default
```

Now that Kanali is ready to be used, we can test our installation with the following command. By default, Kanali will bootstrap itself with a set of self signed certificates which is why our https request is insecure.

```
$ curl --insecure $(minikube service kanali-gateway --url --format="https://{{.IP}}:{{.Port}}")
{
"status": 404,
"message": "No ApiProxy resource was not found that matches the request.",
"code": 0,
"details": "Visit https://kanali.io/docs/v2/errorcodes for more details."
}
```

**Configurations!** You have successfully bootstrapped Kanali using Helm. To learn more, visit the [tutorial](https://kanali.io/tutorial).

### Manual

If you like to deploy Kanali a different way, there are just a few things you need to know.

Kanali's artifact is a [Docker](https://www.docker.com/) image. When starting this container, you will need to specify your own configuration arguments if you would like to overwrite the defaults. This can be accomplished by specifying one or more flags, environment variables and/or configuration file updates. Specific details for these configuration items can be found [here](https://kanali.io/docs/v2/flags).
11 changes: 11 additions & 0 deletions hugo/content/docs/v2/flags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
description = "Configuration flags"
title = "Flags"
date = "2017-04-10T16:43:08+01:00"
draft = false
weight = 100
bref="Configuration flags"
toc = true
+++

### foo
11 changes: 0 additions & 11 deletions hugo/content/docs/v2/quick-start.md

This file was deleted.

11 changes: 11 additions & 0 deletions hugo/content/docs/v2/security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
description = "Securing Kanali"
title = "Security"
date = "2017-04-10T16:43:08+01:00"
draft = false
weight = 100
bref="Securing Kanali"
toc = true
+++

### foo
11 changes: 11 additions & 0 deletions hugo/content/docs/v2/tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
date = "2017-04-10T16:41:16+01:00"
weight = 70
description = "Developer tooling"
title = "Tools"
draft = false
bref = "Developer tooling"
toc = true
+++

### Coming soon
2 changes: 1 addition & 1 deletion pkg/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (e Error) String() string {
}

const (
moreDetails = "Visit https://kanali.io/docs/errorcodes for more details."
moreDetails = "Visit https://kanali.io/docs/v2/errorcodes for more details."
)

var (
Expand Down

0 comments on commit 0b630d5

Please sign in to comment.