Create a configuration file and a sample job.
docker.hcl
plugin "docker" {
config {
volumes {
enabled = true
}
Create a configuration file and a sample job.
docker.hcl
plugin "docker" {
config {
volumes {
enabled = true
}
job "example" { | |
datacenters = ["dc1"] | |
group "cache" { | |
task "redis" { | |
driver = "docker" | |
config { | |
image = "redis:3.2" | |
mac_address = "A0:97:FA:13:93:03" |
job "fabio" { | |
datacenters = ["dc1"] | |
type = "system" | |
update { | |
stagger = "5s" | |
max_parallel = 1 | |
} | |
group "linux-amd64" { | |
task "fabio" { | |
constraint { |
FROM microsoft/nanoserver | |
ENV HTTP_ECHO_DOWNLOAD_URL "https://github.com/hashicorp/http-echo/releases/download/v0.2.3/http-echo_0.2.3_windows_amd64.zip" | |
ENV HTTP_ECHO_PORT 8080 | |
ENV HTTP_ECHO_STRING "Hello World" | |
RUN powershell.exe -Command ; \ | |
$handler = New-Object System.Net.Http.HttpClientHandler ; \ | |
$client = New-Object System.Net.Http.HttpClient($handler) ; \ | |
$client.Timeout = New-Object System.TimeSpan(0,30,0) ; \ |
When attempting to remove all of the data in the Nomad data directory, several directories and files are unable to be deleted. Many messages are logged to the console like:
rm: cannot remove ‘alloc/736f61b9-d7dc-cb73-0dd1-76b1b2ba032d/nomad-ui/secrets’: Device or resource busy
rm: cannot remove ‘alloc/ddcf5a78-5497-f4a4-a101-221fc4e0180b/fabio/alloc’: Device or resource busy
rm: cannot remove ‘alloc/ddcf5a78-5497-f4a4-a101-221fc4e0180b/fabio/secrets’: Device or resource busy
This guide will walk you through creating and executing a job that will demonstrate Nomad's job anti-affinity rules and, in clusters with memory limited Nomad clients, filtering based resource exhaustion.
nomad node-status -self
)-module(pinger). | |
-export([ping/1, | |
ping/3, | |
pinglist/4, | |
pingall/0, | |
pingall/1, | |
pingall/2 | |
]). |
RingSize = 32, | |
FirstNodeName = 'riak@127.0.0.1', | |
NewRing = riak_core_claim_sim:run([ | |
{ring, riak_core_ring:fresh(RingSize, FirstNodeName)}, | |
{target_n_val,4}, | |
{wants,{riak_core_claim,wants_claim_v3}}, | |
{choose,{riak_core_claim,choose_claim_v3}}, | |
{cmds, [[ | |
{join, 'riak@127.0.0.2'}, | |
{join, 'riak@127.0.0.3'}, |