Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Learn Bosh - Understand the Bosh Agent - Part 1

Learn Bosh - Understand the Bosh Agent - Part 1

Recorded at YouTube https://www.youtube.com/watch?v=2jpN1mSPZ4Q

If you want to learn about bosh, then you'll want to learn about the bosh agent - it is how every server/instance is controlled by the bosh director. This part 1 of a 3 part short series into the inner workings of bosh from the perspective of the bosh agent itself.

In this screencast, we show an example bosh deployment - deploying a single server running redis - and look at the high level explanation of how the bosh director communicates with the bosh agent, which communicates with monit, which starts and stops the redis server.

Dr Nic Williams

June 05, 2013
Tweet

More Decks by Dr Nic Williams

Other Decks in Programming

Transcript

  1. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT redis-­‐server :6379
  2. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT BASICS How did Redis get on the VM?
  3. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT redis-­‐server :6379 • How did redis-server get configured? • What is monitoring redis-server? • How did redis get installed? • Where did this all start?
  4. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT • How did redis-server get configured? $ bosh ssh redis/0 # ps ax | grep -m 1 redis ... redis-server /var/vcap/jobs/redis/config/redis.conf redis-­‐server :6379
  5. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT redis-­‐server • What is monitoring redis-server? $ bosh ssh redis/0 # ps ax | grep -m 1 redis 1800 redis-server /var/vcap/jobs/redis/config/redis.conf # sudo kill 1800 # ps ax | grep -m 1 redis 11276 redis-server /var/vcap/jobs/redis/config/redis.conf # ps ax | grep -m 1 monit /var/vcap/bosh/bin/monit -I -c /var/vcap/bosh/etc/monitrc monit
  6. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT • How did redis get installed? $ bosh ssh redis/0 # ps ax | grep -m 1 bosh_agent /var/vcap/bosh/bin/ruby /var/vcap/bosh/bin/bosh_agent \ -c -I openstack # sudo cat /var/vcap/bosh/settings.json { ... "mbus": "nats://nats:[email protected]:4222", "blobstore": { "provider": "dav", "options": { "endpoint": "http://216.55.141.200:25250", "user": "agent", "password": "agent" } }, } redis-­‐server monit bosh_agent
  7. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT director monit bosh_agent • Where did this all start? director: the API for a bosh
  8. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT director nats-­‐server monit bosh_agent • Where did this all start? “apply spec” nats: the message bus used within bosh and its managed servers
  9. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT director blobstore monit bosh_agent • Where did this all start? “get blobs” nats-­‐server blobstore: blobs/packages accessed by HTTP (nginx & filesystem)
  10. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT director blobstore redis-­‐server monit bosh_agent • Where did this all start? “start job” nats-­‐server job: a component or thing that runs
  11. DR NIC | STARK & WAYNE | THE DEEP MAGIC

    OF BOSH AGENT ADVANCED Agent logs The message protocol The agent file system Watch next: