Skip to content

Conversation

sthaha
Copy link
Collaborator

@sthaha sthaha commented Aug 15, 2025

Add user-focused documentation including quickstart guides, installation instructions, configuration options, and troubleshooting to make it a bit accessible for users. The
documentation is clearly separated as user and developer where user guide may refer
developer docs for local setup.

  • Add user documentation directory with getting-started guides
  • Add developer getting started guide with Docker Compose setup
  • Restructure docs with consistent README.md naming (for default rendering on GH)
  • Add detailed installation guide for multiple deployment methods
  • Add quickstart guide with 4 different setup approaches
  • Add comprehensive troubleshooting guide for common issues
  • Add configuration guide covering all Kepler settings

The documentation provides paths for different user types from beginners to advanced, with examples and step-by-step instructions for deploying and configuring Kepler.

@github-actions github-actions bot added the docs Documentation changes label Aug 15, 2025
@sthaha sthaha changed the title docs: add comprehensive user quickstart guides docs: add user quickstart guides Aug 15, 2025
@sthaha sthaha force-pushed the doc-user-quickstart branch 5 times, most recently from 38e028d to ba18b95 Compare August 15, 2025 05:39
@sthaha sthaha requested a review from vprashar2929 August 15, 2025 06:38
@sthaha sthaha marked this pull request as ready for review August 15, 2025 06:38

```bash
# Run with custom configuration
sudo ./bin/kepler --config /path/to/your/config.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sudo ./bin/kepler --config /path/to/your/config.yaml
sudo ./bin/kepler --config.file /path/to/your/config.yaml

sudo ./bin/kepler --log.level=debug --exporter.stdout

# Run with fake CPU meter for development (no hardware required)
sudo ./bin/kepler --config hack/config.yaml --fake-cpu-meter
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't expose --fake-cpu-meter flag

**Development Access Points:**

- Metrics: <http://localhost:28282/metrics>
- Health: <http://localhost:28282/healthz>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't expose /healthz

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh!!! I think we must but will remove it for now.

Comment on lines 117 to 118
# Deploy development version of Kepler
make build deploy
Copy link
Collaborator

@vprashar2929 vprashar2929 Aug 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be something like:

# Deploy using latest
make deploy VERSION=latest

as make deploy won't deploy the binary on cluster. For the build from source image we already cover that in Custom Image Deployment section

make test

# Run tests with coverage
make test-coverage
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
make test-coverage
make test coverage

Comment on lines 163 to 167
# Run linting
make lint

# Run all checks
make ci
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need these

Comment on lines 198 to 202
# Enable debug logging
env:
KEPLER_LOG_LEVEL: "debug"
KEPLER_FAKE_CPU_METER: "true" # For development without RAPL

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sthaha This isn't correct way right?


```bash
# Method 1: Command line flag
sudo ./bin/kepler --config hack/config.yaml --fake-cpu-meter
Copy link
Collaborator

@vprashar2929 vprashar2929 Aug 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again no --fake-cpu-meter.
We can use this only:

# Method 3: Configuration file
# Edit hack/config.yaml or create custom config
cat > dev-config.yaml << EOF
dev:
  fake-cpu-meter:
    enabled: true
    zones: [] # empty enables all default zones
EOF
sudo ./bin/kepler --config.file dev-config.yaml

Comment on lines 249 to 251
# Method 2: Environment variable
export KEPLER_FAKE_CPU_METER=true
sudo ./bin/kepler --config hack/config.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this way will work 🤔

Comment on lines 269 to 275
# Method 1: Environment variable in compose override
cat > docker-compose.override.yml << EOF
services:
kepler-dev:
environment:
- KEPLER_FAKE_CPU_METER=true
EOF
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this method will work

EOF

# Method 2: Modify the config file directly
sed -i '/fake-cpu-meter:/,/zones:/c\ fake-cpu-meter:\n enabled: true\n zones: []' kepler-dev/etc/kepler/config.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sed -i '/fake-cpu-meter:/,/zones:/c\ fake-cpu-meter:\n enabled: true\n zones: []' kepler-dev/etc/kepler/config.yaml
sed -i '/fake-cpu-meter:/{n;s/enabled: false/enabled: true/}' kepler-dev/etc/kepler/config.yaml

Comment on lines 306 to 307
env:
KEPLER_FAKE_CPU_METER: "true"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

fake-cpu-meter:
enabled: true
zones: [] # Empty list enables all default zones
# zones: ["package-0", "core", "uncore", "dram"] # Specific zones
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No package-0 right?

Comment on lines 358 to 377
#### Unit Testing

```bash
# Run tests with fake CPU meter enabled
KEPLER_FAKE_CPU_METER=true make test

# Test specific components
KEPLER_FAKE_CPU_METER=true go test -v ./internal/device/...
```

