Install portworx dev via Nomad

Hi, i’ve noticed that the example for installation of portworx via nomad installs the enterprise version. I wanted to ask how to install px-dev using nomad.

Thanks.

This Nomad job worked for me. I just modified the enterprise Nomad job using the “docker standalone” dev documentation.

job "portworx-dev" {
  type        = "service"
  datacenters = ["dc1"]

  group "portworx" {
    count = 3

    constraint {
      operator  = "distinct_hosts"
      value     = "true"
    }

    # restart policy for failed portworx tasks
    restart {
      attempts = 3
      delay    = "30s"
      interval = "5m"
      mode     = "fail"
    }

    # how to handle upgrades of portworx instances
    update {
      max_parallel     = 1
      health_check     = "checks"
      min_healthy_time = "10s"
      healthy_deadline = "5m"
      auto_revert      = true
      canary           = 0
      stagger          = "30s"
    }

    task "px-dev-node" {
      driver = "docker"
      kill_timeout = "120s"   # allow portworx 2 min to gracefully shut down
      kill_signal = "SIGTERM" # use SIGTERM to shut down the nodes

      # consul service check for portworx instances
      service {
        name = "portworx-dev"
        check {
          port     = "portworx"
          type     = "http"
          path     = "/status"
          interval = "10s"
          timeout  = "2s"
        }
      }

      # setup environment variables for px-nodes
      env {
        "AUTO_NODE_RECOVERY_TIMEOUT_IN_SECS" = "1500"
        "PX_TEMPLATE_VERSION"                = "V4"
       }

      # container config
      config {
        image        = "portworx/px-dev:2.1.0"
        network_mode = "host"
        ipc_mode = "host"
        privileged = true

        # configure your parameters below
        # do not remove the last parameter (needed for health check)
        args = [
            "-c", "px-dev",
            "-s", "/dev/vdb2",
            "-k", "consul://127.0.0.1:8500",
        ]

        volumes = [
            "/var/run/docker/plugins:/var/run/docker/plugins",
            "/var/lib/osd:/var/lib/osd:shared",
            "/dev:/dev",
            "/etc/pwx:/etc/pwx",
            "/opt/pwx/bin:/export_bin",
            "/var/run/docker.sock:/var/run/docker.sock",
            "/var/cores:/var/cores",
            "/usr/src:/usr/src",
        ]
      }

      # resource config
      resources {
        cpu    = 1024
        memory = 2048

        network {
          mbits = 100
          port "portworx" {
            static = "9001"
          }
        }
      }
    }
  }
}
2 Likes