Skip to content

Commit

Permalink
Update documentation for devel
Browse files Browse the repository at this point in the history
Auto-generated from 19bbdd5 by 'update-gh-pages.sh'
  • Loading branch information
Github committed Jun 21, 2023
1 parent b1cf287 commit 52ff0d4
Show file tree
Hide file tree
Showing 36 changed files with 1,518 additions and 864 deletions.
2 changes: 1 addition & 1 deletion devel/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 299a867199261978a71a6c7076261bc0
config: 1dae0d9565992f1b681707cedf4e4d99
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 2 additions & 0 deletions devel/_sources/docs/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Welcome to NRI Plugins documentation
:maxdepth: 2
:caption: Contents:

introduction.md

resource-policy/index.rst

contributing.md
Expand Down
6 changes: 6 additions & 0 deletions devel/_sources/docs/introduction.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Introduction

The NRI plugins is a collection of NRI (Node Resource Interface) based plugins
to manage various aspects of pod and container life cycle.
For example the [resource policy plugins](resource_policies) can be used to modify
the container resource allocation depending on available system resources.
7 changes: 7 additions & 0 deletions devel/_sources/docs/resource-policy/configuration.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Configuration
#############
.. toctree::
:maxdepth: 1

policy/index.rst
node-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Developer's Guide

architecture.md
testing.rst
cpu-allocator.md
9 changes: 3 additions & 6 deletions devel/_sources/docs/resource-policy/index.rst.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.. NRI Resource Policy documentation master file
Resource Policy Plugin
======================
Resource Policy Plugins
=======================

.. toctree::
:maxdepth: 2
Expand All @@ -10,7 +8,6 @@ Resource Policy Plugin
introduction.md
installation.md
setup.md
policy/index.rst
node-agent.md
configuration.rst

developers-guide/index.rst
144 changes: 144 additions & 0 deletions devel/_sources/docs/resource-policy/installation.md.txt
Original file line number Diff line number Diff line change
@@ -1 +1,145 @@
# Installation

This repository hosts a collection of plugins of various types, one of which is the resource
policy plugins. In this example, we will demonstrate the installation process for the topology-aware
plugin, which falls under the resource policy type. The installation methods outlined
here can be applied to any other plugin hosted in this repository, regardless of its type.

Currently, there are two installation methods available.

1. [Helm](#installing-the-helm-chart)
2. [Manual](#manual-installation)

Regardless of the chosen installation method, the NRI plugin installation includes the
following components: DaemonSet, ConfigMap, CustomResourceDefinition, and RBAC-related objects.

## Prerequisites

- Container runtime:
- containerD:
- At least [containerd 1.7.0](https://github.com/containerd/containerd/releases/tag/v1.7.0) release version to use the NRI feature
- Enable NRI feature by following [these](TODO link) detailed instructions.
- CRI-O
- At least [v1.26.0](https://github.com/cri-o/cri-o/releases/tag/v1.26.0) release version to use the NRI feature
- Enable NRI feature by following [these](TODO link) detailed instructions.
- Kubernetes 1.24+
- Helm 3.0.0+

## Installing the Helm Chart

1. Clone the project to your local machine
```sh
git clone https://github.com/containers/nri-plugins.git
```

1. Navigate to the project directory
```sh
cd nri-plugins
```

1. Install the plugin using Helm. Replace release name with the desired name
for your Helm release. In this example, we named it as topology-aware. The
default values for topology-aware resource policy plugin are stored in
values.yaml file. If you wish to provide custom values to the Helm
chart, refer to the [table](#helm-parameters) below, which describes the
available parameters that can be modified before installation.

```sh
helm install topology-aware deployment/helm/resource-management-policies/topology-aware/
```

1. Verify the status of the daemonset to ensure that the plugin is running successfully

```bash
kubectl get daemonset -n kube-system nri-resource-policy

NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
nri-resource-policy 1 1 0 1 0 kubernetes.io/os=linux 4m33s
```

That's it! You have now installed the topology-aware NRI resource policy plugin using Helm.

## Uninstalling the Chart

To uninstall plugin chart just deleting it with the release name is enough:

```bash
helm delete topology-aware
```

Note: this removes DaemonSet, ConfigMap, CustomResourceDefinition, and RBAC-related objects associated with the chart.

### Helm parameters

The tables below present an overview of the parameters available for users to customize with their own values, along
with the default values, for the Topology-aware and Balloons plugins Helm charts.

#### Topology-aware

| Name | Default | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------- |
| `namespace` | kube-system | cpecify the namespace to use for deploying DaemonSet, ConfigMap, CustomResourceDefinition, and RBAC-related objects |
| `image.name` | [ghcr.io/containers/nri-plugins/nri-resource-policy-topology-aware](ghcr.io/containers/nri-plugins/nri-resource-policy-topology-aware) | container image name |
| `image.tag` | unstable | container image tag |
| `image.pullPolicy` | Always | image pull policy |
| `quota.cpu` | 500m | cpu qouta for the Pod |
| `quota.memory` | 512Mi | memory qouta for the Pod |
| `metrics.port` | 8891 | metrics port on the container |
| `metrics.hostPort` | 8891 | metrics port to expose on the host |
| `config` | <pre><code>Active: balloons</code><br><code>ReservedResources:</code><br><code> cpu: 750m</code></pre> | plugin configuration data |

#### Balloons

| Name | Default | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------- |
| `namespace` | kube-system | specify the namespace to use for deploying DaemonSet, ConfigMap, CustomResourceDefinition, and RBAC-related objects |
| `image.name` | [ghcr.io/containers/nri-plugins/nri-resource-policy-balloons](ghcr.io/containers/nri-plugins/nri-resource-policy-balloons) | container image name |
| `image.tag` | unstable | container image tag |
| `image.pullPolicy` | Always | image pull policy |
| `quota.cpu` | 500m | cpu qouta for the Pod |
| `quota.memory` | 512Mi | Memory qouta for the Pod |
| `metrics.port` | 8891 | metrics port on the container |
| `metrics.hostPort` | 8891 | metrics port to expose on the host |
| `config` | <pre><code>Active: topology-aware</code><br><code>ReservedResources:</code><br><code> cpu: 750m</code></pre> | plugin configuration data |

## Manual installation

For the manual installation we will be using templating tool to generate Kubernetes YAML manifests.
1. Clone the project to your local machine
```sh
git clone https://github.com/containers/nri-plugins.git
```

1. Navigate to the project directory
```sh
cd nri-plugins
```

1. If there are any specific configuration values you need to modify, navigate to the plugins [directory](https://github.com/containers/nri-plugins/tree/main/deployment/overlays) containing the Kustomization file and update the desired configuration values according to your environment in the Kustomization file.

1. Use kustomize to generate the Kubernetes manifests for the desired plugin and apply the generated manifests to your Kubernetes cluster using kubectl.

```sh
kustomize build deployment/overlays/topology-aware/ | kubectl apply -f -
```

1. Verify the status of the DaemonSet to ensure that the plugin is running successfully

```bash
kubectl get daemonset -n kube-system nri-resource-policy

NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
nri-resource-policy 1 1 0 1 0 kubernetes.io/os=linux 4m33s
```

That's it! You have now installed the topology-aware NRI resource policy plugin using kutomize.

## Manual uninstallation

To uninstall plugin manifests you can run the following command:

```sh
kustomize build deployment/overlays/topology-aware/ | kubectl delete -f -
```

Note: this removes DaemonSet, ConfigMap, CustomResourceDefinition, and RBAC-related objects associated with the chart.
Loading

0 comments on commit 52ff0d4

Please sign in to comment.