1
votes

We can deploy the package with dcos commands like

dcos package install marathon-lb

but this requires dcos authentication with dcos auth login and since it requires to manually open the browser and paste the code , This is not feasible in automated script.

And with curl command I am able to deploy app like

curl -H "Authorization: token=token" -X POST http://azurehost/service/marathon/v2/apps -d @app.json -H "Content-type: application/json"

But how to deploy the universe package ? I want to deploy Marathon-lb via curl or script. So where can I find official marathon.json i.e. application definition to deploy via curl command?

2
maybe put dcos behind a proxy with logging capabilities and see what protocol it uses? if it uses encryption, use a proxy with mitm decryption capabilities, like Fiddler Proxy. if you do that, please post your results in the post (and censor the sensitive data ofc)hanshenrik

2 Answers

1
votes

I added Marathon-LB from universe package then accessed http://azurehost.azure.com/marathon/v2/apps where I got the correct marathon application definition of Marathon-lb. Now I am using the same definition through curl command and it is working fine.

0
votes

Managing dcos universe packages (describe/list/install/uninstall/search etc) via http api is an ENTERPRISE FEATURE.
If you are using Enterprise DCOS Cluster, then you can use them as documented here : https://docs.mesosphere.com/1.11/deploying-services/package-api/