Skip to content

How to Write Components within Spec

Each Manifest describes an application, which is composed of one or more components, each of which may vary in type. Here we will explain how to write the components of an application within the Manifest.

Composition

Each component basically consists of the following six parts:

  • type
  • name
  • target
  • labels
  • annotations
  • traits

Type

Defines the type of the component. You can refer to the Component Catalog for available component types.

Name

The name of the component.

Target

The target for deploying the component. RAPD will find the Deployment target with this name and deploy the component to this cluster.

Labels

Labels assigned to the component, it’s not a necessary part.

Annotations

Annotations assigned to the component, it’s not a necessary part.

Traits

The characteristics of the component.

What are component traits? We have defined the component type, name, labels, and so on, but what else does a component lack? For example, a webservice.container may need to expose a port externally, connect to a database, or an application may need to pass environment variables for database connection.

Within RAPD’s Manifest, an interesting way is provided to meet these application needs, by describing the characteristics of components through Traits. In the next chapter, we will describe how to deploy a WordPress through RAPD’s Manifest in a simple way, and how to write its Traits.