Skip to content

Nomad

Prerequisites#

Nomad should be deployed on macos agents beforehand. To install Nomad proceed to docs.

Emcee queue server is expected to be shared among Android and iOS workers. Proceed to Android doc to learn how to deploy Emcee queue on Linux using Kubernetes.

Example config for worker deployment#

Applying following Nomad config leads to 100 running ios workers of version 21.3.0.

job "emcee-worker" {
  type = "service"

  meta {
    version = "21.3.0"
    count = 100
  }

  constraint {
    attribute = "${attr.kernel.name}"
    value     = "darwin"
  }

  constraint {
    distinct_hosts = true
  }

  group "worker" {
    count = ${NOMAD_META_count}

    service {
      provider = "nomad"
    }

    task "main" {
      driver = "raw_exec"

      artifact {
        source = "https://github.com/avito-tech/Emcee/releases/download/${NOMAD_META_version}/emcee-ios.artifact.zip"
      }

      config {
        command = "emcee-ios"
        args = [
          "distWork",
          "--hostname", "${attr.unique.hostname}",
          "--queue-server", "http://queue-server",
          "--worker-id", "ios-worker-${node.unique.id}"
        ]
      }
    }
  }
}

queue-server domain should be resolvable in your network