feat: add nomad agent role (#206)
- add nomad agent role - mount cephfs volume nomadfs to /shared/nomad - manage docker volume path to be /shared/nomad Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/206
This commit was merged in pull request #206.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# profiles::nomad::node
|
||||
class profiles::nomad::node (
|
||||
Stdlib::Absolutepath $data_dir = '/data/nomad',
|
||||
Stdlib::Absolutepath $data_dir = '/data/nomad',
|
||||
Stdlib::Absolutepath $nomad_root = '/shared/nomad',
|
||||
Integer $bootstrap_expect = 3,
|
||||
Boolean $server = false,
|
||||
Boolean $client = false,
|
||||
@@ -30,6 +31,20 @@ class profiles::nomad::node (
|
||||
}
|
||||
}
|
||||
|
||||
if $client {
|
||||
|
||||
include profiles::ceph::client
|
||||
|
||||
# manage the sharedvol
|
||||
profiles::storage::cephfsvol {"${::facts['networking']['fqdn']}_nomad":
|
||||
mount => $nomad_root,
|
||||
keyring => '/etc/ceph/ceph.client.nomad.keyring',
|
||||
cephfs_name => 'nomad',
|
||||
cephfs_fs => 'nomadfs',
|
||||
require => Profiles::Ceph::Keyring['nomad'],
|
||||
}
|
||||
}
|
||||
|
||||
file { $data_dir:
|
||||
ensure => directory,
|
||||
owner => $user,
|
||||
|
||||
@@ -36,4 +36,3 @@ tls {
|
||||
verify_server_hostname = true
|
||||
verify_https_client = false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user