Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions content/about.md

This file was deleted.

4 changes: 4 additions & 0 deletions content/addons-common.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Common Addons

(See [runtime config](runtime-config.md#addons) for an introduction to addons.)

## Syslog forwarding {: #syslog }
Expand Down Expand Up @@ -30,6 +32,7 @@ addons:
See [syslog_forwarder job](https://bosh.io/jobs/syslog_forwarder?source=github.com/cloudfoundry/syslog-release).

---

## Custom SSH login banner {: #login-banner }

!!! note
Expand Down Expand Up @@ -59,6 +62,7 @@ addons:
See [login_banner job](https://bosh.io/jobs/login_banner?source=github.com/cloudfoundry/os-conf-release).

---

## Custom SSH users {: #misc-users }

!!! warning
Expand Down
54 changes: 32 additions & 22 deletions content/agent-cpi-interactions.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Agent Interactions

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-provisioned 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 director-to-agent communication happens through NATS-based messaging.
* The initial configuration of the agent is done via the metadata server.
- The CPI drives the IaaS and the Agent.
- The Agent is a versatile process which configures the OS to leverage IaaS-provisioned 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 director-to-agent communication happens through NATS-based messaging.
- The initial configuration of the agent is done via the metadata server.

!!! note
If either of CPI, Director or stemcell does not support [CPI API version 2](cpi-api-v2.md#reference-table-based-on-each-component-version),
Expand Down Expand Up @@ -85,13 +87,15 @@ Render it online http://plantuml.com/plantuml/ or from a private plantuml instan
-->

---

## Agent settings {: #agent-settings}

This section details the configuration and protocols supported by the Agent.

[VM Configuration Locations](vm-config.html#agent) provides a list of Agent configuration files and their roles.

---

### `agent.json` file {: #agent-json }

`/var/vcap/bosh/agent.json`: Start up settings for the Agent that describe how to find bootstrap settings, and disable certain Agent functionality.
Expand All @@ -102,11 +106,11 @@ The Platform part of the file is documented into [LinuxOptions](https://pkg.go.d

The Infrastructure part of the file is documented into [Options](https://pkg.go.dev/github.com/cloudfoundry/bosh-agent/v2/infrastructure#Options) and in particular:

* the sources of configuration with [SettingsOptions](https://pkg.go.dev/github.com/cloudfoundry/bosh-agent/v2/infrastructure#SettingsOptions):
- the sources of configuration with [SettingsOptions](https://pkg.go.dev/github.com/cloudfoundry/bosh-agent/v2/infrastructure#SettingsOptions):

* [CDROM](https://pkg.go.dev/github.com/cloudfoundry/bosh-agent/v2/infrastructure#CDROMSourceOptions)
* [ConfigDrive](https://pkg.go.dev/github.com/cloudfoundry/bosh-agent/v2/infrastructure#ConfigDriveSourceOptions)
* [HTTP](https://pkg.go.dev/github.com/cloudfoundry/bosh-agent/v2/infrastructure#HTTPSourceOptions)
- [CDROM](https://pkg.go.dev/github.com/cloudfoundry/bosh-agent/v2/infrastructure#CDROMSourceOptions)
- [ConfigDrive](https://pkg.go.dev/github.com/cloudfoundry/bosh-agent/v2/infrastructure#ConfigDriveSourceOptions)
- [HTTP](https://pkg.go.dev/github.com/cloudfoundry/bosh-agent/v2/infrastructure#HTTPSourceOptions)

Sample `agent.json` which configures the agent to read from an HTTP metadata service at a custom URL:

Expand Down Expand Up @@ -168,6 +172,7 @@ Sample `agent.json` which configures the agent to read from a config drive. See
```

---

### Agent settings format {: #agent-settings-format}

The current state of the JSON settings format supported by the Agent is documented in [settings_test.go](https://github.com/cloudfoundry/bosh-agent/blob/master/settings/settings_test.go) as well as in [settings.go](https://github.com/cloudfoundry/bosh-agent/blob/master/settings/settings.go).
Expand Down Expand Up @@ -261,34 +266,38 @@ Sample settings JSON:
}
```

----
---

### settings.json file {: #settings-json }

`/var/vcap/bosh/settings.json`: Local copy of the bootstrap settings used by the Agent to configure network and system properties for the VM. They are refreshed every time Agent is restarted.

The `settings.json` format is the same as the settings format initially transferred to the agent.

---

### Agent settings sources {: #agent-settings-sources}

Regardless of the source of the agent settings, the JSON document is the same.
Regardless of the source of the agent settings, the JSON document is the same.
The agent settings as described above are transferred to the agent
using one of the following ways:

* Metadata server is used if all involved components (director, CPI, agent) support CPI API V2.
* If one of the components does not yet support CPI API V2, the agent reads its
- Metadata server is used if all involved components (director, CPI, agent) support CPI API V2.
- If one of the components does not yet support CPI API V2, the agent reads its
settings from the registry.

!!! tip
See [CPI API V2](cpi-api-v2.md) and [CPI V2 Migration Guide](cpi-api-v2-migration-guide.md) for more information on how the CPI, Agent, and Director behave in a registry-less environment.

---

### CPI API V1 {: #cpi-api-v1}

This section describes the agent interactions prior to CPI API V2

----
##### Metadata Server {: #metadata }
---

#### Metadata Server {: #metadata }

The metadata server initially serves the registry URL and DNS server list.

Expand All @@ -304,21 +313,22 @@ Following is a sample content of the user-data part of the HTTP metadata

The supported format of the metadata server by the bosh-agent is documented in [UserDataContentsType](https://pkg.go.dev/github.com/cloudfoundry/bosh-agent/v2/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.

----
##### Registry {: #registry }
---

#### Registry {: #registry }

The registry provides bosh-side metadata to the bosh agent.

From the [Warden CPI documentation](https://github.com/cloudfoundry/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.
- 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.

###### Registry HTTP protocol {: #registry-protocol }
##### Registry HTTP protocol {: #registry-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)
- 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)
3 changes: 2 additions & 1 deletion content/alicloud-cpi-errors.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Alicloud CPI Errors

## Incorrect KeyPair

> SDK.ServerError
Expand All @@ -6,7 +8,6 @@

Make sure that your key_pair_name is correct and it is in the current region.


## Incorrect Private IP

> SDK.ServerError
Expand Down
Loading