Naming module best practices

Best practices for the OneFuse Naming module and policies

The CloudBolt OneFuse integration platform offers a Naming Module that allows users to craft Naming Policies for just about anything that requires a name. These Policies can be used for naming virtual machines, physical machines, deployments, AWS VPCs, Azure, GCP, or anything else you want to name in a standardized way.

Following these best practices will allow you to build your Naming Policies on a solid foundation offering repeatable, standardized, and compliant naming across the CloudBolt CMP, VMware Aria Automation, Terraform, and other tools.

Resources

For additional information regarding OneFuse naming, refer to the following documentation:

Prerequisites

  • Have an idea of the items you are planning to name, as well as your standard for doing so.
  • Determine what will make up your name.
  • Determine if there are any edge cases to account for.

Best practices for Naming Sequences

Naming Sequences are how you make generated names unique. Here are a few best practices to make the best use of Naming Sequences:

Build a sequence for each policy

By building a Sequence for each Policy, rather than building one sequence and using it for all Policies, you can achieve greater flexibility by having a purpose-built sequence for each Naming Policy’s specific needs.

Don’t reuse sequence values in your production environment

Reserve the use of reusing sequence values for testing, development, and other environments with high churn rates. Using this feature in production could lead to confusion when a server name that was previously decommissioned is now back in service.

Use unique keys to track sequences

Use unique keys to track sequences for every naming variation that is created. It is best to match the unique key to your naming standard. This will allow you to have a new sequence, starting from 1, for every unique naming combination.

For example:

prodatlweb001: This would be tracked as a unique variation and allow for 999 sequences based on a 3-digit max length.

devatldb001: This would also be tracked as a unique variation and allow for 999 sequences based on a 3-digit max length.

If you were not using unique keys and you had a 3-digit max length, you would run out of sequences after 999 server deployments. Using unique keys allows 999 variations per unique naming combination.

Best practices for Naming Policies

Naming Policies are how you generate new names. They contain the naming standard that determines what the outcome of the name will be.

{{nameGroup | required("Group is required")}}-{{nameLocation | required("Location is required")}}{{nameEnv | required("Environment is required")}}{{nameApp | required("Application is required")}}{{nameCompliance}}{{sequence.machineSequence}}
  1. Use required for any components of the name that must be present to generate a naming outcome that conforms to your naming standard.
  2. Avoid using if statements, case statements, or other logic for anything other than edge cases. If you find yourself using many if cases or other logic-based statements, consider having multiple Naming Policies.
  3. Adopt a naming convention to use with multiple Naming Policies. This makes it easy to dynamically target the appropriate Naming Policy.

For example:

If you have different standards for internal production workloads than you do for AWS production, naming your Policies as follows makes it simple to dynamically target the appropriate naming policy:

  • prodlocal
  • prodaws
  • OneFuse_NamingPolicy: 'onefuse:{{nameEnv}}{{nameLocation}}

If nameEnv = prod and nameLocation = local, then the Policy used would be prodlocal. This allows you to dynamically determine which policy to use based on the specific factors associated with each request.

Outcomes

Make informed decisions about Naming Policies and Sequences in OneFuse.