Skip to content

Commit 2e0bc00

Browse files
Merge pull request #375 from ArangoGutierrez/secure_boot
Multiple fixes after V0.2.10
2 parents 86bad0a + 99ec561 commit 2e0bc00

File tree

25 files changed

+1072
-182
lines changed

25 files changed

+1072
-182
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ jobs:
2727

2828
golang:
2929
uses: ./.github/workflows/golang.yaml
30-
30+
31+
docs-check:
32+
uses: ./.github/workflows/docs_check.yaml
33+
secrets: inherit
34+
3135
image:
3236
uses: ./.github/workflows/image.yaml
3337
needs: [golang, code-scanning]

.github/workflows/docs_check.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.##
2+
## Licensed under the Apache License, Version 2.0 (the "License");
3+
## you may not use this file except in compliance with the License.
4+
## You may obtain a copy of the License at
5+
##
6+
## http://www.apache.org/licenses/LICENSE-2.0
7+
##
8+
## Unless required by applicable law or agreed to in writing, software
9+
## distributed under the License is distributed on an "AS IS" BASIS,
10+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
## See the License for the specific language governing permissions and
12+
## limitations under the License.
13+
##
14+
15+
name: Docs
16+
17+
on:
18+
workflow_call:
19+
20+
jobs:
21+
lint:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Ruby
29+
uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: '3.5'
32+
33+
- name: Install mdl
34+
run: gem install mdl -v 0.13.0
35+
36+
- name: Run Markdown lint
37+
run: |
38+
find docs/ -path docs/vendor -prune -false -o -name '*.md' | xargs mdl -s docs/mdl-style.rb

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
11-
.PHONY: build fmt verify release lint vendor mod-tidy mod-vendor mod-verify check-vendor
11+
.PHONY: build fmt verify release lint vendor mod-tidy mod-vendor mod-verify check-vendor mdlint
1212

13+
CONTAINER_RUN_CMD ?= docker run
1314
GO_CMD ?= go
1415
GO_FMT ?= gofmt
1516
GO_SRC := $(shell find . -type f -name '*.go' -not -path "./vendor/*")
@@ -88,6 +89,14 @@ coverage: test
8889
cat $(COVERAGE_FILE) | grep -v "_mock.go" > $(COVERAGE_FILE).no-mocks
8990
go tool cover -func=$(COVERAGE_FILE).no-mocks
9091

92+
mdlint:
93+
${CONTAINER_RUN_CMD} \
94+
--rm \
95+
--volume "${PWD}:/workdir:ro,z" \
96+
--workdir /workdir \
97+
ruby:slim \
98+
/workdir/scripts/mdlint.sh
99+
91100
release:
92101
@rm -rf bin
93102
@mkdir -p bin

README.md

Lines changed: 70 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -2,170 +2,106 @@
22

33
> * Tech preview, under heavy development *
44
5-
A tool for creating and managing GPU ready Cloud test environments.
5+
A tool for creating and managing GPU-ready Cloud test environments.
66

7-
## Installation
7+
---
8+
9+
## 📖 Documentation
10+
11+
- [Quick Start](docs/quick-start.md)
12+
- [Prerequisites](docs/prerequisites.md)
13+
- [Commands Reference](docs/commands/)
14+
- [Contributing Guide](docs/contributing/)
15+
- [Examples](docs/examples/)
16+
17+
---
18+
19+
## 🚀 Quick Start
20+
21+
See [docs/quick-start.md](docs/quick-start.md) for a full walkthrough.
822

923
```bash
1024
make build
11-
mv ./bin/holodeck /usr/local/bin/holodeck
25+
sudo mv ./bin/holodeck /usr/local/bin/holodeck
26+
holodeck --help
1227
```
1328

14-
### Prerequisites
29+
---
1530

16-
If utilizing the AWS provider, a valid AWS credentials must be available in the environment.
31+
## 🛠️ Prerequisites
1732

18-
```yaml
19-
apiVersion: holodeck.nvidia.com/v1alpha1
20-
kind: Environment
21-
metadata:
22-
name: holodeck
23-
description: "Devel infra environment"
24-
spec:
25-
provider: aws
26-
```
33+
- Go 1.20+
34+
- (For AWS) Valid AWS credentials in your environment
35+
- (For SSH) Reachable host and valid SSH key
2736

