Skip to content

Commit

Permalink
doc: fix markdown issues (#416)
Browse files Browse the repository at this point in the history
* heading levels should not skip a level
* don't put leading $ on commands (prevents copy/paste)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
  • Loading branch information
dbkinder authored Sep 11, 2024
1 parent 267d828 commit a339a87
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 29 deletions.
11 changes: 5 additions & 6 deletions kubernetes-addons/Observability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This guide provides a step-by-step approach to setting up observability for the OPEA workload in a Kubernetes environment. We will cover the setup of Prometheus and Grafana, as well as the collection of metrics for Gaudi hardware, OPEA/chatqna including TGI,TEI-Embedding,TEI-Reranking and other microservies, and PCM.

#### Prepare
## Prepare

```
git clone https://github.com/opea-project/GenAIInfra.git
Expand All @@ -22,19 +22,19 @@ helm repo update
helm install prometheus-stack prometheus-community/kube-prometheus-stack --version 55.5.1 -n monitoring
```

### Step 2: Verify the installation:
### Step 2: Verify the installation

```
kubectl get pods -n monitoring
```

### Step 3: Port-forward to access Grafana:
### Step 3: Port-forward to access Grafana

```
kubectl port-forward service/grafana 3000:80
```

### Step 4: Access Grafana:
### Step 4: Access Grafana

Open your browser and navigate to http://localhost:3000. Use "admin/prom-operator" as the username and the password to login.

Expand Down Expand Up @@ -108,8 +108,7 @@ Refer to the [ChatQnA helm chart](https://github.com/opea-project/GenAIInfra/tre

### Step 2: Install all the serviceMonitor

###### NOTE:

> NOTE:
> If the chatQnA installed into another instance instead of chatqna(Default instance name),you should modify the
> matchLabels app.kubernetes.io/instance:${instanceName} with proper instanceName
Expand Down
46 changes: 23 additions & 23 deletions kubernetes-addons/memory-bandwidth-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ The memory bandwidth exporter currently only supports Intel platforms with RDT,

```sh
# download containerd binary, containerd version v1.7.0 or higher is required
$ wget https://github.com/containerd/containerd/releases/download/v1.7.0/containerd-1.7.0-linux-amd64.tar.gz
wget https://github.com/containerd/containerd/releases/download/v1.7.0/containerd-1.7.0-linux-amd64.tar.gz

# stop running containerd
$ sudo systemctl stop containerd
sudo systemctl stop containerd

# replace old containerd
$ sudo tar Cxzvf /usr/local containerd-1.7.0-linux-amd64.tar.gz
sudo tar Cxzvf /usr/local containerd-1.7.0-linux-amd64.tar.gz

# enable NRI in containerd
# add an item in /etc/containerd/config.toml
Expand All @@ -31,48 +31,48 @@ $ sudo tar Cxzvf /usr/local containerd-1.7.0-linux-amd64.tar.gz
config_file = "/etc/nri/nri.conf"

# restart containerd
$ sudo systemctl start containerd
$ sudo systemctl status containerd
sudo systemctl start containerd
sudo systemctl status containerd

# test nri
$ git clone https://github.com/containerd/nri
$ cd nri
$ make
$ ./build/bin/logger -idx 00
git clone https://github.com/containerd/nri
cd nri
make
./build/bin/logger -idx 00
```

### Enable RDT

Mount resctrl to the directory `/sys/fs/resctrl`:

```sh
$ sudo mount -t resctrl resctrl /sys/fs/resctrl
sudo mount -t resctrl resctrl /sys/fs/resctrl
```

### Setup memory bandwidth exporter

Before setup, you need to configure the runc hook:

```sh
$ ./config/config.sh
./config/config.sh
```

#### How to build the binary and setup?

```sh
$ make build
$ sudo ./bin/memory-bandwidth-exporter
make build
sudo ./bin/memory-bandwidth-exporter
# e.g., sudo ./bin/memory-bandwidth-exporter --collector.node.name=<node_name> --collector.container.namespaceWhiteList="calico-apiserver,calico-system,kube-system,tigera-operator"

# get memory bandwidth metrics
$ curl http://localhost:9100/metrics
curl http://localhost:9100/metrics
```

#### How to build the docker image and setup?

```sh
$ make docker.build
$ sudo docker run \
make docker.build
sudo docker run \
-e NODE_NAME=<node_name> \
-e NAMESPACE_WHITELIST="calico-apiserver,calico-system,kube-system,tigera-operator" \
--mount type=bind,source=/etc/containers/oci/hooks.d/,target=/etc/containers/oci/hooks.d/ \
Expand All @@ -87,19 +87,19 @@ $ sudo docker run \
opea/memory-bandwidth-exporter:latest

# get memory bandwidth metrics
$ curl http://localhost:9100/metrics
curl http://localhost:9100/metrics
```

#### How to deploy on the K8s cluster?

Build and push your image to the location specified by `MBE_IMG`, and apply manifest:

```sh
$ make docker.build docker.push MBE_IMG=<some-registry>/opea/memory-bandwidth-exporter:<tag>
$ make change_img MBE_IMG=<some-registry>/opea/memory-bandwidth-exporter:<tag>
make docker.build docker.push MBE_IMG=<some-registry>/opea/memory-bandwidth-exporter:<tag>
make change_img MBE_IMG=<some-registry>/opea/memory-bandwidth-exporter:<tag>
# If namespace system does not exist, create it.
$ kubectl create ns system
$ kubectl apply -f config/manifests/memory-bandwidth-exporter.yaml
kubectl create ns system
kubectl apply -f config/manifests/memory-bandwidth-exporter.yaml
```

Check the installation result:
Expand All @@ -113,13 +113,13 @@ memory-bandwidth-exporter-zxhdl 1/1 Running 0 3m
get memory bandwidth metrics

```sh
$ curl http://<memory_bandwidth_exporter_container_ip>:9100/metrics
curl http://<memory_bandwidth_exporter_container_ip>:9100/metrics
```

#### How to delete binary?

```sh
$ make clean
make clean
```

## More flags about memory bandwidth exporter
Expand Down

0 comments on commit a339a87

Please sign in to comment.