As a cloud or project administrator, you have a prescribed naming convention for resources in your environment, and you want the deployed resource to follow those conventions without user interaction. You can create a naming template for all deployments from a Cloud Assembly project.

For example, your host naming convention is to prefix a resource as projectname-sitecode-costcenter-whereDeployed-identifier. You configure the custom naming template for the machines for each project. Some of the template variables are pulled from the system as it is deployed, other are based on project custom properties.

All resource names must be unique. Use the incremental number property to ensure uniqueness. The numbers increment for all deployments, including those that are named by Cloud Assembly. As your system becomes more robust, the numbering might appear random, but they still ensure uniqueness.

In addition to the examples provided here, you can also add the user name, the image that is used, other built-in options, and simple strings. As you build the template, hints regarding possible options are provided.

Remember that some of the values you see are only use case examples. You won't be able to use them letter-by-letter in your environment. Think about where you would make your own substitutions, or extrapolate from the example values, in order to fit your own cloud infrastructure and deployment management needs.

Prerequisites

  • Verify that you know the naming convention that you want to use for deployments from a project.
  • This procedure assumes you have or can create a simple blueprint that you use to test your custom host prefix naming.

Procedure

  1. Select Infrastructure > Projects.
  2. Select an existing project or create a new one.
  3. On the Provisioning tab, locate the Custom Properties section and create the properties for the site code and cost center values.
    This is where you replace the values you see here with ones pertinent to your environment.
    Custom Naming options for a project
    1. Create a custom property with the name siteCode and the value BGL.
    2. Add another custom property with the name costCenter and the value IT-research.
  4. Locate the Custom Naming section and add the following template.
    ${project.name}-${resource.siteCode}-${resource.costCenter}-${endpoint.name}-${######} 
    You can copy in the string, but if this is your first naming template, consider using the hint text and quick select as you build the template.
  5. Deploy a blueprint associated with the project to verify that the custom name is applied to the resource.
    1. Click the Blueprints tab, and then click a blueprint associated with the project.
    2. Deploy the blueprint.
      The Deployments tab opens, showing your deployment in process.
    3. When deployment is completed, click the deployment name.
    4. On the Topology tab, notice that your custom name is the resource name in the right pane.

      Illustration of the custom resource name in the deployment topology
  6. If you deployed a test blueprint to verify the naming convention, you can delete the deployment.

What to do next

Create custom naming templates for your other projects.