-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename the ctl options and update demo vsm spec
- Loading branch information
Showing
6 changed files
with
177 additions
and
24 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
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
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 |
---|---|---|
@@ -0,0 +1,146 @@ | ||
job "demo1" { | ||
datacenters = ["dc1"] | ||
|
||
# Restrict our job to only linux. We can specify multiple | ||
# constraints as needed. | ||
constraint { | ||
attribute = "${attr.kernel.name}" | ||
value = "linux" | ||
} | ||
|
||
#Declare the IP parameters generic to all controllers and replicas | ||
meta { | ||
JIVA_VOLNAME = "demo1-vsm1-vol1" | ||
JIVA_VOLSIZE = "10g" | ||
JIVA_FRONTENDIP = "172.28.128.101" | ||
} | ||
|
||
# Create a 'ctl' group. Each task in the group will be | ||
# scheduled onto the same machine. | ||
group "vsm1-ctl" { | ||
# Configure the restart policy for the task group. If not provided, a | ||
# default is used based on the job type. | ||
restart { | ||
# The number of attempts to run the job within the specified interval. | ||
attempts = 3 | ||
interval = "5m" | ||
delay = "25s" | ||
mode = "delay" | ||
} | ||
|
||
# Define the controller task to run | ||
task "iscsi" { | ||
# Use a docker wrapper to run the task. | ||
driver = "raw_exec" | ||
artifact { | ||
source = "https://raw.githubusercontent.com/openebs/jiva/master/scripts/launch-jiva-ctl-with-ip" | ||
} | ||
|
||
env { | ||
JIVA_CTL_NAME = "${NOMAD_JOB_NAME}-${NOMAD_TASK_NAME}" | ||
JIVA_CTL_VERSION = "openebs/jiva:latest" | ||
JIVA_CTL_VOLNAME = "${NOMAD_META_JIVA_VOLNAME}" | ||
JIVA_CTL_VOLSIZE = "${NOMAD_META_JIVA_VOLSIZE}" | ||
JIVA_CTL_IP = "${NOMAD_META_JIVA_FRONTENDIP}" | ||
JIVA_CTL_SUBNET = "24" | ||
JIVA_CTL_IFACE = "enp0s8" | ||
} | ||
|
||
config { | ||
command = "launch-jiva-ctl-with-ip" | ||
} | ||
|
||
service { | ||
port = "api" | ||
check { | ||
name = "alive" | ||
type = "tcp" | ||
interval = "10s" | ||
timeout = "2s" | ||
} | ||
} | ||
|
||
# We must specify the resources required for | ||
# this task to ensure it runs on a machine with | ||
# enough capacity. | ||
resources { | ||
cpu = 500 # 500 MHz | ||
memory = 256 # 256MB | ||
network { | ||
mbits = 20 | ||
port "iscsi" { | ||
static = "3260" | ||
} | ||
port "api" { | ||
static = "9501" | ||
} | ||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
# Create a 'rep' group. Each task in the group will be | ||
# scheduled onto the same machine. | ||
group "vsm1-store1" { | ||
# Configure the restart policy for the task group. If not provided, a | ||
# default is used based on the job type. | ||
restart { | ||
# The number of attempts to run the job within the specified interval. | ||
attempts = 3 | ||
interval = "5m" | ||
delay = "25s" | ||
mode = "delay" | ||
} | ||
|
||
# Define the controller task to run | ||
task "rep1" { | ||
# Use a docker wrapper to run the task. | ||
driver = "raw_exec" | ||
artifact { | ||
source = "https://raw.githubusercontent.com/openebs/jiva/master/scripts/launch-jiva-rep-with-ip" | ||
} | ||
|
||
env { | ||
JIVA_REP_NAME = "${NOMAD_JOB_NAME}-${NOMAD_TASK_NAME}" | ||
JIVA_REP_VERSION = "openebs/jiva:latest" | ||
JIVA_CTL_IP = "${NOMAD_META_JIVA_FRONTENDIP}" | ||
JIVA_REP_VOLNAME = "${NOMAD_META_JIVA_VOLNAME}" | ||
JIVA_REP_VOLSIZE = "${NOMAD_META_JIVA_VOLSIZE}" | ||
JIVA_REP_IP = "172.28.128.102" | ||
JIVA_REP_SUBNET = "24" | ||
JIVA_REP_IFACE = "enp0s8" | ||
JIVA_REP_VOLSTORE = "/tmp/jiva/rep1" | ||
} | ||
|
||
config { | ||
command = "launch-jiva-rep-with-ip" | ||
} | ||
|
||
service { | ||
port = "api" | ||
check { | ||
name = "alive" | ||
type = "tcp" | ||
interval = "10s" | ||
timeout = "2s" | ||
} | ||
} | ||
|
||
# We must specify the resources required for | ||
# this task to ensure it runs on a machine with | ||
# enough capacity. | ||
resources { | ||
cpu = 500 # 500 MHz | ||
memory = 256 # 256MB | ||
network { | ||
mbits = 20 | ||
port "api" { | ||
static = "9502" | ||
} | ||
} | ||
} | ||
|
||
} | ||
} | ||
} |
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
-master-ips
or-join-ips
?