28-
If utilizing the SSH provider, a valid SSH key must and reachable host must be available in the environment file.
29-
30-
```yaml
31-
apiVersion: holodeck.nvidia.com/v1alpha1
32-
kind: Environment
33-
metadata:
34-
name: holodeck
35-
description: "Devel infra environment"
36-
spec:
37-
provider: aws
38-
auth:
39-
keyName: user
40-
privateKey: "/Users/user/.ssh/user.pem"
41-
instance:
42-
hostUrl: "<some-reachable-host-ip>"
43-
```
37+
See [docs/prerequisites.md](docs/prerequisites.md) for details.
38+
39+
---
40+
41+
## 📝 How to Contribute
42+
43+
See [docs/contributing/](docs/contributing/) for full details.
44+
45+
### Main Makefile Targets
46+
47+
- `make build` – Build the holodeck binary
48+
- `make test` – Run all tests
49+
- `make lint` – Run linters
50+
- `make clean` – Remove build artifacts
51+
52+
---
4453

45-
## Usage
54+
## 🧑‍💻 Usage
55+
56+
See [docs/commands/](docs/commands/) for detailed command documentation and examples.
4657

4758
```bash
4859
holodeck --help
4960
```
5061

51-
### The Environment CRD
52-
53-
```yaml
54-
apiVersion: holodeck.nvidia.com/v1alpha1
55-
kind: Environment
56-
metadata:
57-
name: holodeck
58-
description: "Devel infra environment"
59-
spec:
60-
provider: aws # or ssh currently supported
61-
auth:
62-
keyName: user
63-
privateKey: "/Users/user/.ssh/user.pem"
64-
instance: # if provider is ssh you need to define here the hostUrl
65-
type: g4dn.xlarge
66-
region: eu-north-1
67-
ingressIpRanges:
68-
- 192.168.1.0/26
69-
image:
70-
architecture: amd64
71-
imageId: ami-0fe8bec493a81c7da # Ubuntu 22.04 image
72-
containerRuntime:
73-
install: true
74-
name: containerd
75-
version: 1.6.24
76-
kubernetes:
77-
install: true
78-
installer: kubeadm # supported installers: kubeadm, kind, microk8s
79-
version: v1.28.5
80-
```
81-
82-
The dependencies are resolved automatically, from top to bottom. Following the
83-
pattern:
62+
### Example: Create an environment
8463

85-
> Kubernetes -> Container Runtime -> Container Toolkit -> NVDriver
64+
```bash
65+
holodeck create -f ./examples/v1alpha1_environment.yaml
66+
```
8667

87-
If Kubernetes is requested, and no container runtime is requested, a default
88-
container runtime will be added to the environment..
68+
### Example: List environments
8969

90-
If Container Toolkit is requested, and no container runtime is requested, a
91-
default container runtime will be added to the environment.
70+
```bash
71+
holodeck list
72+
```
9273

93-
### Create an environment
74+
### Example: Delete an environment
9475

9576
```bash
96-
$ holodeck create -f ./examples/v1alpha1_environment.yaml
97-
...
77+
holodeck delete <instance-id>
9878
```
9979

100-
### Delete an environment
80+
### Example: Check status
10181

10282
```bash
103-
$ holodeck delete -f ./examples/v1alpha1_environment.yaml
104-
...
83+
holodeck status <instance-id>
10584
```
10685

107-
### Dry Run
86+
### Example: Dry Run
10887

10988
```bash
110-
$ holodeck dryrun -f ./examples/v1alpha1_environment.yaml
111-
Dryrun environment holodeck 🔍
112-
✔ Checking if instance type g4dn.xlarge is supported in region eu-north-1
113-
✔ Checking if image ami-0fe8bec493a81c7da is supported in region eu-north-1
114-
✔ Resolving dependencies 📦
115-
Dryrun succeeded 🎉
89+
holodeck dryrun -f ./examples/v1alpha1_environment.yaml
11690
```
11791

118-
## Supported Cuda-Drivers
92+
---
11993

120-
Supported Nvidia drivers are:
94+
## 📦 Supported Cuda-Drivers
12195

