Where does gravity master container run?

Hello,

I am new to gravity and I’m trying to understand where the master container runs.

My understanding is:

  • the k8s components run inside the master container
  • the master container runs in a docker container and starts when we start the gravity service on the node

What I don’t know is:

  • how come when I run gravity shell on any of the nodes, I can logon to the gravity master container (i.e. planet)?
  • does the master container (planet) run on 1 node only? and when I run gravity shell from other nodes, it connects me to the master container on the master node?
  • or does every node run its own master container? and so when I run gravity shell, i’m connecting to the planet container running on the local node?

I also believe the Ops Center runs inside a k8s pod, and is different from the master container. Previously I thought these 2 were the same thing. Also the Ops Center pod appears to be a daemonset, but I think it only runs on the master node only? Due to nodeSelector?

If someone can explain to me the master container (planet) and Ops Center pods that would be great!

Also trying to understand how the logs from the different nodes and pods are forwarded to Ops Center, but that’s another topic.

Thanks.

@flarierza Lots of questions here, I’ll do my best to explain the concept.

Not exactly. Conceptually thinking of it this way is fine, but digging in this isn’t exactly what happens. What we do is we take the code docker uses for creating a container, and embed it within the planet binary. Gravity runs as a systemd unit on the host, which when it’s launched, will then self-initialize the planet (master) container. One of the objectives with gravity is to minimize the system dependencies, so we don’t want an admin to need to install docker or other system components for gravity to operate. Everything needed should be self contained in the installer tarball.

Conceptually the way planet gets used, is we support a number of distributions and require a number of utilities and configurations for the cluster to operate. So the planet container is used to make all the hosts that gravity can run on to look the same, have all the programs that make up a kubernetes cluster available, utilities to debug the cluster, etc.

So when we call it a master container, it’s not really a master container for the entire cluster when you do gravity shell, it’s the master container for the particular host you’re on. gravity shell simply connects you to planet on the same host, which is used to host all the gravity related processes and programs for the host.

Planet runs on each node that is part of the cluster. In advanced configurations, the planet container can be modified as well, such as to add support for GPU offload for scientific computing.

No, this connects you to the instance on the node you’re on. Every node that is part of the gravity cluster, needs it’s own planet container to host kubernetes, docker, etc.

Correct

Yea it can be hard to relate these competing concepts. Planet is a container you don’t exactly see, because it’s used to host kubernetes, docker, and all the other processes that allow gravity to operate. It’s only seen from gravity shell and systemd on the host. The ops center / ui is indeed running inside the gravity-site kubernetes pods that get deployed to each master. These are closer to regular kubernetes services, that are configured in a way to only run on the master nodes of the cluster.

Correct

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.