0

As you know, there is a "docker exec" command in Docker to execute a command in a container. There is a "kubectl exec "command in K8S to execute a command in a K8S poc. So, is there a "marathon exec " like command in Marathon to execute commands in Marathon App?

The detail scenario is: we use Marathon as our container orchestration tool. And we deploy Ceph RGW by Marathon. After deployment, we want create a S3 user by command "radosgw-admin user create", which can only be executed in shell. As a result, how can I implement this situation. Thanks a lot.

styshoo
  • 563
  • 4
  • 9

2 Answers2

1

I didn't come across the exec command on Marathon. However, there is dcos task executor which is used to execute the commands inside the containers. pretty much similar to docker exec. https://docs.mesosphere.com/1.9/monitoring/debugging/task-exec/

Hope this helps you.

Naga
  • 73
  • 1
  • 10
  • I think it's exactly what I want, I will try it later. Any more, is there any Java library of `dcos task exec`? Sorry I did do some search on this, but I didn't find any. – styshoo Jul 13 '17 at 15:46
  • DC/OS is a data center distributed operating system based on Apache Mesos. Which is an interesting one and there is a lot to learn. Online tutorials are available. [link](https://dcos.io/) – Naga Jul 13 '17 at 21:43
0

In my experience, the only option is to SSH to the machine with the Docker task, then docker exec from there

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245