編集

次の方法で共有


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 pulls in relevant properties from any resource that ARM supports and integrates them with your cluster template. You can also set up dependencies between deployments and nodes that work in either direction.

Create an environment

When you create a cluster, create a set of resources with environment. You can reference your template with:

  1. TemplateURL, such as az://storage/container/arm/azure.deploy.json​
  2. TemplatePath, such as arm/azure.deploy.json​
  3. TemplateContents, such as ${AzureDeployJsonContents}​

Chain environment creation together by using the outputs from one environment as the input for the next. The cluster creates environments the first time it starts. The cluster deletes environments when it deletes the cluster.

An example environment might look like this code block:

[environment envname]​
Credentials = cloud​
Region = southcentralus​
TemplateURL = az://storage/container/arm/azure.deploy.json​
…​
[[node scheduler]]​
SecurityGroups = ${envname.outputs.schedulerSG}​

Note

Your 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 preceding examples, the first two create a Cloud.Environment, but the last example doesn't.