Skip to content

Commit

Permalink
- Add requirements.txt
Browse files Browse the repository at this point in the history
- Add installation doc
- Reorg dir
- Add technical deep dive section

Signed-off-by: Parul Singh <[email protected]>
  • Loading branch information
husky-parul committed Jul 11, 2023
1 parent 723420e commit 3fd4550
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 84 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Follow https://sustainable-computing.io/ to see documentation
- Python 3.8

```bash
pip install mkdocs
pip install mkdocs-material
pip install -r requirements.txt
```

## Commands
Expand Down
1 change: 1 addition & 0 deletions docs/installation/community-operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Kepler Community Operator on OpenShift
57 changes: 57 additions & 0 deletions docs/installation/kepler-helm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Deploy using Helm Chart

The Kepler Helm Chart is available on [GitHub](https://github.com/sustainable-computing-io/kepler-helm-chart/tree/main) and [ArtifactHub](https://artifacthub.io/packages/helm/kepler/kepler)

For Installation [Helm](https://helm.sh) must be installed to use the charts.
Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.

The chart is accessible using the following commands:

Add the helm repo

```bash
helm repo add kepler https://sustainable-computing-io.github.io/kepler-helm-chart
```

You can see the latest version by using the folllowing command:

```bash
helm search repo kepler
```

If you would like to test and look at the manifest files before deploying you can run:

```bash
helm install kepler kepler/kepler --namespace kepler --create-namespace --dry-run --devel
```

Then to install run the following:

```bash
helm install kepler kepler/kepler --namespace kepler --create-namespace
```

You may want to override [values.yaml](https://github.com/sustainable-computing-io/kepler-helm-chart/blob/main/chart/kepler/values.yaml) file use the following command.

```bash
helm install kepler kepler/kepler --values values.yaml --namespace kepler --create-namespace
```

The following table lists the configurable parameters for this chart and their default values.

Parameter|Description| Default
---|---|---
global.namespace| Kubernete namespace for kepler |kepler
image.repository|Repository for Kepler Image| quay.io/sustainable\_computing\_io/kepler
image.pullPolicy|Pull policy for Kepler|Always
image.tag|Image tag for Kepler Image |latest
serviceAccount.name|Service acccount name for Kepler|kepler-sa
service.type|Kepler service type|ClusterIP
service.port|Kepler service exposed port|9102

#### Uninstall Kepler
To uninstall this chart, use the following steps

```bash
helm delete --purge kepler --tiller-namespace <namespace>
```
28 changes: 28 additions & 0 deletions docs/installation/kepler-operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Kepler Operator on Kind

## Getting Started

You’ll need a Kubernetes cluster to run against. You can use KIND to get a local cluster for testing, or run against a remote cluster. Note: Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster kubectl cluster-info shows).

### To run a kind cluster locally

``` sh
make cluster-up CLUSTER_PROVIDER='kind' CI_DEPLOY=true GRAFANA_ENABLE=true
```

### To run kepler-operator locally on the cluster
You can use the image from quay.io to deploy kepler-operator.

```sh
make deploy IMG=quay.io/sustainable_computing_io/kepler-operator:latest
kubectl apply -k config/samples/
```

### Uninstall the operator
To delete the CRDs from the cluster:
```sh
make undeploy
```


To run Kepler operator on a kind cluster [follow](https://github.com/sustainable-computing-io/kepler-operator#getting-started)
25 changes: 25 additions & 0 deletions docs/installation/kepler-rpm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Install Kepler as RPM
To install the kepler rpm [download](https://github.com/sustainable-computing-io/kepler/releases/) the latest stable version, unpack and install:

```sh
sudo dnf localinstall kepler-[version.arch].rpm

systemctl start kepler.service
```

Check status with

```sh
systemctl status kepler.service

journalctl -f | grep kepler
```

In order to do process-level energy accounting type:
```sh
mkdir -p /etc/kepler/kepler.config
echo -n true > /etc/kepler/kepler.config/ENABLE_PROCESS_METRICS
```
The kepler service runs on default port 8888.

Use your web browser to navigate to the machine IP on port 8888.
82 changes: 0 additions & 82 deletions docs/installation/kepler.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,63 +63,6 @@ Login with the credentials mentioned above. You can skip the window where Grafan

![](../fig/grafana_dashboard.png)

### Deploy using Helm Chart

The Kepler Helm Chart is available on [GitHub](https://github.com/sustainable-computing-io/kepler-helm-chart/tree/main) and [ArtifactHub](https://artifacthub.io/packages/helm/kepler/kepler)

For Installation [Helm](https://helm.sh) must be installed to use the charts.
Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.

The chart is accessible using the following commands:

Add the helm repo

```bash
helm repo add kepler https://sustainable-computing-io.github.io/kepler-helm-chart
```

You can see the latest version by using the folllowing command:

```bash
helm search repo kepler
```

If you would like to test and look at the manifest files before deploying you can run:

```bash
helm install kepler kepler/kepler --namespace kepler --create-namespace --dry-run --devel
```

Then to install run the following:

```bash
helm install kepler kepler/kepler --namespace kepler --create-namespace
```

You may want to override [values.yaml](https://github.com/sustainable-computing-io/kepler-helm-chart/blob/main/chart/kepler/values.yaml) file use the following command.

```bash
helm install kepler kepler/kepler --values values.yaml --namespace kepler --create-namespace
```

The following table lists the configurable parameters for this chart and their default values.

Parameter|Description| Default
---|---|---
global.namespace| Kubernete namespace for kepler |kepler
image.repository|Repository for Kepler Image| quay.io/sustainable\_computing\_io/kepler
image.pullPolicy|Pull policy for Kepler|Always
image.tag|Image tag for Kepler Image |latest
serviceAccount.name|Service acccount name for Kepler|kepler-sa
service.type|Kepler service type|ClusterIP
service.port|Kepler service exposed port|9102

#### Uninstall Kepler
To uninstall this chart, use the following steps

```bash
helm delete --purge kepler --tiller-namespace <namespace>
```

### Deploy from source code
Follow the steps below to deploy the Kepler exporter as a Daemonset to run on all Nodes. The following deployment will also create a service listening on port `9102`.
Expand Down Expand Up @@ -204,28 +147,3 @@ kubectl apply --server-side -f manifests/setup
until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
kubectl apply -f manifests/
```
## Install Kepler as RPM
To install the kepler rpm [download](https://github.com/sustainable-computing-io/kepler/releases/) the latest stable version, unpack and install:

```sh
sudo dnf localinstall kepler-[version.arch].rpm

systemctl start kepler.service
```

Check status with

```sh
systemctl status kepler.service

journalctl -f | grep kepler
```

In order to do process-level energy accounting type:
```sh
mkdir -p /etc/kepler/kepler.config
echo -n true > /etc/kepler/kepler.config/ENABLE_PROCESS_METRICS
```
The kepler service runs on default port 8888.

Use your web browser to navigate to the machine IP on port 8888.
25 changes: 25 additions & 0 deletions docs/usage/deep_dive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Kepler Deep Dive

- [ ] Components and what they do
- [ ] What metrics are gathered on various systems
* [ ] BM
* [ ] VM
* [ ] Linux standalone
- [ ] Why these metric?
- [ ] How is the power consumption attribution done?
- [ ] Explain the [models](https://github.com/sustainable-computing-io/kepler-model-server/tree/main/tests/test_models). How the models are different and is there a right use case/scenario for when to apply a particular model over another?
* [ ] AbsComponentModelWeight
* [ ] AbsComponentPower
* [ ] AbsModelWeight
* [ ] AbsPower
* [ ] DynComponentModelWeight
* [ ] DynComponentPower
* [ ] XGBoost

- [ ] Each model has three sub models BPFOnly, CgroupOnly, CounterOnly but we use only one of these models. Why is that?






10 changes: 10 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ theme:
custom_dir: overrides
features:
- navigation.footer

highlightjs: true
hljs_languages:
- yaml
Expand All @@ -18,13 +19,18 @@ nav:
- 'design/power_estimation.md'
- 'design/power_model.md'
- 'design/metrics.md'
- 'design/ebpf_in_kepler.md'
- Installation:
- 'installation/kepler.md'
- 'installation/kepler-helm.md'
- 'installation/kepler-operator.md'
- 'installation/kepler-rpm.md'
- Advanced:
- 'usage/general_config.md'
- 'usage/kepler_daemon.md'
- 'usage/model_server.md'
- 'usage/trouble_shooting.md'
- 'usage/deep_dive.md'
- Hardware Engagement:
- 'hardwareengagement/index.md'
- Model Training:
Expand All @@ -35,6 +41,10 @@ nav:
- 'project/contributing.md'
- 'project/support.md'

markdown_extensions:
- pymdownx.tasklist:
custom_checkbox: true

extra:
version:
v0.4
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdocs
mkdocs-static-i18n
mkdocs-material

0 comments on commit 3fd4550

Please sign in to comment.