File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,25 @@ Copy the allocation ID from the output of `nomad job status` command.
1919$ nomad alloc exec -i -t <allocation_id> /bin/sh
2020```
2121
22+ ## Hello World
23+
24+ ```
25+ $ nomad job run hello.nomad
26+ ```
27+ will start a container using ` nomad-driver-containerd ` which runs an infinite loop printing
28+ ` hello world ` and sleeps for ` 3 seconds ` between each iteration. This is a basic ` hello world `
29+ program which can be used to test launching containers using ` nomad-driver-containerd ` .
30+
31+ ** Check allocation logs**
32+
33+ ```
34+ $ nomad alloc logs -f -job hello
35+ Hello world: sleeping for 3 seconds.
36+ Hello world: sleeping for 3 seconds.
37+ Hello world: sleeping for 3 seconds.
38+ ...
39+ ```
40+
2241## Signal Handler
2342
2443```
Original file line number Diff line number Diff line change 1+ job "hello" {
2+ datacenters = [" dc1" ]
3+
4+ group "hello-group" {
5+ task "hello-task" {
6+ driver = " containerd-driver"
7+
8+ config {
9+ image = " docker.io/shm32/hello:world"
10+ }
11+
12+ resources {
13+ cpu = 500
14+ memory = 256
15+ network {
16+ mbits = 10
17+ }
18+ }
19+ }
20+ }
21+ }
You can’t perform that action at this time.
0 commit comments