This file contains hidden or 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
job "java_test" { | |
datacenters = ["dc1"] | |
group "java_test" { | |
task "java_test" { | |
driver = "java" | |
artifact { | |
source = "https://github.com/juanluisbaptiste/nomad-demo/raw/master/java/nomad_demo.jar" | |
destination = "local/" | |
# options { |
This file contains hidden or 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
job "ping_test" { | |
datacenters = ["dc1"] | |
group "ping_test" { | |
task "ping" { | |
driver = "raw_exec" | |
config { | |
# When running a binary that exists on the host, the path must be absolute/ | |
command = "/usr/bin/ping" |
This file contains hidden or 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
job "example" { | |
datacenters = ["dc1"] | |
group "cache" { | |
network { | |
port "db" { | |
to = 6379 | |
} | |
} |
This file contains hidden or 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
data_dir = "/opt/nomad/data" | |
bind_addr = "0.0.0.0" | |
datacenter = "dc1" | |
# Enable the client | |
client { | |
enabled = true | |
options { | |
"driver.raw_exec.enable" = "1" | |
"docker.privileged.enabled" = "true" |
This file contains hidden or 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
data_dir = "/opt/nomad/data" | |
bind_addr = "0.0.0.0" | |
# Enable the server | |
server { | |
enabled = true | |
bootstrap_expect = SERVER_COUNT | |
} | |
consul { |
This file contains hidden or 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
[Unit] | |
Description=Nomad | |
Documentation=https://nomadproject.io/docs/ | |
Wants=network-online.target | |
After=network-online.target | |
StartLimitIntervalSec=10 | |
StartLimitBurst=3 | |
# If you are running Consul, please uncomment following Wants/After configs. | |
# Assuming your Consul service unit name is "consul" |
This file contains hidden or 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
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: frontend | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: guestbook |
This file contains hidden or 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
--- | |
kind: secret | |
name: docker_username | |
get: | |
path: docker | |
name: username | |
--- | |
kind: secret | |
name: docker_password | |
get: |
This file contains hidden or 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
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: docker | |
type: Opaque | |
data: | |
username: <base64_encoded_value> | |
password: <base64_encoded_value> | |
--- |
This file contains hidden or 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
rbac: | |
## The namespace that the extension is allowed to fetch secrets from. Unless | |
## rbac.restrictToSecrets is set below, the extension will be able to pull all secrets in | |
## the namespace specified here. | |
## | |
secretNamespace: default | |
## The keys within the "env" map are mounted as environment variables on the secrets extension pod. | |
## | |
env: | |
## REQUIRED: Shared secret value for comms between the Kubernetes runner and this secrets plugin. |