0

I was able to setup the minimesos cluster on my laptop and also could deploy a small command-line utility. Now the questions;

  1. What is the image "containersol/minimesos" used for? It is pulled but I don't see it running, when I do "docker ps". "docker images" lists it.

  2. How come when I run "top" inside the mesos-agent container, I see all the processes running in my host (laptop)? This is a bit strange.

  3. I was trying to figure out what's inside minimesos script. I see that there's just one "docker run ... " command. Would really appreciate if I could get to know what the aforementioned command does that results into 4 containers (1 master, 1 slave, 1 zk, 1 marathon) running on my laptop.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
soupybionics
  • 4,200
  • 6
  • 31
  • 43

2 Answers2

1

containersol/minimesos runs the Java code that is the core of minimesos. It only runs until it executes the command from the CLI. When you do minimesos up the command name and the minimesosFile will be passed to this container. The container in turn will execute the Java code that will create the other containers that form the Mesos cluster specified in the minimesosFile. That should answer #3 also. Take a look at MesosCluster class thats the root of where the magic happens.

I don't know the answer to #2 will get back to you when I find out.

Adam Sandor
  • 382
  • 1
  • 11
  • Thanks. Few more observations: – soupybionics Jun 18 '16 at 14:18
  • Checkout out the code. "make" compiles an executor, scheduler (both helloworld) and minimesos-cli images. Based on my code study(i am a java beginner), minimesos-cli jar (which is an executable jar) is a command line interface to minimesos jar and accordingly has a "void main". But I am confused as I think minimesos-cli is not used when doing "minimesos up" . It instead uses minimesos (by doing its image pull first, as that image is not built by "make", but just the jar). So how does minimesos run on its own? I couldn't find any main function in there or some config that specifies an entry. – soupybionics Jun 18 '16 at 14:26
1

Every minimesos command runs as a short lived container, whose image is containersol/minimesos.

When you run 'minimesos up' it launches containersol/minimesos with 'up' as the argument. It then launches a cluster by starting other containers like containersol/mesos-agent and containersol/mesos-master. After the cluster is up the containersol/minimesos container exists and is removed.

We have separated cli and minimesos core as a refactoring to prepare for the upcoming API module. We are creating an API to support clients for different programming language. The first client will be a Golang client.

In this new setup minimesos will run launch a long running API server and any minimesos cli commands call the API. The clients will also launch the API server and call the API.