-
Notifications
You must be signed in to change notification settings - Fork 215
docs: add user quickstart guides #2281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
38e028d
to
ba18b95
Compare
docs/developer/getting-started.md
Outdated
|
||
```bash | ||
# Run with custom configuration | ||
sudo ./bin/kepler --config /path/to/your/config.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo ./bin/kepler --config /path/to/your/config.yaml | |
sudo ./bin/kepler --config.file /path/to/your/config.yaml |
docs/developer/getting-started.md
Outdated
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 |
There was a problem hiding this comment.
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
docs/developer/getting-started.md
Outdated
**Development Access Points:** | ||
|
||
- Metrics: <http://localhost:28282/metrics> | ||
- Health: <http://localhost:28282/healthz> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
docs/developer/getting-started.md
Outdated
# Deploy development version of Kepler | ||
make build deploy |
There was a problem hiding this comment.
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
docs/developer/getting-started.md
Outdated
make test | ||
|
||
# Run tests with coverage | ||
make test-coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make test-coverage | |
make test coverage |
docs/developer/getting-started.md
Outdated
# Run linting | ||
make lint | ||
|
||
# Run all checks | ||
make ci |
There was a problem hiding this comment.
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
docs/developer/getting-started.md
Outdated
# Enable debug logging | ||
env: | ||
KEPLER_LOG_LEVEL: "debug" | ||
KEPLER_FAKE_CPU_METER: "true" # For development without RAPL | ||
|
There was a problem hiding this comment.
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?
docs/developer/getting-started.md
Outdated
|
||
```bash | ||
# Method 1: Command line flag | ||
sudo ./bin/kepler --config hack/config.yaml --fake-cpu-meter |
There was a problem hiding this comment.
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
docs/developer/getting-started.md
Outdated
# Method 2: Environment variable | ||
export KEPLER_FAKE_CPU_METER=true | ||
sudo ./bin/kepler --config hack/config.yaml |
There was a problem hiding this comment.
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 🤔
docs/developer/getting-started.md
Outdated
# Method 1: Environment variable in compose override | ||
cat > docker-compose.override.yml << EOF | ||
services: | ||
kepler-dev: | ||
environment: | ||
- KEPLER_FAKE_CPU_METER=true | ||
EOF |
There was a problem hiding this comment.
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
docs/developer/getting-started.md
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
docs/developer/getting-started.md
Outdated
env: | ||
KEPLER_FAKE_CPU_METER: "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
docs/developer/getting-started.md
Outdated
fake-cpu-meter: | ||
enabled: true | ||
zones: [] # Empty list enables all default zones | ||
# zones: ["package-0", "core", "uncore", "dram"] # Specific zones |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No package-0
right?
docs/developer/getting-started.md
Outdated
#### 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" | ||
``` |
There was a problem hiding this comment.
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?
docs/developer/getting-started.md
Outdated
|
||
# Method 2: Modify configmap before deployment | ||
sed -i '/fake-cpu-meter:/{n;s/enabled: false/enabled: true/}' manifests/k8s/configmap.yaml | ||
make build deploy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make build deploy | |
make deploy VERSION=latest |
docs/developer/getting-started.md
Outdated
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/\")"}}' |
There was a problem hiding this comment.
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
docs/developer/getting-started.md
Outdated
|
||
```bash | ||
# Check logs for fake meter initialization | ||
kubectl logs -n kepler -l app.kubernetes.io/name=kepler | grep -i fake |
There was a problem hiding this comment.
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? 🤔
docs/developer/getting-started.md
Outdated
# "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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed
docs/developer/getting-started.md
Outdated
#### 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 |
There was a problem hiding this comment.
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?
docs/developer/getting-started.md
Outdated
} | ||
``` | ||
|
||
## Development Environment Settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 ?
docs/developer/getting-started.md
Outdated
# Test with fake meter | ||
sudo ./bin/kepler --fake-cpu-meter --log.level=debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refine the command
docs/developer/getting-started.md
Outdated
sudo ./bin/kepler --fake-cpu-meter --log.level=debug | ||
|
||
# Check permissions | ||
sudo ./bin/kepler --config hack/config.yaml --log.level=debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo ./bin/kepler --config hack/config.yaml --log.level=debug | |
sudo ./bin/kepler --config.file hack/config.yaml --log.level=debug |
docs/developer/getting-started.md
Outdated
|
||
```bash | ||
# Install pre-commit hooks | ||
make pre-commit-install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No make
docs/developer/getting-started.md
Outdated
make pre-commit-install | ||
|
||
# Run pre-commit on all files | ||
make pre-commit-run-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make pre-commit-run-all | |
pre-commit run --show-diff-on-failure --color=always --all-files |
docs/developer/getting-started.md
Outdated
# Integration tests (requires cluster) | ||
make test-integration | ||
|
||
# E2E tests | ||
make test-e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yet to be added
docs/developer/getting-started.md
Outdated
### 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section needs refinement
docs/developer/getting-started.md
Outdated
### 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 | ||
``` |
There was a problem hiding this comment.
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 🤔
docs/user/README.md
Outdated
- Multi-cluster and high availability setup | ||
- Security considerations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these relevant?
docs/user/README.md
Outdated
|
||
**Happy energy monitoring with Kepler!** ⚡ | ||
|
||
*Last updated: 2024 | [Suggest improvements](https://github.com/sustainable-computing-io/kepler/issues/new)* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2024
?
There was a problem hiding this comment.
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
@sthaha Can you also update the reference to |
docs/developer/getting-started.md
Outdated
env: | ||
KEPLER_LOG_LEVEL: "debug" | ||
KEPLER_FAKE_CPU_METER: "true" # For development without RAPL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove these.
docs/developer/getting-started.md
Outdated
curl -s http://localhost:28282/metrics | grep kepler_container_cpu_watts | ||
``` | ||
|
||
### Fake CPU Meter Implementation Notes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this section
ba18b95
to
5436188
Compare
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]>
5436188
to
2ad766f
Compare
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
anddeveloper
where user guide may referdeveloper
docs for local setup.The documentation provides paths for different user types from beginners to advanced, with examples and step-by-step instructions for deploying and configuring Kepler.