FAQ
Elizabeth,

Could you put this tutorial on the wiki -
https://github.com/mrdavidlaing/cf-docs-contrib/wiki - so we can amend it
as it evolves.

Thanks

D


On 17 April 2013 00:59, Elisabeth Hendrickson
wrote:
Greetings!

The Cloud Foundry development team has been hard at work increasing test
coverage, and as part of that the team created integration tests for dea_ng
that run DEA, Warden, and NATS all in a single Vagrant VM. I've been using
this setup to play with the components manually and see what happens inside
the system when I stage and run apps. It occurred to me that might be of
interest to this group, so I thought I'd share some of my notes.

I'm starting with the documentation in the README on the dea_ng repo (see
https://github.com/cloudfoundry/dea_ng). However, since my goal was to
explore the DEA manually, I'm streaming all the output to stdout in
different shells. Here's how to do it:

1) Follow the instructions to get Vagrant 1.1x set up. See
http://docs.vagrantup.com/v2/installation/index.html

2) Clone the dea_ng repo and set up the Vagrant box.

git clone https://github.com/cloudfoundry/dea_ng
bundle install
rake test_vm
vagrant up

Note that this step takes a while. You have time to grab a beverage of
choice.

3) Log into the Vagrant box and start Warden.

vagrant ssh
cd /warden/warden
bundle install
rvmsudo bundle exec rake warden:start[config/test_vm.yml]

4) In a new shell, start the other dependencies.

vagrant ssh
cd /vagrant
bundle install
git submodule update --init
foreman start

5) In yet another shell, start the DEA.

vagrant ssh
cd /vagrant
bin/dea config/dea.yml

6) In yet another shell, listen in on NATS.

vagrant ssh
cd /usr/local/bin
nats-sub ">" -s nats://localhost:4222

At this point you should start seeing the DEA advertising its availability
on NATS.

7) Finally, stage a fake app. I'm using the same fake app that the
integration tests use.

vagrant ssh
cd /usr/local/bin
nats-pub 'staging'
"{\"async\":false,\"app_id\":\"some-app-id\",\"properties\":{},\"download_uri\":\"
http://localhost:9999/unstaged/sinatra\",\"upload_uri\":\"
http://localhost:9999/staged/sinatra\"}" -s nats://localhost:4222

Watch what happens in the shell sessions for the DEA, Warden, and NATS.
You can see the DEA spin up a Warden container, and can see the staging
messages in the Warden output. You can also see the staging messages in the
DEA output. On NATS, you can see that the DEA advertises that it's
available memory goes down while staging the app, then back up again when
it's done.

If you want more ideas for how to use NATS to tell the DEA to do stuff,
you can take a look at the integration tests in
https://github.com/cloudfoundry/dea_ng/tree/master/spec/integration. They
give an example of the JSON you would publish on NATS to tell the DEA to
run a staged app.

Also, now that you have these components running in a single VM, you can
add more of the components. The next step I did was to run the UAA and
CCNG, then finally add in the router.

If these kinds of notes are interesting to folks, I can write up those
instructions too.

Is this kind of information useful/helpful/interesting?

Thanks for any feedback,

Elisabeth
Quality Engineering, Cloud Foundry

--
David Laing
Trading API @ City Index
david@davidlaing.com
http://davidlaing.com
Twitter: @davidlaing

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 52 | next ›
Discussion Overview
groupvcap-dev @
postedApr 16, '13 at 11:59p
activeJul 17, '13 at 9:04a
posts52
users13

People

Translate

site design / logo © 2021 Grokbase