mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
Add an upgrade test workload for that continuously writes to a Nomad Variable. In order to run this workload, we'll need to deploy a Workload-Associated ACL policy. So this extends the `run_workloads` module to allow for a "pre script" to be run before a given job is deployed. We can use that as a model for other test workloads. Ref: https://hashicorp.atlassian.net/browse/NET-12217
18 lines
331 B
Bash
Executable File
18 lines
331 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
set -euo pipefail
|
|
|
|
nomad acl policy apply \
|
|
-namespace default -job writes-vars \
|
|
writes-vars-policy - <<EOF
|
|
namespace "default" {
|
|
variables {
|
|
path "nomad/jobs/writes-vars" {
|
|
capabilities = ["write", "read"]
|
|
}
|
|
}
|
|
}
|
|
EOF
|