anchor.diff:  }
   ```
   
  -Sample `agent.json` which configures the agent ot read from a config drive. See [reference sample config-drive json](https://github.com/cloudfoundry/bosh-agent/blob/cecf354d90f6cedf540799fb50395adb034b16d2/integration/assets/config-drive-agent.json). See [config drive integration test](https://github.com/cloudfoundry/bosh-agent/blob/cecf354d90f6cedf540799fb50395adb034b16d2/integration/config_drive_test.go)
  +Sample `agent.json` which configures the agent ot read from a config drive. See [reference sample config-drive json](https://github.com/cloudfoundry/bosh-agent/blob/cecf354d90f6cedf540799fb50395adb034b16d2/integration/assets/config-drive-agent.json). See [config drive integration test](https://github.com/cloudfoundry/bosh-agent/blob/cecf354d90f6cedf540799fb50395adb034b16d2/integration/config_drive_test.go):
   
   ```json
   {
  
positive.code: Here is an overview of the interactions between the CPI and the Agent on CloudStack as an example:
  
  * The CPI drives the IaaS and the Agent.
  * The Agent is a versatile process which configures the OS to leverage IaaS-provisionned resources (network interfaces, disks, etc.), and perform other BOSH tasks (job compilation, job instantiation, etc.)
  * The CPI asks the IaaS to instantiate VM template, VMs, volumes and possibly other constructs (floating IPs, security groups, connect LBs, etc.)
  * The Agent is initially driven by the CPI through the bosh-registry, and then by the Director through NATS-based messaging. The registry provides Director-side meta data to the Agent.
  
  <div class="gray"><%= image_tag("images/cpi-interactions-overview.png") %></div>
  
  <%#
  Image source in Saas (no need to own a graffle license and run macos)
  https://www.gliffy.com/go/html5/9205487?toke=&app=1b5094b0-6042-11e2-bcfd-0800200c9a66&dev=false
  %>
  
  The following sequence diagram illustrates in more details the CPI, agent, and registry interactions,
  in the case of the [CloudStack CPI](https://github.com/cloudfoundry-community/bosh-cloudstack-cpi-release)
  
  <div class="gray"><%= image_tag("images/cpi-sequence-diag.png") %></div>
  
  
negative.code: }
  ```
  
  The supported format of the metadata server by the bosh-agent is documented in [UserDataContentsType](https://godoc.org/github.com/cloudfoundry/bosh-agent/infrastructure#UserDataContentsType) and [http\_metadata\_service_test.go](https://github.com/cloudfoundry/bosh-agent/blob/1dca3244702c18bf2c36483c529d4e7b3fb92b2e/infrastructure/http_metadata_service_test.go), along with the expected behavior of the bosh agent when reading this config.
  
  ----
  ### <a id="registry"></a> Registry
  
  The registry provides bosh-side metadata to the bosh agent.
  
  From the [Warden CPI documentation](https://github.com/cppforlife/bosh-warden-cpi-release/blob/be1869737c0bfba96662dde3499c9181863f91a7/docs/bosh-micro-usage.md):
  
  * The registry is used by the CPI to pass data to the Agent. The registry is started on a server specified by registry properties.
  * If SSH tunnel options are provided, a reverse ssh tunnel is created from the MicroBOSH VM to the registry, making the registry available to the agent on remote machine.
  
  #### <a id="registry-protocol"></a> Registry HTTP protocol
  
  The Agent expects to communicate with the bosh registry over a REST API documented in [api\_controller\_spec.rb](https://github.com/cloudfoundry/bosh/blob/2f73281f1a2a155ee807e7c0c9b8187c5a742f78/bosh-registry/spec/unit/bosh/registry/api_controller_spec.rb)
  
  Reference registry client and servers implementations are available in:
  
  * go-lang through [frodenas/bosh-registry](https://github.com/frodenas/bosh-registry)
  * java through [cloudfoundry-community/bosh-cloudstack-cpi-core](https://github.com/cloudfoundry-community/bosh-cloudstack-cpi-core/tree/44d14a5f184d2d5e8f1f2fcd6344e734d3344673/src/main/java/com/orange/oss/cloudfoundry/cscpi/boshregistry)
  
  #### <a id="registry-format"></a> Registry settings format
  
  The JSON payload of the settings stored in the registry, and its format supported by the Agent are documented in [settings_test.go](https://github.com/cloudfoundry/bosh-agent/blob/ebf9a36dfddf783ffae5ae3748787d259a29374a/settings/settings_test.go)
  
  Sample registry content:
  
  ```json
  {
  