263n ramos

Upload: zennro

Post on 03-Jun-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 263n Ramos

    1/3

    Gastn Ramos

    "La mayora de las gaviotas no se molesta en aprender sino las normas de vuelo ms elementales: como ir y volver entre playa y comida. Para la mayora dlas gaviotas, no es volar lo que importa, sino comer. Para esta gaviota, sin embargo, no era comer lo que le importaba, sino volar. Ms que nada en el mund

    Juan Salvador Gaviota amaba volar".

    Installing Warden on debian Wheezy

    by Gastn Ramos

    What is warden?

    The projects primary goal is to provide a simple API for managing isolated environments. These isolated environments or containers can be limited in terms of CPU usage, memory usage, disk usage, and network access. As of writing, the only supported OS is Linux.

    read more here: https://github.com/cloudfoundry/warden/tree/master/warden (https://github.com/cloudfoundry/warden/tree/mas/warden)

    Warden is a key component in the Cloud Foundry (http://docs.cloudfoundry.com/) ecosystem. When you push a new app to Cloud Founda new container will be created.

    So, lets go to the point, the idea is to install warden in a debian wheezy system, I added debian support to warden in my fork in the Altororepo: https://github.com/Altoros/warden (https://github.com/Altoros/warden)

    In order make a fresh installation we are going to use vagrant with virtualbox provider, lets start downloading the vagrant box frohttp://www.vagrantbox.es/ (http://www.vagrantbox.es/).

    Then add the new box to vagrant:

    Then list all the available boxes to see if it was added ok:

    and you should see something like that:

    Then lets create a new folder and create our vagrant VMusing the box that we just already added:

    !"

    Now we are ready to start installing warden in the VM:

    #

    Edit fstab and add this line:

    $ $ $

    Now clone the warden repo and checkout the add-debian-rootfsbranch

    About these ads (http://en.wordpress.com/about-these-ads/)

    !"

    ! $%

  • 8/12/2019 263n Ramos

    2/3

    %!& " $

    add warden as shared folder in Vagrant file

    edit Vagrant file and add this line:

    $!'$ (() ((

    then login into the vm with ssh and install all required gems:

    !

    edit config/linux.yml and change the container_rootfs_path,if you dont change it the setup will be lost after you reboot the vm because it is pointed to /tmp by default.Ive created a new dir in /tmp-warden and pointed the root_fs to it.

    After that you can run the setup

    " *$!+

    and when it finishes you will be able to start the warden server:

    "

    and then run the client to be able to manage containers:

    Lets run some basic warden commands:

    Create 2 new containers:

    , -./, -./,

    List the already created containers:

    ,

    *+ -./*+ -./,

    You can see the directories of the containers, replace [tmp-warden] with the folder that your filled in the config/linux.yml:

    *!+

    0 0 1 2 322 -./ 0 0 1 2 32. -./ / 0 1 2 /. !

    If you take a look to the logs while you create a container, you can figure out that this is the flow more or less:

    1. method: set_deferred_success

    !!

    !"

    ! $%

  • 8/12/2019 263n Ramos

    3/3

    2. Create the container

    !! *!+-.3

    3. method:do_create

    !!

    4. Start the container

    *!+-.3

    5. method: write_snapshot

    !!

    6. method: dispatch

    !!

    And thats all, if you have any comments feel free to post them here!

    PUBLISHED: Wednesday, 16 October , 2013 (2013-10-16T12:45:25-0300)FILED UNDER: cloudfoundry, rubyTAGS: cf : cloudfoundry : container : linux : warden

    Blog at WordPress.com. The Manifest Theme.

    Follow

    Follow Gastn Ramos

    Powered by WordPress.com

    !"

    ! $%