Skip to content

Blueprints

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

Resource Create Get Update Delete Publish Unpublish
Blueprint YES YES YES YES YES N/A

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 Rafay Managed Ingress Controller in your cluster blueprint if it is not required or will collide with your preferred ingress controller.

./rctl create blueprint <blueprint-name> <addon-on-1> <addon-on-2> [flags]

Declarative

You can also create a blueprint into Rafay 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
spec:
  # list of addons
  addons:
    - cert-manager
    - kubeless
  # rafay ingress true/false
  rafayIngress: true
  # optional version name to publish on creation
  versionName: v1

List Blueprints

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

./rctl get blueprint
+-----------------------------+-----------+
|            NAME             | PUBLISHED |
+-----------------------------+-----------+
| noingress                   | true      |
| faas                        | true      |
| monitoring                  | true      |
| standard-blueprint          | true      |
| blueprint-with-cert-manager | true      |
| standard-cluster-blueprint  | true      |
| blueprint-newrelic          | true      |
| eks-blueprint               | true      |
+-----------------------------+-----------+

Get The Specific Blueprint Info

Use this command to retrieve the a specific blueprint 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
+--------------------+------------------------------+------------------------------+-----------+--------------+
|        NAME        |          CREATED AT          |         MODIFIED AT          | PUBLISHED | VERSION NAME |
+--------------------+------------------------------+------------------------------+-----------+--------------+
| standard-blueprint | Fri Aug 14 21:33:46 UTC 2020 | Fri Sep 18 04:16:52 UTC 2020 | true      | v091720      |
+--------------------+------------------------------+------------------------------+-----------+--------------+

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

Update a blueprint by providing a new list of addons and flags. The list of addons will replace the previous list of addons.


Imperative

./rctl update blueprint <blueprint-name> <addon-1> <addon-2> ... -<addon-name> [flags]

Declarative

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

Important

Ensure that you provide a version for every blueprint update to ensure you can track the versions.


Publish Blueprint

Publish a blueprint and provide an optional version

./rctl publish blueprint <blueprint> <version-name>

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.