dcos marathon app show

查看应用程序的 JSON 文件

说明

dcos marathon app show command 显示应用程序的 marathon.json 文件。

使用

  1. dcos marathon app show [--app-version=<app-version>] <app-id>

选项

名称说明
-h—help显示有关此命令用法的信息。
—app-version=<app-version>要使用的应用程序版本。可以指定为绝对值或相对值。绝对值必须为 ISO8601 日期格式。相对值必须指定为负整数,表示当前部署的应用定义中的版本。

位置自变量

名称说明
<app-id>应用程序 ID。您可以使用 dcos marathon app list 命令查看应用程序 ID 列表。

示例

  1. dcos marathon app show spark
  2. {
  3. "backoffFactor": 1.15,
  4. "backoffSeconds": 1,
  5. "cmd": "/sbin/init.sh",
  6. "container": {
  7. "docker": {
  8. "forcePullImage": true,
  9. "image": "mesosphere/spark:2.7.0-2.4.0-hadoop-2.7",
  10. "parameters": [
  11. {
  12. "key": "user",
  13. "value": "nobody"
  14. }
  15. ],
  16. "privileged": false
  17. },
  18. "type": "DOCKER",
  19. "volumes": []
  20. },
  21. "cpus": 1,
  22. "deployments": [],
  23. "disk": 0,
  24. "env": {
  25. "DCOS_SERVICE_NAME": "spark",
  26. "SPARK_DISPATCHER_MESOS_PRINCIPAL": "",
  27. "SPARK_DISPATCHER_MESOS_ROLE": "*",
  28. "SPARK_DISPATCHER_MESOS_SECRET": "",
  29. "SPARK_HDFS_CONFIG_URL": "",
  30. "SPARK_LOG_LEVEL": "INFO",
  31. "SPARK_USER": "nobody"
  32. },
  33. "executor": "",
  34. "gpus": 0,
  35. "healthChecks": [
  36. {
  37. "delaySeconds": 15,
  38. "gracePeriodSeconds": 5,
  39. "intervalSeconds": 60,
  40. "ipProtocol": "IPv4",
  41. "maxConsecutiveFailures": 3,
  42. "path": "/",
  43. "portIndex": 2,
  44. "protocol": "MESOS_HTTP",
  45. "timeoutSeconds": 10
  46. }
  47. ],
  48. "id": "/spark",
  49. "instances": 1,
  50. "killSelection": "YOUNGEST_FIRST",
  51. "labels": {
  52. "DCOS_PACKAGE_DEFINITION": "eyJtZXRhZGF0YSI6eyJDb250ZW50LVR5cGUiOiJhcHBs...Fc0hFd25LbWFXVzRTd3lRV3daN3BOeVNzckcybWUvRFFKYVlQOFBFczd6V3JSQkFBQT0ifQ==",
  53. "DCOS_PACKAGE_FRAMEWORK_NAME": "spark",
  54. "DCOS_PACKAGE_METADATA": "eyJwYWNrYWdpbmdWZXJzaW9uIjoiNC4wIiwibmFtZSI6...9hc3NldHMvaWNvbi1zZXJ2aWNlLXNwYXJrLWxhcmdlLnBuZyJ9fQ==",
  55. "DCOS_PACKAGE_NAME": "spark",
  56. "DCOS_PACKAGE_OPTIONS": "eyJzZXJ2aWNlIjp7Im5hbWUiOiJzcGFyayIsIm...2RjIjp7fSwia3JiNWNvbmYiOiIifX0sImhkZnMiOnt9fQ==",
  57. "DCOS_PACKAGE_SOURCE": "https://universe.mesosphere.com/repo",
  58. "DCOS_PACKAGE_VERSION": "2.7.0-2.4.0",
  59. "DCOS_SERVICE_NAME": "spark",
  60. "DCOS_SERVICE_PORT_INDEX": "2",
  61. "DCOS_SERVICE_SCHEME": "http",
  62. "SPARK_URI": ""
  63. },
  64. "maxLaunchDelaySeconds": 3600,
  65. "mem": 1024,
  66. "networks": [
  67. {
  68. "mode": "host"
  69. }
  70. ],
  71. "portDefinitions": [
  72. {
  73. "labels": {
  74. "VIP_0": "dispatcher.spark:7077"
  75. },
  76. "name": "dispatcher",
  77. "port": 10000,
  78. "protocol": "tcp"
  79. },
  80. {
  81. "labels": {
  82. "VIP_1": "dispatcher.spark:4040"
  83. },
  84. "name": "dispatcher-ui",
  85. "port": 10001,
  86. "protocol": "tcp"
  87. },
  88. {
  89. "labels": {
  90. "VIP_2": "dispatcher.spark:80"
  91. },
  92. "name": "dispatcher-proxy",
  93. "port": 10002,
  94. "protocol": "tcp"
  95. }
  96. ],
  97. "requirePorts": false,
  98. "tasks": [
  99. {
  100. "appId": "/spark",
  101. "healthCheckResults": [
  102. {
  103. "alive": true,
  104. "consecutiveFailures": 0,
  105. "firstSuccess": "2019-03-18T19:20:52.376Z",
  106. "instanceId": "instance [spark.marathon-c0efd47d-49b2-11e9-b8cd-1aeaf266c008]",
  107. "lastSuccess": "2019-03-18T19:20:52.376Z"
  108. }
  109. ],
  110. "host": "10.0.2.221",
  111. "id": "spark.c0efd47d-49b2-11e9-b8cd-1aeaf266c008",
  112. "ipAddresses": [
  113. {
  114. "ipAddress": "10.0.2.221",
  115. "protocol": "IPv4"
  116. }
  117. ],
  118. "localVolumes": [],
  119. "ports": [
  120. 21515,
  121. 21516,
  122. 21517
  123. ],
  124. "region": "aws/us-west-2",
  125. "servicePorts": [],
  126. "slaveId": "02b1bdc8-2bac-44a0-81ff-65816936b97b-S1",
  127. "stagedAt": "2019-03-18T19:19:30.217Z",
  128. "startedAt": "2019-03-18T19:20:37.127Z",
  129. "state": "TASK_RUNNING",
  130. "version": "2019-03-18T19:19:29.410Z",
  131. "zone": "aws/us-west-2a"
  132. }
  133. ],
  134. "tasksHealthy": 1,
  135. "tasksRunning": 1,
  136. "tasksStaged": 0,
  137. "tasksUnhealthy": 0,
  138. "unreachableStrategy": {
  139. "expungeAfterSeconds": 0,
  140. "inactiveAfterSeconds": 0
  141. },
  142. "upgradeStrategy": {
  143. "maximumOverCapacity": 0,
  144. "minimumHealthCapacity": 0
  145. },
  146. "user": "nobody",
  147. "version": "2019-03-18T19:19:29.410Z",
  148. "versionInfo": {
  149. "lastConfigChangeAt": "2019-03-18T19:19:29.410Z",
  150. "lastScalingAt": "2019-03-18T19:19:29.410Z"
  151. }
  152. }

父命令

命令说明
dcos marathon将应用程序部署到 DC/OS 并对其进行管理。