Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
Co-authored-by: Dave Walter <walterda@vmware.com>
  • Loading branch information
gcapizzi and davewalter committed Dec 20, 2022
1 parent f905566 commit bdd180b
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 23 deletions.
40 changes: 36 additions & 4 deletions INSTALL.EKS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
> **Warning**
> Make sure you are using the correct version of these instructions by using the link in the release notes for the version you're trying to install. If you're not sure, check our [latest release](https://github.com/cloudfoundry/korifi/releases/latest).
# Installing Korifi on a New Amazon EKS Cluster

This document integrates our [install instructions](./INSTALL.md) with specific tips to install Korifi on [Amazon EKS](https://aws.amazon.com/eks/) using [ECR](https://aws.amazon.com/ecr/).

## Prerequisites

* Tools:
On top of the [common prerequisites](./INSTALL.md#prerequisites), you will need:
* [`aws`](https://docs.aws.amazon.com/cli)
* [`eksctl`](https://github.com/weaveworks/eksctl)

## Initial setup

Make sure you have followed the [common initial setup](./INSTALL.md#initial-setup) first.

The following environment variables will be needed throughout this guide:

* `CLUSTER_NAME`: the name of the EKS cluster to create/use.
Expand Down Expand Up @@ -225,7 +230,8 @@ The droplets and package repositories will be created on demand by Korifi, on a

## Dependencies

Follow the main instructions.
Follow the [common instructions](./INSTALL.md#dependencies).

After installing the [Kpack dependency](INSTALL.md#kpack), run the following commands to associate the controller service account with the ECR access role:

```sh
Expand All @@ -237,15 +243,15 @@ kubectl -n kpack rollout restart deployment kpack-controller

### Namespace creation

No changes here, follow the instructions.
No changes here, follow the [common instructions](./INSTALL.md#namespace-creation).

### Container registry credentials `Secret`

Skip this section.

## Install Korifi

Use the following helm command to install Korifi:
Use the following Helm command to install Korifi:

```sh
helm install korifi https://github.com/cloudfoundry/korifi/releases/download/v<VERSION>/korifi-<VERSION>.tgz \
Expand All @@ -260,3 +266,29 @@ helm install korifi https://github.com/cloudfoundry/korifi/releases/download/v<V
--set=global.eksContainerRegistryRoleARN="${ECR_ROLE_ARN}" \
--set=kpack-image-builder.builderRepository="${KPACK_BUILDER_REPO}"
```

## Test Korifi

First, let's create a CLI profile for your Korifi admin user:

```sh
aws configure --profile "${CLUSTER_NAME}-cf-admin"
```

At the prompts, specify the Access Key ID and Secreat Access Key:

```
AWS Access Key ID [None]: (use $USER_ACCESS_KEY_ID)
AWS Secret Access Key [None]: (use $USER_SECRET_ACCESS_KEY)
Default region name [None]: (use $AWS_REGION)
Default output format [None]: <enter>
```

Now, we'll need to make sure `kubectl` and `cf` use this newly created profile:

```
export AWS_PROFILE="${CLUSTER_NAME}-cf-admin"
```

You can now follow the [common instructions](./INSTALL.md#test-korifi).
When running `cf login`, make sure you select the entry associated with your EKS cluster.
41 changes: 22 additions & 19 deletions INSTALL.kind.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@

This document integrates our [install instructions](./INSTALL.md) with specific tips to install Korifi locally using [kind](https://kind.sigs.k8s.io/).

## Cluster creation
## Initial setup

Export the following environment variables:

```sh
ROOT_NAMESPACE="cf"
KORIFI_NAMESPACE="korifi-system"
ADMIN_USERNAME="kubernetes-admin"
BASE_DOMAIN="apps-127-0-0-1.nip.io"
```

`apps-127-0-0-1.nip.io` will conveniently resolve to `127.0.0.1` using [nip.io](https://nip.io/), which is exactly what we need.

### Cluster creation

In order to access the Korifi API, we'll need to [expose the cluster ingress locally](https://kind.sigs.k8s.io/docs/user/ingress/). To do it, create your kind cluster using a command like this:

Expand All @@ -25,34 +38,23 @@ nodes:
EOF
```

## Initial setup

Export the following environment variables:

```sh
export ROOT_NAMESPACE="cf"
export KORIFI_NAMESPACE="korifi-system"
export ADMIN_USERNAME="kubernetes-admin"
export BASE_DOMAIN="apps-127-0-0-1.nip.io"
```

`apps-127-0-0-1.nip.io` will conveniently resolve to `127.0.0.1` using [nip.io](https://nip.io/), which is exactly what we need.

## Container registry
### Container registry

We recommend you use [DockerHub](https://hub.docker.com/) as your container registry.

## Dependencies

No changes here, follow the instructions.
No changes here, follow the [common instructions](./INSTALL.md#dependencies).

## Pre-install configuration

No changes here. For the container registry credentials `Secret`, we recommend you [create an access token](https://hub.docker.com/settings/security?generateToken=true) on DockerHub.
No changes here, follow the [common instructions](./INSTALL.md#pre-install-configuration).
For the container registry credentials `Secret`, we recommend you [create an access token](https://hub.docker.com/settings/security?generateToken=true) on DockerHub.

## Install Korifi

No changes here. If using DockerHub as recommended above, set the following values:
No changes here, follow the [common instructions](./INSTALL.md#install-korifi).
If using DockerHub as recommended above, set the following values:

- `api.packageRepository`: `index.docker.io/<username>/packages`;
- `kpack-image-builder.builderRepository`: `index.docker.io/<username>/kpack-builder`;
Expand All @@ -66,4 +68,5 @@ Yon can skip this section.

## Test Korifi

No changes here, follow the instructions. When running `cf login`, make sure you select the entry associated to your kind cluster (`kind-kind` by default).
No changes here, follow the [common instructions](./INSTALL.md#test-korifi).
When running `cf login`, make sure you select the entry associated to your kind cluster (`kind-kind` by default).

0 comments on commit bdd180b

Please sign in to comment.