Using the Marathon REST API to update a configuration
NickName:donniemac Ask DateTime:2017-04-20T19:02:02

Using the Marathon REST API to update a configuration

Using cURL I want to modify the number of instances a group has by passing a json file to update the config. The way my groups are set up looks something like this:

'marathon > applications > topApp'
'marathon > applications > topApp > group1'
'marathon > applications > topApp > group2'
'marathon > applications > topApp > group3 , etc'

I only want to update group2 and cannot figure out how to specify it. I'm thinking of using 'PUT /v2/groups/{groupId}' which I got from the marathon rest api doc here https://mesosphere.github.io/marathon/docs/rest-api.html#example-5

Has anyone done this and can help? Is there a better way? This is my first time doing this. Thanks!

Copyright Notice:Content Author:「donniemac」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/43517695/using-the-marathon-rest-api-to-update-a-configuration

More about “Using the Marathon REST API to update a configuration” related questions

Using the Marathon REST API to update a configuration

Using cURL I want to modify the number of instances a group has by passing a json file to update the config. The way my groups are set up looks something like this: 'marathon > applications >

Show Detail

Deploying/Updating Marathon Docker image using API

I am writing code to update deployed image on marathon automatically. I use the REST patch method as listed in marathon API reference http://mesosphere.github.io/marathon/api-console/index.html ...

Show Detail

How to scale up docker instances using Apache Marathon REST API.?

Is it possible to scale up and down number of docker containers/instances using Mesosphere Marathon REST API? Endpoint GET /deployments seems to be only option to see the next possible operation. ...

Show Detail

marathon rest api returns no data

I have 3 marathon servers running in HA. when i reach the rest api on the leader, it returns good data. But when i try it against one of the non leader nodes, I do not get any data back...no string...

Show Detail

What is recommended Java GC configuration for Marathon?

We're running a Marathon on top of another Marathon (MoM) in DC/OS. The cluster is relatively small, about 40 nodes and 400 running tasks. I was surprised that Marathon is not shipped with any GC

Show Detail

Update Teamcity Configuration parameter specification using REST API

I need to update the specification of a configuration parameter using Teamcity REST API. Following the REST documentation I tried a PUT request with the parameter value like: http://teamcity:80/

Show Detail

Why does Marathon scheduler restart deployments upon restarting marathon service?

I was testing my job in marathon scheduler and observed that marathon scheduler restarts my completed job upon restarting marathon service(systemctl restart marathon.service). Not sure if i am miss...

Show Detail

Apache Marathon app and container relation

I would like to understand the relation between a Marathon App and a container. Is it really so, that a Marathon App definition can contain only a single container definition (1:1)? As far as I

Show Detail

How to use the marathon healthChecks?

I execute git clone https://github.com/mesosphere/marathon.git to download the latest marathon,And I had known from marathon doc that we can set the property of 'healthChecks' to Monitor the job. ...

Show Detail

kaa update configuration using REST API

I used kaa rest api for changing my configuration as follow: curl -v -S -u devuser:devuser123 -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "applicati...

Show Detail