Blueprints
CBLE Blueprints are a custom YAML-based configuration language inspired by Terraform and Docker Compose v3 syntax.
Here is what a basic blueprint looks like:
openstack-example.yaml
version: "1.0" # (1)!
host1:
resource: openstack.v1.host # (2)!
config: # (3)!
hostname: host1
image: UbuntuJammy2204
flavor: medium
disk_size: 10
networks:
network1:
dhcp: false
ip: 10.10.0.1
depends_on: # (4)!
- router1
main_nat:
data: openstack.v1.network # (5)!
config:
name: MAIN-NAT
host2:
resource: openstack.v1.host
config:
hostname: "{{ .Host2Hostname }}"
image: UbuntuJammy2204-Desktop
flavor: medium
disk_size: 25
networks:
main_nat:
dhcp: true
depends_on:
- host1
network1:
resource: openstack.v1.network
config:
subnet: 10.10.0.0/24
gateway: 10.10.0.254
dhcp:
- start: 10.10.0.10
end: 10.10.0.100
router1:
resource: openstack.v1.router
config:
external_network: main_nat
networks:
network1:
dhcp: false
ip: 10.10.0.254
- This version refers to the version of blueprint syntax. This may change over time.
- This is called a resource type. Resource types are how CBLE knows what type of resource to deploy for this object.
- This is the resource config. A config is unique to the type of provider you're using.
depends_on
is similar to Docker Compose v3. This allows us to wait on other objects to deploy before we deploy this object (and destroy this object before we destroy the parents). Providers should provide inherent dependencies based on resource types.- This is called a data type. Data types are similar to resource types, but instead of deploying resources they pull pre-existing resources and information from the provider without modification.