Blocks
A block represents a piece of infrastructure in your stack - like a running container, or a database, a Redis instance, a queue and so on.
Blocks can be created like this:
The above dgctl
command has created a new "slot" for running a container; the dgctl.json
file has been updated with new block details. To get the changes applied to your cloud provider's account, run dgctl generate
and then dgctl provision
In dgclt.json
Each block is defined as an entry in the "blocks": [ ... ]
list, with just 2 required params:
name
- the name of the blocktype
- the type of the block
dgctl.json
is just an "index" though - block configuration is done in the block folder
In the block directory
dgctl block add
command creates an entry in dgctl.json
file and also create a directory to store block configuration, with the following structure:
The config.json
file stores block's settings. For example, for a standard block of type container
it might look like this:
The target
option defines the block's implementation. By default it points to a standard implementation of a given type by Digger. But it can be any github repo - you can fork it, or write your own from scratch.
Last updated