Date
1 - 9 of 9
Stemcells, Garden, and rootfs: how are these related?
J K
hi,
I'm learning about Cloud Foundry's ideas of how to organize applications and how it works under the covers. At the moment I'm having a little trouble understanding the relationship between a few ideas in CF: "rootfs", "Garden", and "stem cells". Can someone explain: (1) their understanding of what these ideas are; and (2) how they are related? Thank you! |
|
Nicholas Calugar
Hi JK,
toggle quoted message
Show quoted text
I don't work on any of these parts of Cloud Foundry but I can give a very basic overview: [1] rootfs: the filesystem used for applications deployed on Cloud Foundry. The current default is cflinuxfs2, based on Ubuntu 14.04 [2] garden: "A rich golang client and server for container creation and management with pluggable backends for linux, windows and The Open Container Initiative Spec". Garden is running on the Diego cells where Cloud Foundry applications are run. [3] stemcells: The base image for VMs deployed by bosh. Highly recommend staring with the Cloud Foundry documentation: http://docs.cloudfoundry.org/. You can also "kick the tires" by trying one of the hosted versions of Cloud Foundry: https://www.cloudfoundry.org/learn/certified-providers/ Nick [1] https://github.com/cloudfoundry/stacks [2] https://github.com/cloudfoundry-incubator/garden [3] http://bosh.cloudfoundry.org/docs/stemcell.html On Wed, May 18, 2016 at 1:00 PM, J K <falconwing(a)gmail.com> wrote:
hi, |
|
Amit Kumar Gupta
Hi J K,
To add to what Nick said: You can think of Garden as a generic API for something that creates containers and runs processes in them, and can be backed by various different backend implementations, e.g. garden-linux or garden-windows. It leaves the responsibility of what it means to actually create a container to the backend, but provides an interface for interacting with containers and container processes as logical resources. At a high level, a container consists of a root file system image, a set of resource constraints, and some commands to run inside the container. Cloud Foundry is able to take your raw application source code and build it inside a container. The root file system used for the container that builds your code is the "rootfs". So for the build process, the standard "cflinuxfs2" rootfs is used to create the container, then your code is injected and compiled, and the resulting asset is extracted. Next, when Cloud Foundry runs your application, it again creates a container starting from the rootfs image, injects your built code, and runs it. The "create a container and run xyz" responsibility belongs to Garden, so the relationship between garden and the rootfs is that Cloud Foundry finds a Garden process somewhere and instructs it to use a particular rootfs to use to create a container out of it. A single application developer wants to push their code to Cloud Foundry and have it run the code in some container. But an instance of the Cloud Foundry platform can support many (e.g. hundreds of thousands) application developers all doing the same thing. An operator managing an instance of Cloud Foundry needs to take Cloud Foundry software itself and have it be deployed and run by something. The toolchain for this is called BOSH. BOSH typically operates on VMs in a virtualized infrastructure like AWS of vSphere. BOSH can run Cloud Foundry, or any number of different distributed software services, on top of virtualized infrastructure. Analogous to the rootfs which is a common base layer image for all applications running on Cloud Foundry, a stemcell is a common base VM image for all services deployed by BOSH (e.g. each of the components comprising Cloud Foundry itself). The documentation Nick has linked you to can give you more detailed information about these concepts, as well as the reasoning behind them. Best, Amit On Wed, May 18, 2016 at 4:53 PM, Nicholas Calugar <ncalugar(a)pivotal.io> wrote: Hi JK, |
|
J K
Thank you, Amit. Is it correct to say that a stack (in the `cf stacks` sense) is a combination of rootfs + stemcell? If you have a "base VM" of, say, Linux -- and if that's the one bosh is deploying to all the cells, how does that become a `windows2012R2` stack in CF?
|
|
Duncan Winn
Hey JK, a stack is a combination of the rootfs and droplet. This is
toggle quoted message
Show quoted text
conceptually a "container image" that will then run in your garden container. For a windows stack you would need a windows vm/cell to run it. On Thu, May 19, 2016 at 8:26 AM J K <falconwing(a)gmail.com> wrote:
Thank you, Amit. Is it correct to say that a stack (in the `cf stacks` --
Duncan Winn Cloud Foundry PCF Services |
|
Duncan Winn
sorry JK - it's still early am (ignore what I just said) - the stack is the
toggle quoted message
Show quoted text
specific rootfs - the container image is a combination of a droplet plus a stack. The container image will then run in your garden process. For a windows stack you would need a windows vm/cell to run it. On Thu, May 19, 2016 at 8:43 AM Duncan Winn <dwinn(a)pivotal.io> wrote:
Hey JK, a stack is a combination of the rootfs and droplet. This is --
Duncan Winn Cloud Foundry PCF Services |
|
Steven Benario
For a bit more information on how Windows does containerization (hint: it
toggle quoted message
Show quoted text
doesn't involve a rootfs), you can check out a recent blog post from the Greenhouse team: https://engineering.pivotal.io/post/windows-containerization-deep-dive/ On Thu, May 19, 2016 at 11:47 AM, Duncan Winn <dwinn(a)pivotal.io> wrote:
sorry JK - it's still early am (ignore what I just said) - the stack is |
|
J K
Is it correct to say that in the context of CF, `rootfs` is a Linux-only abstraction, and is not necessarily relevant to Garden (whereas it may be relevant to one or more of the Garden backends)?
|
|
Sunil Babu <cloudgrp.assist@...>
Hi
toggle quoted message
Show quoted text
Rootfs is not specific to an os flavor to mention in Windows it's referred as rootdsk This is the base volume which comes when a vm is created Since more people work on Unix flavor to generalise it's referred as root file sys. When Windows also ventured in cf things changed and ref as rootdisk (virtualization on windows is on disk level Hope this clarifys u On Thursday, May 19, 2016, J K <falconwing(a)gmail.com> wrote:
Is it correct to say that in the context of CF, `rootfs` is a Linux-only --
Thanks & Regards Sunil Babu K C +91-81970-35608 |
|