所有实例上的 Mesosphere 马拉松重启任务
Mesosphere marathon restart task on all instances
我运行在 3 个实例上设置一个 mesos 集群,每个实例都 运行同时设置 mesos-master 和 mesos-slave。我相信集群配置正确并且能够通过 docker 运行 Web 应用程序并在所有三个实例上运行马拉松。
我设置了一个 Jenkins 来执行对集群的部署,并作为最后一步 post 马拉松 REST API 来重新启动作业,但是它静默失败(只是停留在部署阶段) 。但是,如果应用程序在 2 个实例上 运行ning,重启会很顺利。 marathon 是否需要一个实例空闲才能执行应用重启?
我是不是漏掉了什么?
您的集群中是否有足够的空闲资源?
IIRC 默认重启行为将首先启动新版本,然后缩小旧版本(因此您需要 2* 应用程序资源)。
参见 Marathon Deployments for details and the upgrade strategy section here。
这里是the upgrade strategy的相关摘录:
upgradeStrategy
During an upgrade all instances of an application get replaced by a new version. The upgradeStrategy controls how Marathon stops old versions and launches new versions. It consists of two values:
minimumHealthCapacity (Optional. Default: 1.0) - a number between 0and 1 that is multiplied with the instance count. This is the minimum number of healthy nodes that do not sacrifice overall application purpose. Marathon will make sure, during the upgrade process, that at any point of time this number of healthy instances are up.
maximumOverCapacity (Optional. Default: 1.0) - a number between 0 and 1 which is multiplied with the instance count. This is the maximum number of additional instances launched at any point of time during the upgrade process.
The default minimumHealthCapacity is 1, which means no old instance can be stopped before another healthy new version is deployed. A value of 0.5 means that during an upgrade half of the old version instances are stopped first to make space for the new version. A value of 0 means take all instances down immediately and replace with the new application.
The default maximumOverCapacity is 1, which means that all old and new instances can co-exist during the upgrade process. A value of 0.1 means that during the upgrade process 10% more capacity than usual may be used for old and new instances. A value of 0.0 means that even during the upgrade process no more capacity may be used for the new instances than usual. Only when an old version is stopped, a new instance can be deployed.
我运行在 3 个实例上设置一个 mesos 集群,每个实例都 运行同时设置 mesos-master 和 mesos-slave。我相信集群配置正确并且能够通过 docker 运行 Web 应用程序并在所有三个实例上运行马拉松。
我设置了一个 Jenkins 来执行对集群的部署,并作为最后一步 post 马拉松 REST API 来重新启动作业,但是它静默失败(只是停留在部署阶段) 。但是,如果应用程序在 2 个实例上 运行ning,重启会很顺利。 marathon 是否需要一个实例空闲才能执行应用重启?
我是不是漏掉了什么?
您的集群中是否有足够的空闲资源? IIRC 默认重启行为将首先启动新版本,然后缩小旧版本(因此您需要 2* 应用程序资源)。 参见 Marathon Deployments for details and the upgrade strategy section here。
这里是the upgrade strategy的相关摘录:
upgradeStrategy
During an upgrade all instances of an application get replaced by a new version. The upgradeStrategy controls how Marathon stops old versions and launches new versions. It consists of two values:
minimumHealthCapacity (Optional. Default: 1.0) - a number between 0and 1 that is multiplied with the instance count. This is the minimum number of healthy nodes that do not sacrifice overall application purpose. Marathon will make sure, during the upgrade process, that at any point of time this number of healthy instances are up.
maximumOverCapacity (Optional. Default: 1.0) - a number between 0 and 1 which is multiplied with the instance count. This is the maximum number of additional instances launched at any point of time during the upgrade process.
The default minimumHealthCapacity is 1, which means no old instance can be stopped before another healthy new version is deployed. A value of 0.5 means that during an upgrade half of the old version instances are stopped first to make space for the new version. A value of 0 means take all instances down immediately and replace with the new application.
The default maximumOverCapacity is 1, which means that all old and new instances can co-exist during the upgrade process. A value of 0.1 means that during the upgrade process 10% more capacity than usual may be used for old and new instances. A value of 0.0 means that even during the upgrade process no more capacity may be used for the new instances than usual. Only when an old version is stopped, a new instance can be deployed.