#### Integration Testing

```bash
# Start development environment with fake meter
make cluster-up # Automatically enables fake meter

# Verify metrics are generated
kubectl port-forward -n kepler svc/kepler 28282:28282 &
curl -s http://localhost:28282/metrics | grep -E "(kepler_node|kepler_container)_cpu_watts"
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not applicable, right?


# Method 2: Modify configmap before deployment
sed -i '/fake-cpu-meter:/{n;s/enabled: false/enabled: true/}' manifests/k8s/configmap.yaml
make build deploy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
make build deploy
make deploy VERSION=latest

Comment on lines 295 to 296
kubectl patch configmap kepler-config -n kepler --type merge \
--patch '{"data":{"config.yaml":"$(kubectl get configmap kepler-config -n kepler -o jsonpath={.data.config\\.yaml} | sed \"s/enabled: false/enabled: true/\")"}}'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work. Need to update the command


```bash
# Check logs for fake meter initialization
kubectl logs -n kepler -l app.kubernetes.io/name=kepler | grep -i fake
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we log that Kepler is using fake cpu meter? 🤔

# "Fake CPU meter enabled with zones: [package-0, core, uncore, dram]"

# For local development
sudo ./bin/kepler --config hack/config.yaml --fake-cpu-meter --log.level=debug
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed

Comment on lines 419 to 426
#### Data Generation Algorithm

The fake CPU meter generates realistic power data by:

1. **Base power calculation** - Simulates idle power consumption
2. **CPU utilization scaling** - Increases power based on CPU usage
3. **Workload attribution** - Distributes power across active processes
4. **Time-based variations** - Adds realistic fluctuations over time
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it something that Kepler will support in future?

}
```

## Development Environment Settings
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 ?

Comment on lines 511 to 512
# Test with fake meter
sudo ./bin/kepler --fake-cpu-meter --log.level=debug
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refine the command

sudo ./bin/kepler --fake-cpu-meter --log.level=debug

# Check permissions
sudo ./bin/kepler --config hack/config.yaml --log.level=debug
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sudo ./bin/kepler --config hack/config.yaml --log.level=debug
sudo ./bin/kepler --config.file hack/config.yaml --log.level=debug


```bash
# Install pre-commit hooks
make pre-commit-install
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No make

make pre-commit-install

# Run pre-commit on all files
make pre-commit-run-all
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
make pre-commit-run-all
pre-commit run --show-diff-on-failure --color=always --all-files

Comment on lines 567 to 571
# Integration tests (requires cluster)
make test-integration

# E2E tests
make test-e2e
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet to be added

Comment on lines 585 to 595
### Creating Release Artifacts

```bash
# Build release binaries for multiple platforms
make build-release

# Create container images for release
make image-release VERSION=v0.10.1

# Generate release documentation
make docs-release
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section needs refinement

Comment on lines 598 to 606
### Testing Release Candidates

```bash
# Deploy release candidate
make deploy IMG_BASE=quay.io/sustainable_computing_io/kepler VERSION=v0.10.1-rc1

# Run release validation tests
make test-release
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if its applicable 🤔

Comment on lines 46 to 47
- Multi-cluster and high availability setup
- Security considerations
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these relevant?


**Happy energy monitoring with Kepler!**

*Last updated: 2024 | [Suggest improvements](https://github.com/sustainable-computing-io/kepler/issues/new)*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2024 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when it was trained I guess :p

@vprashar2929
Copy link
Collaborator

@sthaha Can you also update the reference to --config to --config.file in the docs as part of this PR 🙏

Comment on lines 199 to 201
env:
KEPLER_LOG_LEVEL: "debug"
KEPLER_FAKE_CPU_METER: "true" # For development without RAPL
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove these.

curl -s http://localhost:28282/metrics | grep kepler_container_cpu_watts
```

### Fake CPU Meter Implementation Notes
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this section

@sthaha sthaha force-pushed the doc-user-quickstart branch from ba18b95 to 5436188 Compare August 17, 2025 21:51
Add user-focused documentation including quickstart guides,
installation instructions, configuration options, and troubleshooting.

- Add user documentation directory with comprehensive guides
- Restructure docs with consistent README.md naming
- Add detailed installation guide for multiple deployment methods
- Add quickstart guide with 4 different setup approaches
- Add troubleshooting guide for common issues
- Add configuration guide covering all Kepler settings

The documentation provides clear paths for different user types from
beginners to advanced users, with practical examples and step-by-step
instructions for deploying and configuring Kepler.

Signed-off-by: Sunil Thaha <[email protected]>
@sthaha sthaha force-pushed the doc-user-quickstart branch from 5436188 to 2ad766f Compare August 17, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants