Skip to content
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

Add initial project documentation #152

Merged
merged 4 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish docs via GitHub Pages
on:
push:
branches: [ main ]

jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 'pypy3.9'
- uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache
- name: Deploy docs
uses: afritzler/mkdocs-gh-pages-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Files:
PROJECT
config/*
go.mod
mkdocs.yml
go.sum
hack/*
Copyright: 2024 SAP SE or an SAP affiliate company and IronCore contributors
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ IMG ?= controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.31.0

# Docker image name for the mkdocs based local development setup
IMAGE=ironcore-dev/metal-operator-docs

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
Expand Down Expand Up @@ -102,6 +105,15 @@ lint: golangci-lint ## Run golangci-lint linter & yamllint
lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
$(GOLANGCI_LINT) run --fix

.PHONY: startdocs
startdocs: ## Start the local mkdocs based development environment.
docker build -t $(IMAGE) -f docs/Dockerfile . --load
docker run -p 8000:8000 -v `pwd`/:/docs $(IMAGE)

.PHONY: cleandocs
cleandocs: ## Remove all local mkdocs Docker images (cleanup).
docker container prune --force --filter "label=project=metal_operator"

##@ Build

.PHONY: docs
Expand Down
14 changes: 14 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM squidfunk/mkdocs-material:latest

LABEL project=metal_operator

WORKDIR /docs

COPY docs/requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 8000

# Start development server by default
ENTRYPOINT ["mkdocs"]
CMD ["serve", "--dev-addr=0.0.0.0:8000"]
51 changes: 51 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Metal-Operator Documentation

**Welcome to the Metal-Operator Documentation!**

The `metal-operator` is a Kubernetes-native operator, part of the IronCore open-source project, designed for robust bare metal infrastructure management. By leveraging Baseboard Management Controllers (BMCs) and the Redfish API, `metal-operator` enables streamlined and automated server discovery, provisioning, and lifecycle management. Using the Kubernetes Controller pattern, `metal-operator` provides a CRD-based operational model that standardizes bare metal management across different hardware environments. Integration with vendor-specific tooling is also possible for enhanced functionality when needed.

---

## Key Features

### 1. **Discover and Onboard Bare Metal Servers**
- Automatically detect and register bare metal servers through BMCs and the Redfish API.
- Efficiently gather hardware specs, network configurations, and initial health checks directly from BMC interfaces.

### 2. **Provision Software on Bare Metal Servers**
- Deploy and configure software on registered servers using BMC interactions and standardized provisioning workflows.
- Support for dynamic software configuration and Redfish API-based management for consistent, vendor-neutral provisioning.

### 3. **Manage Server Reservations**
- Reserve specific bare metal resources based on workload needs.
- Prevent resource conflicts by managing reservations via Kubernetes-native CRDs, ensuring that workloads align with available hardware resources.

### 4. **Perform Day 2 Operations**
- Utilize the Redfish API to manage BIOS, firmware, and driver updates.
- Automate ongoing maintenance tasks and operational workflows to maintain infrastructure resilience and uptime.

### 5. **Decommission and Maintain Faulty Servers**
- Decommission servers via BMC controls for clean removal from active pools.
- Schedule and perform maintenance tasks with BMC data to optimize uptime and maintain hardware reliability.

---

## How It Works

The `metal-operator` relies on **BMCs and the Redfish API** to handle bare metal server management tasks. Through a CRD-based operational model, `metal-operator` provides Kubernetes-native management of bare metal infrastructure, enabling consistent, vendor-neutral interactions.

### Core Components
- **Custom Resources (CRs)**: Extend Kubernetes to manage server configurations, reservations, and operational workflows.
- **Controllers**: Automate lifecycle management through Redfish-enabled interactions, from provisioning to decommissioning.
- **Reconcilers**: Ensure the desired state matches the actual state by continuously monitoring hardware via BMC integrations.

### Architecture Overview

1. **Discovery**: Register new bare metal servers through BMCs and Redfish API, creating CRDs for streamlined management.
2. **Provisioning**: Apply software images and configurations using Redfish API, based on templates or custom configurations.
3. **Operations**: Execute BIOS, firmware updates, and other maintenance tasks through standardized workflows.
4. **Decommissioning**: Safely remove or maintain servers using Redfish and BMC controls, marking them for reuse or retirement as needed.

---

The `metal-operator` is a core component of the IronCore project, designed to simplify and automate bare metal management across various hardware environments using BMC and Redfish API integrations. Expect continuous updates to expand capabilities and enhance usability.
60 changes: 30 additions & 30 deletions docs/api-reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ map[string]string
<td>
<code>metadata</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectmeta-v1-meta">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectmeta-v1-meta">
Kubernetes meta/v1.ObjectMeta
</a>
</em>
Expand All @@ -94,7 +94,7 @@ BMCSpec
<td>
<code>endpointRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand All @@ -108,7 +108,7 @@ This reference is typically used to locate the BMC endpoint within the cluster.<
<td>
<code>bmcSecretRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand Down Expand Up @@ -208,7 +208,7 @@ string
<td>
<code>bmcSecretRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand Down Expand Up @@ -272,7 +272,7 @@ temporary state can be very short.</p>
<td>
<code>metadata</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectmeta-v1-meta">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectmeta-v1-meta">
Kubernetes meta/v1.ObjectMeta
</a>
</em>
Expand Down Expand Up @@ -334,7 +334,7 @@ The stringData field is never output when reading from the API.</p>
<td>
<code>type</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#secrettype-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#secrettype-v1-core">
Kubernetes core/v1.SecretType
</a>
</em>
Expand Down Expand Up @@ -367,7 +367,7 @@ More info: <a href="https://kubernetes.io/docs/concepts/configuration/secret/#se
<td>
<code>endpointRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand All @@ -381,7 +381,7 @@ This reference is typically used to locate the BMC endpoint within the cluster.<
<td>
<code>bmcSecretRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand Down Expand Up @@ -572,7 +572,7 @@ BMCPowerState
<td>
<code>conditions</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#condition-v1-meta">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#condition-v1-meta">
[]Kubernetes meta/v1.Condition
</a>
</em>
Expand Down Expand Up @@ -722,7 +722,7 @@ This port is used by the specified console protocol to establish connections.</p
<td>
<code>metadata</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectmeta-v1-meta">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectmeta-v1-meta">
Kubernetes meta/v1.ObjectMeta
</a>
</em>
Expand Down Expand Up @@ -1110,7 +1110,7 @@ This port is used by the specified protocol to establish connections.</p>
<td>
<code>metadata</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectmeta-v1-meta">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectmeta-v1-meta">
Kubernetes meta/v1.ObjectMeta
</a>
</em>
Expand Down Expand Up @@ -1174,7 +1174,7 @@ IndicatorLED
<td>
<code>serverClaimRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectreference-v1-core">
Kubernetes core/v1.ObjectReference
</a>
</em>
Expand All @@ -1188,7 +1188,7 @@ This field is optional and can be omitted if no claim is associated with this se
<td>
<code>bmcRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand Down Expand Up @@ -1216,7 +1216,7 @@ This field is optional and can be omitted if no BMC access is specified.</p>
<td>
<code>bootConfigurationRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectreference-v1-core">
Kubernetes core/v1.ObjectReference
</a>
</em>
Expand Down Expand Up @@ -1287,7 +1287,7 @@ ServerStatus
<td>
<code>metadata</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectmeta-v1-meta">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectmeta-v1-meta">
Kubernetes meta/v1.ObjectMeta
</a>
</em>
Expand All @@ -1314,7 +1314,7 @@ ServerBootConfigurationSpec
<td>
<code>serverRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand All @@ -1339,7 +1339,7 @@ This field is optional and can be omitted if not specified.</p>
<td>
<code>ignitionSecretRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand Down Expand Up @@ -1386,7 +1386,7 @@ ServerBootConfigurationStatus
<td>
<code>serverRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand All @@ -1411,7 +1411,7 @@ This field is optional and can be omitted if not specified.</p>
<td>
<code>ignitionSecretRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand Down Expand Up @@ -1497,7 +1497,7 @@ ServerBootConfigurationState
<td>
<code>metadata</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectmeta-v1-meta">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectmeta-v1-meta">
Kubernetes meta/v1.ObjectMeta
</a>
</em>
Expand Down Expand Up @@ -1537,7 +1537,7 @@ Power
<td>
<code>serverRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand All @@ -1551,7 +1551,7 @@ This field is optional and can be omitted if the server is to be selected using
<td>
<code>serverSelector</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#labelselector-v1-meta">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#labelselector-v1-meta">
Kubernetes meta/v1.LabelSelector
</a>
</em>
Expand All @@ -1565,7 +1565,7 @@ This field is optional and can be omitted if a specific server is referenced usi
<td>
<code>ignitionSecretRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand Down Expand Up @@ -1636,7 +1636,7 @@ Power
<td>
<code>serverRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand All @@ -1650,7 +1650,7 @@ This field is optional and can be omitted if the server is to be selected using
<td>
<code>serverSelector</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#labelselector-v1-meta">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#labelselector-v1-meta">
Kubernetes meta/v1.LabelSelector
</a>
</em>
Expand All @@ -1664,7 +1664,7 @@ This field is optional and can be omitted if a specific server is referenced usi
<td>
<code>ignitionSecretRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand Down Expand Up @@ -1810,7 +1810,7 @@ IndicatorLED
<td>
<code>serverClaimRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectreference-v1-core">
Kubernetes core/v1.ObjectReference
</a>
</em>
Expand All @@ -1824,7 +1824,7 @@ This field is optional and can be omitted if no claim is associated with this se
<td>
<code>bmcRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#localobjectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
Expand Down Expand Up @@ -1852,7 +1852,7 @@ This field is optional and can be omitted if no BMC access is specified.</p>
<td>
<code>bootConfigurationRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectreference-v1-core">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectreference-v1-core">
Kubernetes core/v1.ObjectReference
</a>
</em>
Expand Down Expand Up @@ -2064,7 +2064,7 @@ BIOSSettings
<td>
<code>conditions</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#condition-v1-meta">
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#condition-v1-meta">
[]Kubernetes meta/v1.Condition
</a>
</em>
Expand Down
Loading
Loading