Skip to content

Blueprints

Users can use RCTL to automate the lifecycle of operations associated with cluster blueprints.

Resource Create Get Update Delete
Blueprint YES YES YES YES

Create Blueprint

Imperative

Users can use this to create a custom cluster blueprint assembled with a number of addons from the same project. You can also optionally disable the Managed Ingress Controller and the Log Aggregation addons in the default cluster blueprint if it is not required or will conflict with your preferred ingress controller.

./rctl create blueprint <blueprint-name>
./rctl create blueprint version <blueprint-name> <blueprint-version-name> <addon1-name>/<addon1-version-name> <addon2-name>/<addon2-version-name>

Declarative

You can also create a blueprint in your project based on a version controlled blueprint spec that you can store in a Git repository. This enables users to develop automation for reproducible infrastructure.

./rctl create blueprint -f blueprint-spec.yml

An illustrative example of the blueprint spec YAML file is shown below

kind: Blueprint
metadata:
  # blueprint name
  name: custom-blueprint
  # Rafay project name
  project: defaultproject

Use this command to create a blueprint version.

./rctl create blueprint version -f blueprint-version-spec.yml

An illustrative example of the blueprint version spec YAML file is shown below

kind: BlueprintVersion
metadata:
  # version name
  name: v1
  # project name.
  project: defaultproject
spec:
  # blueprint object
  blueprint: custom-blueprint
  # list of addons and thier versions. versions must be provided
  addons:
  - name: addon1
    version: v1
  - name: addon2
    version: v3
  # psps. optional
  psps:
  - test-psp
  # cluster-scoped or namespace-scoped
  pspScope: cluster-scoped
  # rafay ingress. optional. default false
  rafayIngress: true

List Blueprints

You can retrieve/list the blueprints in the current project. An illustrative example is shown below.

./rctl get blueprint
+-----------------------------------+----------+----------+------------------------------+
| NAME                              | VERSIONS | CLUSTERS | MODIFIED AT                  |
+-----------------------------------+----------+----------+------------------------------+
| standard-cluster-blueprint        | 16       | 0        | Mon Nov  2 22:20:32 UTC 2020 |
+-----------------------------------+----------+----------+------------------------------+
| import-cluster-blueprint          | 14       | 0        | Tue Nov  3 04:29:48 UTC 2020 |
+-----------------------------------+----------+----------+------------------------------+
| prometheus-blueprint              | 1        | 0        | Fri Aug 14 06:01:26 UTC 2020 |
+-----------------------------------+----------+----------+------------------------------+

Get The Specific Blueprint Info

Use this command to retrieve a specific blueprint's detailed information in the configured project.

./rctl get blueprint <blueprint-name>

Below is the illustrative example of the "standard-blueprint" blueprint information:

./rctl get blueprint standard-blueprint
+--------------------------------+--------------------------------+------------------------------+
| BLUEPRINT VERSION NAME         | COMPONENTS                     | CREATED AT                   |
+--------------------------------+--------------------------------+------------------------------+
| v1                             | v1-debug-infra,                | Fri May 22 16:23:33 UTC 2020 |
|                                | v1-edge-client,                |                              |
|                                | v1-logging-infra,              |                              |
|                                | v2-infra, v2-ingress-infra,    |                              |
|                                | v2-prometheus, cert-manager    |                              |
+--------------------------------+--------------------------------+------------------------------+
| v5                             | v1-debug-infra,                | Wed Jun  3 20:21:16 UTC 2020 |
|                                | v1-edge-client,                |                              |
|                                | v1-logging-infra,              |                              |
|                                | v2-infra, v2-ingress-infra,    |                              |
|                                | v2-prometheus, cert-manager,   |                              |
|                                | splunk-connect, datadog        |                              |
+--------------------------------+--------------------------------+------------------------------+

Or you can use below command to get more information of the blueprint in json or yaml format

./rctl get blueprint <blueprint-name> -o json
./rctl get blueprint <blueprint-name> -o yaml


Update Blueprint

You can create a new version of an existing blueprint. For declarative models, ensure that you specify the version number for your blueprint in the specification file.

./rctl create blueprint version -f <blueprint-version-spec.yaml>

For example, the version for this blueprint update is highlighted below.

kind: BlueprintVersion
metadata:
  # version name
  name: v1
  # project name
  project: sample-project
spec:
  # blueprint object
  blueprint: custom-blueprint
  # list of addons and thier versions. versions must be provided
  addons:
  - name: addon1
    version: v1
  - name: addon2
    version: v3
  # psps. optional
  psps:
  - test-psp
  # cluster-scoped or namespace-scoped
  pspScope: cluster-scoped
  # rafay ingress. optional. default false
  rafayIngress: true

Delete Blueprint

Delete a cluster blueprint in the configured project. This is a destructive operation and will delete all versions of the blueprint.

./rctl delete blueprint <blueprint name>

Important

It is not possible to delete a blueprint that is actively being used on clusters.