Skip to content

Commit

Permalink
README: update notes to include inventory collection
Browse files Browse the repository at this point in the history
  • Loading branch information
joelrebel committed Sep 5, 2023
1 parent 8d19bff commit 7584641
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 14 deletions.
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,19 @@ To understand more about the firmware install and how these services interact, c
- Setup a local KIND cluster with a registry using the script here: https://kind.sigs.k8s.io/docs/user/local-registry/
- Export `KUBECONFIG=~/.kube/config_kind`
- Docker images for Serverservice, Conditionorc, Alloy
- Install [mctl](https://github.com/metal-toolbox/mctl#getting-started) and use the configuration from [here](https://github.com/metal-toolbox/sandbox/tree/main/scripts/mctl)

### 1. Build docker images and push to local registry

Clone the serverservice repository and build the docker image,
Clone each of the repositories and run `make push-image-devel`

```sh
export GIT_TAG="localhost:5001/serverservice:latest" && \
GOOS=linux GOARCH=amd64 go build -o serverservice && \
docker build -t "${GIT_TAG}" -f Dockerfile . && \
docker push localhost:5001/serverservice:latest && kind load docker-image "${GIT_TAG}"
```
- [Serverservice](https://github.com/metal-toolbox/hollow-serverservice)
- [Conditionorc](https://github.com/metal-toolbox/conditionorc)
- [Alloy](https://github.com/metal-toolbox/alloy)
- [Flasher](https://github.com/metal-toolbox/flasher/)

This will build and push the container images to the local container registry.

Clone the Alloy, Conditionorc, Flasher repositories and build each of the container images using,
```sh
make push-image-devel
```

### 2. Deploy helm chart

Expand Down Expand Up @@ -63,7 +60,21 @@ go run scripts/serverservice/add-server.go \
-bmc-pass foo
```

### 4. Import firmware definitions (optional)
### 4. Collect information on the server

This collects the current firmware, health information and BIOS configuration data for a server.

```sh
mctl collect inventory --server edeff024-f62a-4288-8730-3fab8cceab78
```

Inventory collection status can be checked with,

```sh
mctl collect status --server edeff024-f62a-4288-8730-3fab8cceab78
```

### 5. Import firmware definitions (optional)

Note: replace `ARTIFACTS_ENDPOINT` in [firmwares.json](./scripts/mctl/firmwares.json) with endpoint serving the firmware files.

Expand All @@ -73,7 +84,7 @@ Import firmware defs from sample file using `mctl`.
mctl create firmware --from-file ./scripts/mctl/firmwares.json
```

### 5. Create a firmware set (optional)
### 6. Create a firmware set (optional)

List the firmware using `mctl list firmware` and create a set that can be applied to a server.

Expand All @@ -83,7 +94,7 @@ mctl create firmware-set --firmware-uuids 5e574c96-6ba4-4078-9650-c52a64cc8cba,a
--name r6515
```

### 4. Set a `firmwareInstall` condition on a server (optional)
### 7. Set a `firmwareInstall` condition on a server (optional)

With the server added, you can now get flasher to set a `firmwareInstall` condition,

Expand Down
7 changes: 7 additions & 0 deletions scripts/mctl/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
serverservice_api:
endpoint: http://localhost:8000
disable: true
conditions_api:
endpoint: http://localhost:9001
disable: true

0 comments on commit 7584641

Please sign in to comment.