This topic covers best practices for managing compute environments. As a Domino administrator, you must curate the environments used by your organization. A proactive approach to environment management can prevent sprawl, avoid duplicate environments, and equip users with the tools they have to succeed in Domino. You must find the balance between giving users the freedom to be agile in development, while also maintaining enough control that you don’t end up with duplicate or unnecessary environments. Because there is no limit to the number of environments that administrators and users can create, you must manage this to ensure that your users can find what they need.
Domino recommends these best practices:
- Limit global environments
-
The benefits of focusing on a small number of global environments with broad applications outweighs the benefits of creating many niche global environments. When a user requests an environment with new capabilities, consider whether you can add their requested features to an existing global environment instead of creating a new one.
- Keep global images up-to-date and comprehensive
-
Strive to have global images that cover the majority of users' needs. Users should only have to make minor additions to global environments when they create their own environments, such as installing a specific version of a package. You don’t want users to have to re-install Python or make other major changes, as this results in a bloated and poorly performing environment.
- Use clear, descriptive names for your environments
-
A common reason why environments get duplicated is that a user cannot tell whether an existing environment meets their needs. Clear, descriptive names on all environments makes the entire catalog comprehensible to new users and administrators, and makes Domino easier to work with and maintain.
- Add comments to the Dockerfile for each environment
-
You can add comments to a Dockerfile like this:
# This is a comment that can provide a helpful description of the code to follow RUN echo 'This is an executed Dockerfile instruction' # Here's a block that installs Ruby RUN apt-get update && apt-get install -y ruby
Each section must a have clear heading and comments to explain its purpose and implementation.
- Share responsibility for environment management
-
If you have multiple teams or departments doing separate work in Domino, they must maintain their team-specific environments. Find an advanced user in each team and make them a deputy for environment management. This person must be responsible for planning and understanding the environments their team needs, and must work with you on implementation. This reduces the administrators' workload and ensures that environments are designed by someone with context about what users need.
- Cache global environments on the executor machine image
-
Cache your global environments in your executor template machine image. This ensures that each new executor starts up with the base Docker image for any environment already cached. If users are setting up environments that have base images that are very different from what is cached on the machine image, it can lead to long pull times when they launch executors. Contact Domino Support for help modifying your machine image.
- Clean up old or poorly maintained environments
-
Create a culture of tidiness around environment creation and management. Enforce a standard of quality in naming and Dockerfile commenting, and be assertive about pruning unnecessary environments. See Clean Your Environment Catalog for a walk-through.