Environments
An environment in Azure CycleCloud is a set of resources created by an external source, such as an Azure Resource Manager deployment. You can create an environment that will pull in relevant properties from any resource that ARM supports, and integrate them with your cluster template. You can also set up dependencies between deployments and nodes that work in either direction.
Create an Environment
When creating a cluster, create a set of resources using environment
. You can reference your template using:
TemplateURL
, i.e.az://storage/container/arm/azure.deploy.json
TemplatePath
, i.e.arm/azure.deploy.json
TemplateContents
, i.e.${AzureDeployJsonContents}
Chain together environment creation by using the outputs from one environment as the input to the next. Environments are created the first time the cluster is started, and are not deleted until the cluster is deleted.
An example environment may look like this:
[environment envname]
Credentials = cloud
Region = southcentralus
TemplateURL = az://storage/container/arm/azure.deploy.json
…
[[node scheduler]]
SecurityGroups = ${envname.outputs.schedulerSG}
Note
TemplatePath
is relative to your locker.
Create or Delete an Environment for Each Cluster
[environment envname]
TemplatePath = arm/azure.deploy.json
Use a Pre-Existing Environment
[environment envname]
ManagedLifecycle = false
Azure.ResourceGroup = preexisting-rg
Refer to an Environment Defined in Another CycleCloud Cluster
[environmentref envname]
SourceClusterName = long-running-cluster
In the three examples above, a Cloud.Environment
will be created for the first two, but not for the last.