Skip to content

Commit

Permalink
Update developer documentation (#462)
Browse files Browse the repository at this point in the history
* Update developer documentation

* Fix make test

* Add Tiller info in chart readme

* Tiller instance

* apply feedback
  • Loading branch information
migmartri authored and prydonius committed Aug 9, 2018
1 parent 3eb28b7 commit 88344aa
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 31 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ $(EMBEDDED_STATIC): static/kubeapps-objs.yaml
GOOS= $(GO) build -o statik ./vendor/github.com/rakyll/statik/statik.go
$(GO) generate

# Deprecated, will be removed in future releases
kubeapps: $(EMBEDDED_STATIC)
$(GO) build -o $(BINARY) $(GO_FLAGS) $(IMPORT_PATH)

# TODO(miguel) Create Makefiles per component
kubeapps/%:
docker build -t kubeapps/$*:$(VERSION) -f cmd/$*/Dockerfile .

Expand All @@ -41,6 +43,7 @@ test: $(EMBEDDED_STATIC)

test-all: test-kubeapps test-chartsvc test-chart-repo test-apprepository-controller test-dashboard

# Deprecated
test-kubeapps:
$(GO) test -v $(IMPORT_PATH)

Expand Down
30 changes: 30 additions & 0 deletions chart/kubeapps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,36 @@ apprepository:
EOF
$ helm install --name kubeapps --namespace kubeapps bitnami/kubeapps -f custom-values.yaml
```
### Configuring connection to a custom namespace Tiller instance

By default, Kubeapps connects to the Tiller Service in the `kube-system` namespace, the default install location for Helm.

If your instance of Tiller is running in a different namespace or you want to have different instances of Kubeapps connected to different Tiller instances, you can achieve it by setting `tillerProxy.host`:

```console
helm install \
--set tillerProxy.host=tiller-deploy.my-custom-namespace:44134 \
bitnami/kubeapps
```

### Configuring connection to a secure Tiller instance

In production, we strongly recommend setting up a [secure installation of Tiller](https://docs.helm.sh/using_helm/#using-ssl-between-helm-and-tiller), the Helm server side component.

In this case, set the following values to configure TLS:

```console
helm install \
--tls --tls-ca-cert ca.cert.pem --tls-cert helm.cert.pem --tls-key helm.key.pem \
--set tillerProxy.tls.verify=true \
--set tillerProxy.tls.ca="$(cat ca.cert.pem)" \
--set tillerProxy.tls.key="$(cat helm.key.pem)" \
--set tillerProxy.tls.cert="$(cat helm.cert.pem)" \
bitnami/kubeapps
```

Learn more about how to secure your Kubeapps installation [here](https://github.com/kubeapps/kubeapps/blob/master/docs/user/securing-kubeapps.md).


### Exposing Externally

Expand Down
6 changes: 0 additions & 6 deletions docs/developer/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# The Kubeapps Components

### Kubeapps installer

The Kubeapps installer is a command-line tool for installing, upgrading and uninstalling the Kubeapps in-cluster components. The tool is written using the Go programming language and the Kubernetes manifests are written in the Jsonnet data templating language.

Please refer to the [Kubeapps Installer Developer Guide](kubeapps.md) for the developer setup.

### Kubeapps dashboard

The dashboard is the main UI component of the Kubeapps project. Written in Javascript, the dashboard uses the React Javascript library for the frontend.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/apprepository-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cd $KUBEAPPS_DIR/cmd/apprepository-controller

### Install Kubeapps in your cluster

Kubeapps is a Kubernetes-native application. To develop and test Kubeapps components we need a Kubernetes cluster with Kubeapps already installed. Follow the [Kubeapps installation guide](../user/install.md) to install Kubeapps in your cluster.
Kubeapps is a Kubernetes-native application. To develop and test Kubeapps components we need a Kubernetes cluster with Kubeapps already installed. Follow the [Kubeapps installation guide](../../chart/kubeapps/README.md) to install Kubeapps in your cluster.

### Building `apprepository-controller` binary

Expand Down
30 changes: 13 additions & 17 deletions docs/developer/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ cd $KUBEAPPS_DIR

## Build kubeapps

```bash
make VERSION=myver
```

The above command builds the `kubeapps` binary in the current directory. The `VERSION` argument sets build version to `myver ` and when not specified the build date and time is used to generate the version string.

Kubeapps consists of a number of in-cluster components. To build all these components in one go:

```bash
Expand All @@ -55,35 +49,37 @@ make VERSION=myver kubeapps/chart-repo

# to build the kubeapps/apprepository-controller docker image
make VERSION=myver kubeapps/apprepository-controller

# to build the kubeapps/tiller-proxy docker image
make VERSION=myver kubeapps/tiller-proxy
```

## Running tests

```bash
make test
```

The above command runs the tests for the `kubeapps` binary. To run the tests on all Kubeapps components:
To test all the components:

```bash
make test-all
make test
```

Or if you wish to test specific component(s):

```bash
# to test the kubeapps binary
make test test-kubeapps
make test-kubeapps

# to test kubeapps/dashboard
make test test-dashboard
make test-dashboard

# to test the cmd/chartsvc package
make test test-chartsvc
make test-chartsvc

# to test the cmd/chart-repo package
make test test-chart-repo
make test-chart-repo

# to test the cmd/apprepository-controller package
make test test-apprepository-controller
make test-apprepository-controller

# to test the cmd/tiller-proxy package
make test-tiller-proxy
```
2 changes: 1 addition & 1 deletion docs/developer/chartsvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cd $KUBEAPPS_DIR/cmd/chartsvc

### Install Kubeapps in your cluster

Kubeapps is a Kubernetes-native application. To develop and test Kubeapps components we need a Kubernetes cluster with Kubeapps already installed. Follow the [Kubeapps installation guide](../user/install.md) to install Kubeapps in your cluster.
Kubeapps is a Kubernetes-native application. To develop and test Kubeapps components we need a Kubernetes cluster with Kubeapps already installed. Follow the [Kubeapps installation guide](../../chart/kubeapps/README.md) to install Kubeapps in your cluster.

### Building the `chartsvc` binary

Expand Down
2 changes: 1 addition & 1 deletion docs/developer/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cd $KUBEAPPS_DIR/dashboard

### Install Kubeapps in your cluster

Kubeapps is a Kubernetes-native application. To develop and test Kubeapps components we need a Kubernetes cluster with Kubeapps already installed. Follow the [Kubeapps installation guide](../user/install.md) to install Kubeapps in your cluster.
Kubeapps is a Kubernetes-native application. To develop and test Kubeapps components we need a Kubernetes cluster with Kubeapps already installed. Follow the [Kubeapps installation guide](../../chart/kubeapps/README.md) to install Kubeapps in your cluster.

### Running the dashboard in development

Expand Down
2 changes: 2 additions & 0 deletions docs/developer/kubeapps.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Kubeapps Installer Developer Guide

## DEPRECATED: The Kubeapps installer has been deprecated in favor of a Helm Chart installation method, more info [here](../user/migrating-to-v1.0.0-alpha.5.md).

The Kubeapps installer is a command-line tool for installing, upgrading and uninstalling the Kubeapps in-cluster components. The tool is written using the Go programming language and the Kubernetes manifests are written in the Jsonnet data templating language.

## Prerequisites
Expand Down
6 changes: 1 addition & 5 deletions docs/user/securing-kubeapps.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ helm init --tiller-tls --tiller-tls-verify \

This is the command to install Kubeapps with our certificate:

<!--
TODO: Replace install command when the Chart is published in a repository
-->

```
helm install \
--tls --tls-ca-cert ca.cert.pem --tls-cert helm.cert.pem --tls-key helm.key.pem \
Expand All @@ -39,7 +35,7 @@ helm install \
--set tillerProxy.tls.key="$(cat helm.key.pem)" \
--set tillerProxy.tls.cert="$(cat helm.cert.pem)" \
--namespace kubeapps \
./chart/kubeapps
bitnami/kubeapps
```

## Enable RBAC
Expand Down

0 comments on commit 88344aa

Please sign in to comment.