forked from hashicorp/nomad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Bruce Smith
committed
Oct 29, 2020
1 parent
4b3044a
commit 7786612
Showing
49 changed files
with
876 additions
and
753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,146 @@ | ||
job "ceph-csi-plugin" { | ||
datacenters = ["dc1"] | ||
type = "system" | ||
|
||
group "nodes" { | ||
task "ceph-node" { | ||
driver = "docker" | ||
|
||
template { | ||
data = <<EOF | ||
data = <<EOF | ||
[{ | ||
"clusterID": "<clusterid>", | ||
"monitors": [ | ||
{{range $index, $service := service "mon.ceph"}}{{if gt $index 0}}, {{end}}"{{.Address}}"{{end}} | ||
] | ||
}] | ||
EOF | ||
|
||
destination = "local/config.json" | ||
change_mode = "restart" | ||
} | ||
|
||
config { | ||
image = "quay.io/cephcsi/cephcsi:v2.1.2-amd64" | ||
|
||
volumes = [ | ||
"./local/config.json:/etc/ceph-csi-config/config.json" | ||
"./local/config.json:/etc/ceph-csi-config/config.json", | ||
] | ||
|
||
mounts = [ | ||
{ | ||
type = "tmpfs" | ||
target = "/tmp/csi/keys" | ||
readonly = false | ||
|
||
tmpfs_options { | ||
size = 1000000 # size in bytes | ||
} | ||
} | ||
}, | ||
] | ||
|
||
args = [ | ||
"--type=rbd", | ||
|
||
# Name of the driver | ||
"--drivername=rbd.csi.ceph.com", | ||
|
||
"--logtostderr", | ||
"--nodeserver=true", | ||
"--endpoint=unix://csi/csi.sock", | ||
"--instanceid=${attr.unique.platform.aws.instance-id}", | ||
"--nodeid=${attr.unique.consul.name}", | ||
|
||
# TCP port for liveness metrics requests (/metrics) | ||
"--metricsport=${NOMAD_PORT_prometheus}", | ||
] | ||
|
||
privileged = true | ||
|
||
resources { | ||
cpu = 200 | ||
memory = 500 | ||
|
||
network { | ||
mbits = 1 | ||
|
||
// prometheus metrics port | ||
port "prometheus" {} | ||
} | ||
} | ||
} | ||
|
||
service { | ||
name = "prometheus" | ||
port = "prometheus" | ||
tags = ["ceph-csi"] | ||
} | ||
|
||
csi_plugin { | ||
id = "ceph-csi" | ||
type = "node" | ||
mount_dir = "/csi" | ||
} | ||
} | ||
task "ceph-controller" { | ||
|
||
task "ceph-controller" { | ||
template { | ||
data = <<EOF | ||
data = <<EOF | ||
[{ | ||
"clusterID": "<clusterid>", | ||
"monitors": [ | ||
{{range $index, $service := service "mon.ceph"}}{{if gt $index 0}}, {{end}}"{{.Address}}"{{end}} | ||
] | ||
}] | ||
EOF | ||
|
||
destination = "local/config.json" | ||
change_mode = "restart" | ||
} | ||
|
||
driver = "docker" | ||
|
||
config { | ||
image = "quay.io/cephcsi/cephcsi:v2.1.2-amd64" | ||
|
||
volumes = [ | ||
"./local/config.json:/etc/ceph-csi-config/config.json" | ||
"./local/config.json:/etc/ceph-csi-config/config.json", | ||
] | ||
|
||
resources { | ||
cpu = 200 | ||
memory = 500 | ||
|
||
network { | ||
mbits = 1 | ||
|
||
// prometheus metrics port | ||
port "prometheus" {} | ||
} | ||
} | ||
|
||
args = [ | ||
"--type=rbd", | ||
"--controllerserver=true", | ||
"--drivername=rbd.csi.ceph.com", | ||
"--logtostderr", | ||
"--endpoint=unix://csi/csi.sock", | ||
"--metricsport=$${NOMAD_PORT_prometheus}", | ||
"--nodeid=$${attr.unique.platform.aws.hostname}" | ||
"--nodeid=$${attr.unique.platform.aws.hostname}", | ||
] | ||
} | ||
|
||
service { | ||
name = "prometheus" | ||
port = "prometheus" | ||
tags = ["ceph-csi"] | ||
} | ||
|
||
csi_plugin { | ||
id = "ceph-csi" | ||
type = "controller" | ||
mount_dir = "/csi" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
type = "csi" | ||
id = "testvol" | ||
|
||
id = "testvol" | ||
|
||
name = "test_volume" | ||
|
||
# this must be strictly formatted, see README | ||
external_id = "ffff-0024-01616094-9d93-4178-bf45-c7eac19e8b15-000000000000ffff-00000000-1111-2222-bbbb-cacacacacaca" | ||
access_mode = "single-node-writer" | ||
external_id = "ffff-0024-01616094-9d93-4178-bf45-c7eac19e8b15-000000000000ffff-00000000-1111-2222-bbbb-cacacacacaca" | ||
|
||
access_mode = "single-node-writer" | ||
|
||
attachment_mode = "block-device" | ||
plugin_id = "ceph-csi" | ||
|
||
plugin_id = "ceph-csi" | ||
|
||
mount_options { | ||
fs_type = "ext4" | ||
} | ||
|
||
parameters {} | ||
|
||
secrets { | ||
userID = "<userid>" | ||
userKey = "<userkey>" | ||
} | ||
|
||
context { | ||
# note: although these are 'parameters' in the ceph-csi spec | ||
# they are passed through to the provider as 'context' | ||
clusterID = "<clusterid>" | ||
pool = "my_pool" | ||
} | ||
|
||
pool = "my_pool" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
type = "csi" | ||
id = "testvol" | ||
name = "test_volume" | ||
external_id = "56as4da-as524d-asd9-asd8-asdasd52555" | ||
access_mode = "single-node-writer" | ||
type = "csi" | ||
|
||
id = "testvol" | ||
|
||
name = "test_volume" | ||
|
||
external_id = "56as4da-as524d-asd9-asd8-asdasd52555" | ||
|
||
access_mode = "single-node-writer" | ||
|
||
attachment_mode = "block-device" | ||
plugin_id = "cinder-csi" | ||
|
||
plugin_id = "cinder-csi" | ||
|
||
mount_options { | ||
fs_type = "ext4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ job "client" { | |
|
||
network { | ||
mbits = 10 | ||
port "http" {} | ||
port "http"{} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,4 +68,4 @@ job "cn-demo" { | |
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.