122-
```yaml
123-
nvidiaDriver:
124-
install: true
125-
version: <version>
126-
```
127-
Where `<version>` can be a prefix of any package version. The following are example package versions:
128-
129-
- 570.86.15-0ubuntu1
130-
- 570.86.10-0ubuntu1
131-
- 565.57.01-0ubuntu1
132-
- 560.35.05-0ubuntu1
133-
- 560.35.03-1
134-
- 560.28.03-1
135-
- 555.42.06-1
136-
- 555.42.02-1
137-
- 550.144.03-0ubuntu1
138-
- 550.127.08-0ubuntu1
139-
- 550.127.05-0ubuntu1
140-
- 550.90.12-0ubuntu1
141-
- 550.90.07-1
142-
- 550.54.15-1
143-
- 550.54.14-1
144-
- 545.23.08-1
145-
- 545.23.06-1
146-
- 535.230.02-0ubuntu1
147-
- 535.216.03-0ubuntu1
148-
- 535.216.01-0ubuntu1
149-
- 535.183.06-1
150-
- 535.183.01-1
151-
- 535.161.08-1
152-
- 535.161.07-1
153-
- 535.154.05-1
154-
- 535.129.03-1
155-
- 535.104.12-1
156-
- 535.104.05-1
157-
- 535.86.10-1
158-
- 535.54.03-1
159-
- 530.30.02-1
160-
- 525.147.05-1
161-
- 525.125.06-1
162-
- 525.105.17-1
163-
- 525.85.12-1
164-
- 525.60.13-1
165-
- 520.61.05-1
166-
- 515.105.01-1
167-
- 515.86.01-1
168-
- 515.65.07-1
169-
- 515.65.01-1
170-
- 515.48.07-1
171-
- 515.43.04-1
96+
See [docs/prerequisites.md](docs/prerequisites.md#supported-cuda-drivers) for the full list and usage.
97+
98+
---
99+
100+
## 📂 More
101+
102+
- [Examples](docs/examples/)
103+
- [Guides](docs/guides/)
104+
105+
---
106+
107+
For more information, see the [docs/](docs/) directory.

cmd/cli/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func (m command) run(c *cli.Context, opts *options) error {
171171
}
172172
}
173173

174-
m.log.Info("Created instance %s", instanceID)
174+
m.log.Info("\nCreated instance %s", instanceID)
175175
return nil
176176
}
177177

cmd/cli/delete/delete.go

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (m command) build() *cli.Command {
4444
// Create the 'delete' command
4545
delete := cli.Command{
4646
Name: "delete",
47-
Usage: "Delete a Holodeck instance",
47+
Usage: "Delete one or more Holodeck instances",
4848
Flags: []cli.Flag{
4949
&cli.StringFlag{
5050
Name: "cachepath",
@@ -53,37 +53,36 @@ func (m command) build() *cli.Command {
5353
Destination: &m.cachePath,
5454
Value: filepath.Join(os.Getenv("HOME"), ".cache", "holodeck"),
5555
},
56-
&cli.StringFlag{
57-
Name: "instance-id",
58-
Aliases: []string{"i"},
59-
Usage: "Instance ID to delete",
60-
},
6156
},
62-
6357
Action: func(c *cli.Context) error {
64-
// Delete using instance ID
65-
instanceID := c.String("instance-id")
66-
return m.run(c, instanceID)
58+
if c.NArg() == 0 {
59+
return fmt.Errorf("at least one instance ID is required")
60+
}
61+
return m.run(c)
6762
},
6863
}
6964

7065
return &delete
7166
}
7267

73-
func (m command) run(c *cli.Context, instanceID string) error {
68+
func (m command) run(c *cli.Context) error {
7469
manager := instances.NewManager(m.log, m.cachePath)
7570

76-
// First check if the instance exists
77-
instance, err := manager.GetInstance(instanceID)
78-
if err != nil {
79-
return fmt.Errorf("failed to get instance: %v", err)
80-
}
71+
// Process each instance ID provided as an argument
72+
for _, instanceID := range c.Args().Slice() {
73+
// First check if the instance exists
74+
instance, err := manager.GetInstance(instanceID)
75+
if err != nil {
76+
return fmt.Errorf("failed to get instance %s: %v", instanceID, err)
77+
}
78+
79+
// Delete the instance
80+
if err := manager.DeleteInstance(instanceID); err != nil {
81+
return fmt.Errorf("failed to delete instance %s: %v", instanceID, err)
82+
}
8183

82-
// Delete the instance
83-
if err := manager.DeleteInstance(instanceID); err != nil {
84-
return fmt.Errorf("failed to delete instance: %v", err)
84+
m.log.Info("Successfully deleted instance %s (%s)", instanceID, instance.Name)
8585
}
8686

87-
m.log.Info("Successfully deleted instance %s (%s)", instanceID, instance.Name)
8887
return nil
8988
}

0 commit comments

Comments
 (0)