Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cluster setup documentation #308

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/end-to-end-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The following will be covered in this demo:
> ```

## Setting up a cluster
Reference our [cluster setup documentation](./setting-up-cluster.md) to set up a cluster or adapt your currently existing cluster.
Reference our [cluster setup documentation](./setting-up-cluster.md) to set up a **single-node** cluster or adapt your currently existing cluster. This documentation assumes you are using a single-node cluster, so if installing K3s or MicroK8s, you can skip the last step of the installation instructions.
jiria marked this conversation as resolved.
Show resolved Hide resolved

> Note, if using MicroK8s, enable privileged Pods, as the udev video broker pods run privileged to easily grant them access to video devices. More explicit device access could have been configured by setting the appropriate [security context](udev-configuration.md#setting-the-broker-pod-security-context) in the broker PodSpec in the Configuration.

Expand Down
5 changes: 2 additions & 3 deletions docs/opcua-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ The following steps need to be completed to run the demo:
If at any point in the demo, you want to dive deeper into OPC UA or clarify a term, you can reference the [online OPC UA
specifications](https://reference.opcfoundation.org/v104/).

## Setting up a single-node cluster
Before running Akri, we need a Kubernetes cluster. If you do not have a readily available cluster, follow the steps
provided in the [cluster setup documentation](./setting-up-cluster.md).
## Setting up a cluster
Reference our [cluster setup documentation](./setting-up-cluster.md) to set up a **single-node** cluster or adapt your currently existing cluster. This documentation assumes you are using a single-node cluster, so if installing K3s or MicroK8s, you can skip the last step of the installation instructions.

## Creating X.509 v3 Certificates
**If security is not desired, this section can be skipped, as each monitoring broker will use an OPC UA Security Policy
Expand Down
40 changes: 23 additions & 17 deletions docs/setting-up-cluster.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
# Setting up your cluster
Before deploying Akri, you must have a Kubernetes cluster (v1.16 or higher) running with `kubectl` and `Helm` installed. Akri is Kubernetes native, so it should run on most Kubernetes distributions. All of our end-to-end tests run on vanilla Kubernetes, K3s, and MicroK8s clusters. This documentation will walk through how to set up a cluster using one of those three distributions.
Before deploying Akri, you must have a Kubernetes cluster (v1.16 or higher) running with `kubectl` and `Helm` installed. Akri is Kubernetes native, so it should run on most Kubernetes distributions. This document provides cluster setup instructions for the three Kubernetes distributions that all of our end-to-end tests run on.

>Note: All nodes must be Linux on amd64, arm64v8, or arm32v7.
Please choose **one** of the following:
1. [Set up a K3s cluster](#Option-1-Set-up-a-K3s-cluster)
1. [Set up a MicroK8s cluster](#Option-2-Set-up-a-MicroK8s-cluster)
1. [Set up a standard Kubernetes cluster](#Option-3-Set-up-a-standard-Kubernetes-cluster)

## Set up a standard Kubernetes cluster
1. Reference [Kubernetes documentation](https://kubernetes.io/docs/tasks/tools/) for instructions on how to install Kubernetes.
1. Install Helm for deploying Akri.
```sh
sudo apt install -y curl
curl -L https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
```

> Note: To enable workloads on a single-node cluster, remove the master taint.
> ```sh
> kubectl taint nodes --all node-role.kubernetes.io/master-
> ```
>Note: All nodes must be Linux on amd64, arm64v8, or arm32v7.

## Set up a K3s cluster
## Option 1: Set up a K3s cluster
1. Install [K3s](https://k3s.io/)
```sh
curl -sfL https://get.k3s.io | sh -
Expand Down Expand Up @@ -53,9 +46,9 @@ Before deploying Akri, you must have a Kubernetes cluster (v1.16 or higher) runn
```sh
export AKRI_HELM_CRICTL_CONFIGURATION="--set agent.host.crictl=/usr/local/bin/crictl --set agent.host.dockerShimSock=/run/k3s/containerd/containerd.sock"
```
1. Add nodes to your cluster by running the K3s installation script with the `K3S_URL` and `K3S_TOKEN` environment variables. See [K3s installation documentation](https://rancher.com/docs/k3s/latest/en/quick-start/#install-script) for more details.
1. If desired, add nodes to your cluster by running the K3s installation script with the `K3S_URL` and `K3S_TOKEN` environment variables. See [K3s installation documentation](https://rancher.com/docs/k3s/latest/en/quick-start/#install-script) for more details.

## Set up a MicroK8s cluster
## Option 2: Set up a MicroK8s cluster
1. Install [MicroK8s](https://microk8s.io/docs).
```sh
sudo snap install microk8s --classic --channel=1.19/stable
Expand Down Expand Up @@ -95,4 +88,17 @@ Before deploying Akri, you must have a Kubernetes cluster (v1.16 or higher) runn

export AKRI_HELM_CRICTL_CONFIGURATION="--set agent.host.crictl=/usr/local/bin/crictl --set agent.host.dockerShimSock=/var/snap/microk8s/common/run/containerd.sock"
```
1. To add additional nodes to the cluster, reference [MicroK8's documentation](https://microk8s.io/docs/clustering).
1. If desired, reference [MicroK8's documentation](https://microk8s.io/docs/clustering) to add additional nodes to the cluster.

## Option 3: Set up a standard Kubernetes cluster
1. Reference [Kubernetes documentation](https://kubernetes.io/docs/tasks/tools/) for instructions on how to install Kubernetes.
1. Install Helm for deploying Akri.
```sh
sudo apt install -y curl
curl -L https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
```

> Note: To enable workloads on a single-node cluster, remove the master taint.
> ```sh
> kubectl taint nodes --all node-role.kubernetes.io/master-
> ```