forked from harvester/harvesterhci.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31930a5
commit 3749c84
Showing
38 changed files
with
522 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
# Authentication | ||
|
||
> Available as of v0.2.0 | ||
With ISO installation mode, user will be prompted to set the password for the default `admin` user on the first-time login. | ||
|
||
 | ||
|
||
|
||
The Harvester login page is shown below: | ||
|
||
 | ||
|
||
|
||
|
||
## Developer Mode | ||
In `developer mode`, which is intended only for development and testing purposes, more authentication modes are configurable using the environment variable `HARVESTER_AUTHENTICATION_MODE`. | ||
|
||
By default, the Harvester Dashboard uses the `local auth` mode for authentication. The default username and password is `admin/password`. | ||
|
||
The currently supported options are `localUser` (the same as `local auth` mode) and `kubernetesCredentials`. | ||
|
||
If the `kubernetesCredentials` authentication option is used, either a `kubeconfig` file or bearer token can provide access to Harvester. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
sidebar_position: 9 | ||
--- | ||
# Developer Mode Installation (Dev mode) | ||
|
||
Developer mode (dev mode) is intended to be used for testing and development purposes. | ||
|
||
Note: This [video](https://youtu.be/TG0GaAD_6J4) shows the dev mode installation. | ||
|
||
## Requirements | ||
|
||
- For dev mode, it is assumed that Multus is installed across your cluster and a corresponding NetworkAttachmentDefinition CRD was created. | ||
- For dev mode, if you are using an [RKE](https://rancher.com/docs/rke/latest/en/) cluster, please ensure the `ipv4.ip_forward` is enabled for the CNI plugin so that the pod network works as expected. [#94](https://github.com/harvester/harvester/issues/94). | ||
|
||
## Install as an App | ||
Harvester can be installed on a Kubernetes cluster in the following ways: | ||
|
||
- Install with the [Helm](https://helm.sh/) CLI | ||
- Install as a Rancher catalog app, in which case the [harvester/harvester](https://github.com/harvester/harvester) repo is added to the Rancher Catalog as a Helm `v3` app | ||
|
||
Please refer to the Harvester [Helm chart](../deploy/charts/harvester) for more details on installing and configuring the Helm chart. | ||
|
||
### Requirements | ||
The Kubernetes node must have hardware virtualization support. | ||
|
||
To validate the support, use this command: | ||
|
||
``` | ||
cat /proc/cpuinfo | grep vmx | ||
``` | ||
|
||
### Option 1: Install using Helm | ||
|
||
1. Clone the GitHub repository: | ||
``` | ||
$ git clone https://github.com/harvester/harvester.git --depth=1 | ||
``` | ||
1. Go to the Helm chart: | ||
``` | ||
$ cd harvester/deploy/charts | ||
``` | ||
|
||
1. Install the Harvester chart with the following commands: | ||
|
||
```bash | ||
### To install the chart with the release name `harvester`: | ||
|
||
## Create the target namespace | ||
$ kubectl create ns harvester-system | ||
|
||
## Install the chart to the target namespace | ||
$ helm install harvester harvester \ | ||
--namespace harvester-system \ | ||
--set longhorn.enabled=true,minio.persistence.storageClass=longhorn | ||
``` | ||
|
||
### Option 2: Install using Rancher | ||
|
||
Tip: You can create a testing Kubernetes environment in Rancher using the Digital Ocean cloud provider. For details, see [this section.](#digital-ocean-test-environment) | ||
|
||
1. Add the Harvester repo `https://github.com/harvester/harvester` to your Rancher catalogs by clicking **Global > Tools > Catalogs.** | ||
1. Specify the URL and name. Set the branch to `stable` if you need a stable release version. Set the `Helm version` to be `Helm v3`. | ||
 | ||
1. Click **Create.** | ||
1. Navigate to your project-level `Apps.` | ||
1. Click `Launch` and choose the Harvester app. | ||
1. (Optional) You can modify the configurations if needed. Otherwise, use the default options. | ||
1. Click **Launch** and wait for the app's components to be ready. | ||
1. Click the `/index.html` link to navigate to the Harvester UI: | ||
 | ||
|
||
### Digital Ocean Test Environment | ||
|
||
[Digital Ocean](https://www.digitalocean.com/) is one of the cloud providers who support nested virtualization by default. | ||
|
||
You can create a testing Kubernetes environment in Rancher using the Digital Ocean cloud provider. | ||
|
||
We recommend using the `8 core, 16 GB RAM` node, which will have nested virtualization enabled by default. | ||
|
||
This screenshot shows how to create a Rancher node template that would allow Rancher to provision such a node in Digital Ocean: | ||
|
||
 | ||
|
||
For more information on how to launch Digital Ocean nodes with Rancher, refer to the [Rancher documentation.](https://rancher.com/docs/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/digital-ocean/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
sidebar_position: 7 | ||
--- | ||
# Introduction of The Harvester network | ||
|
||
## Table of Contents | ||
* [Summary](#summary) | ||
* [Implementation](#implementation) | ||
* [Management Network](#management-network) | ||
* [VLAN](#vlan) | ||
* [Enabling VLAN in the Harvester UI](#enabling-vlan-in-the-harvester-ui) | ||
|
||
|
||
## Summary | ||
[Harvester](https://github.com/harvester/harvester) is built on Kubernetes, which uses [CNI](https://github.com/containernetworking/cni) as an interface between network providers and Kubernetes pod networking. Naturally, we implement the Harvester network based on CNI. Moreover, the [Harvester UI](https://github.com/harvester/harvester-ui) integrates the Harvester network to provide a user-friendly way to configure networks for VMs. | ||
|
||
By version 0.2, Harvester supports two kinds of networks: | ||
|
||
- management network | ||
- [VLAN](https://en.wikipedia.org/wiki/Virtual_LAN) | ||
|
||
## Implementation | ||
|
||
### Management Network | ||
|
||
Harvester adopts [flannel](https://github.com/flannel-io/flannel) as the default CNI to implement the management network. It's an internal network, which means the user can only access the VM's management network within its cluster nodes or pods. | ||
|
||
### VLAN | ||
|
||
[Harvester network-controller](https://github.com/harvester/harvester-network-controller) leverages the [multus](https://github.com/k8snetworkplumbingwg/multus-cni) and [bridge](https://www.cni.dev/plugins/current/main/bridge/) CNI plugins to implement the VLAN. | ||
|
||
Below is a use case of the VLAN in Harvester. | ||
|
||
 | ||
|
||
- Harvester network-controller uses a bridge for a node and a pair of veth for a VM to implement the VLAN. The bridge acts as a switch to forward the network traffic from or to VMs and the veth pair is like the connected ports between vms and switch. | ||
- VMs within the same VLAN is able to communicate with each other, while the VMs within different VLANs can't. | ||
- The external switch ports connected with the hosts or other devices(such as DHCP server) should be set as trunk or hybrid type and permit the specified VLANs. | ||
- Users can use VLAN with `PVID` (default 1) to communicate with any normal untagged traffic. | ||
|
||
## Enabling VLAN in the Harvester UI | ||
|
||
Enable VLAN via going to **Setting > vlan** to enable VLAN and input a valid default physical NIC name for the VLAN. | ||
|
||
The first physical NIC name of each Harvester node always defaults to eth0. It is recommended to choose a separate NIC for the VLAN other than the one used for the management network (the one selected during the Harvester installation) for better network performance and isolation. | ||
|
||
Note: Modifying the default VLAN network setting will not change the existing configured host networks. | ||
|
||
 | ||
|
||
- (optional) Users can always customize each node's VLAN network configuration via going to the **HOST > Network** tab. | ||
|
||
 | ||
|
||
- A new VLAN network is created by going to the **Advanced > Networks** page and clicking the **Create** button. | ||
|
||
 | ||
|
||
- The network is configured when the VM is created. | ||
|
||
- Only the first network interface card will be enabled by default. Users can either choose to use a management network or VLAN network. Note: You will need to select the `Install guest agent` option in the `Advanced Options` tab to get the VLAN network IP address from the Harvester UI. | ||
|
||
 | ||
|
||
- Users can choose to add one or multiple network interface cards. Additional network interface card configurations can be set via cloud-init network data, e.g.: | ||
|
||
```YAML | ||
version: 1 | ||
config: | ||
- type: physical | ||
name: enp1s0 # name is varies upon OS image | ||
subnets: | ||
- type: dhcp | ||
- type: physical | ||
name: enp2s0 | ||
subnets: | ||
- type: DHCP | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
# Import Images | ||
|
||
To import virtual machine images in the **Images** page, enter a URL that can be accessed from the cluster. Note: The image name will be auto-filled using the URL address's filename. You can always customize it when required. | ||
|
||
Currently, we support qcow2, raw, and ISO images. | ||
|
||
> Note: uploading images from UI to the Harvester cluster is not supported yet. The feature request is being tracked on [#570](https://github.com/harvester/harvester/issues/570). | ||
Description and labels are optional. | ||
|
||
 |
3 changes: 3 additions & 0 deletions
3
docs/harvester-configuration.md → docs/installation/harvester-configuration.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Rancher Intergration", | ||
"position": 8 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
# Harvester Node Driver | ||
|
||
The Harvester node driver is used to provision VMs in the Harvester cluster. In this section, you'll learn how to configure Rancher to use the Harvester node driver to launch and manage Kubernetes clusters. | ||
|
||
A node driver is the same as a [Docker Machine driver](https://docs.docker.com/machine/drivers/), and the project repo is available at [harvester/docker-machine-driver-harvester](https://github.com/harvester/docker-machine-driver-harvester). | ||
|
||
> Available as of v0.2.0 | ||
## Add Harvester Node Driver | ||
|
||
### ISO Mode | ||
|
||
In the ISO mode, the Harvester driver has been installed by default, and the user does not need to add it manually. | ||
|
||
### App Mode | ||
1. Navigate to the **Rancher** UI. | ||
1. From the **Global** view, choose **Tools > Drivers** in the navigation bar. From the **Drivers** page, select the **Node Drivers** tab. In versions before v2.2.0, you can select **Node Drivers** directly in the navigation bar. | ||
1. Click **Add Node Driver**. | ||
1. Enter **Download URL**([docker-machine-driver-harvester](https://github.com/harvester/docker-machine-driver-harvester/releases)) and **Custom UI URL**([ui-driver-harvester](https://github.com/harvester/ui-driver-harvester/releases)). | ||
1. Add domains to the **Whitelist Domains**. | ||
1. Click **Create**. | ||
|
||
## Create Cluster | ||
|
||
Now users can access the Rancher UI from Harvester, spin up Kubernetes clusters on top of the Harvester cluster, and manage them there. | ||
> Prerequisite: VLAN network is required for Harvester node driver | ||
1. From the **Global** view, click **Add Cluster**. | ||
1. Click **Harvester**. | ||
1. Select a [Template](#create-node-template). | ||
1. Fill out the rest of the form for creating a cluster. | ||
1. Click **Create**. | ||
|
||
See [launching kubernetes and provisioning nodes in an infrastructure provider](https://rancher.com/docs/rancher/v2.5/en/cluster-provisioning/#launching-kubernetes-and-provisioning-nodes-in-an-infrastructure-provider) for more info. | ||
|
||
## Create Node Template | ||
You can use the Harvester node driver to create node templates and eventually node pools for your Kubernetes cluster. | ||
|
||
1. Configure **Account Access**. For Harvester embedding Rancher, you can choose **Internal Harvester**, which will use the `harvester.harvester-system` as the default `Host`, `8443` as the default `Port`. | ||
1. Configure **Instance Options** | ||
* Configure the CPU, memory, disk, and disk bus. | ||
* Select an OS image that is compatible with the `cloud-init` config. | ||
* Select a network that the node driver is able to connect to, currently only `VLAN` is supported. | ||
* Enter the SSH User, the username will be used to ssh to nodes. For example, a default user of the Ubuntu cloud image will be `ubuntu`. | ||
1. Enter a **RANCHER TEMPLATE** name. | ||
|
||
See [nodes hosted by an infrastructure provider](https://rancher.com/docs/rancher/v2.5/en/cluster-provisioning/rke-clusters/node-pools/) for more info. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
# Rancher Integration | ||
|
||
> Available as of v0.2.0 | ||
[Rancher](https://github.com/rancher/rancher) is an open source multi-cluster management platform. Harvester has integrated Rancher into its HCI mode installation by default. | ||
|
||
## Enable Rancher Dashboard | ||
|
||
Users can enable the Rancher dashboard by going to the Harvester `Settings` page. | ||
|
||
1. Click the actions of the `rancher-enabled` setting. | ||
1. Select the `Enable` option and click the save button. | ||
1. On the top-right corner the Rancher dashboard button will appear. | ||
1. Click the Rancher button, and it will open a new tab to navigate to the Rancher dashboard. | ||
|
||
For more detail about how to use the Rancher, you may refer to this [doc](https://rancher.com/docs/rancher/v2.5/en/). | ||
|
||
|
||
|
||
# Creating K8s Clusters using the Harvester Node Driver | ||
|
||
Harvester node driver is used to provision VMs in the Harvester cluster, which Rancher uses to launch and manage Kubernetes clusters. | ||
|
||
In the ISO mode, the Harvester driver has been added by default. Users can reference this [doc](./node-driver.md) for more details. |
Oops, something went wrong.