Skip to content

Deploy v5 Recommendations

Jonathan Meyer edited this page Sep 10, 2019 · 4 revisions

The packages have died on the vine with Mesosphere. Here is the quickest Marathon drop-in for deployment of Scale for the final v5 release.

We need Elasticsearch as in v5 that was still deployed seperately. In a production deployment, this should be managed following Elastic best practices. This will do for a quick demo:

{
  "id": "/scale-elasticsearch",
  "container": {
    "portMappings": [
      {
        "containerPort": 9200,
        "labels": {
          "VIP_0": "/scale-elasticsearch:9200"
        },
        "protocol": "tcp"
      }
    ],
    "type": "MESOS",
    "volumes": [],
    "docker": {
      "image": "elasticsearch:2-alpine",
      "forcePullImage": false,
      "parameters": []
    }
  },
  "healthChecks": [
    {
      "gracePeriodSeconds": 300,
      "intervalSeconds": 60,
      "maxConsecutiveFailures": 3,
      "portIndex": 0,
      "timeoutSeconds": 20,
      "delaySeconds": 15,
      "protocol": "MESOS_HTTP"
    }
  ],
  "instances": 1,
  "mem": 2048,
  "cpus": 1,
  "disk": 0,
  "gpus": 0,
  "networks": [
    {
      "mode": "container/bridge"
    }
  ]
}

Now to deploy Scale 5.9.5:

{
  "env": {
    "MARATHON_SERVERS": "http://marathon.mesos:8080,https://marathon.mesos:8443",
    "DCOS_PACKAGE_FRAMEWORK_NAME": "scale",
    "ENABLE_BOOTSTRAP": "true",
    "DEPLOY_WEBSERVER": "true",
    "SCALE_DB_USER": "scale",
    "SCALE_DB_NAME": "scale",  
    "SCALE_DB_PASS": "scale",
    "SCALE_VHOST": "scale.marathon.mesos",
    "SCALE_ELASTICSEARCH_URLS": "http://scale-elasticsearch.marathon.l4lb.thisdcos.directory:9200"
  },
  "labels": {
    "DCOS_PACKAGE_FRAMEWORK_NAME": "scale"
  },
  "id": "/scale",
  "args": [
    "scale_scheduler"
  ],
  "constraints": [
    [
      "hostname",
      "UNIQUE"
    ]
  ],
  "container": {
    "type": "DOCKER",
    "volumes": [],
    "docker": {
      "image": "geoint/scale:5.9.6",
      "forcePullImage": true,
      "privileged": false,
      "parameters": []
    }
  },
  "cpus": 1,
  "disk": 0,
  "instances": 1,
  "mem": 1024,
  "gpus": 0,
  "healthChecks": [
    {
      "gracePeriodSeconds": 300,
      "intervalSeconds": 30,
      "maxConsecutiveFailures": 3,
      "timeoutSeconds": 20,
      "delaySeconds": 15,
      "protocol": "COMMAND",
      "command": {
        "value": "ps -ef | grep 'manage.py scale_scheduler' | grep -v grep >/dev/null"
      }
    }
  ],
  "networks": [
    {
      "mode": "host"
    }
  ],
  "portDefinitions": [
    {
      "name": "default",
      "protocol": "tcp",
      "port": 10103
    }
  ]
}
Clone this wiki locally