Environment Best Practices
Set Up Enough Environments
Make sure that you've created enough environments to handle the workload of your robot.
For example, consider a robot that runs in two minutes and has one environment. If you call the robot every three minutes, the robot typically runs without issues, even with occasional performance issues. However, if you call the robot every minute, you create a backlog.
How do you know how many environments to run? Consider the following factors:
- Amount of time a robot instance typically requires to run.
- Frequency with which the robot is called.
- Likelihood of performance issues in the application that the robot automates.
- Impact to the business if a backlog occurs.
Create System Requirements
Each robot has different requirements. Document the requirements and use them when setting up and testing each environment. Make sure to include all software requirements, configuration requirements, and network connectivity requirements.
Follow All License Agreements
Verify that your applications' license agreements allow for automation.
Replicate the Robot's Environment
Most computers have time-saving features, including applications that remember your credentials and browsers that remember your preferences. However, a robot's environment is likely to be a clean slate.
Additionally, the account that you use to record a robot could inadvertently have more or fewer permissions than the robot will have in production.
To ensure that your robot can run as expected in a production environment, make sure that the experience you have while building a robot accurately replicates the experience that the robot will have while running on its environment.
Optimize Settings for Autoscaling Environments
Make sure you utilize these best practices to optimize the settings for autoscaling environments.
- Use a dedicated compartment: Create a dedicated compartment under the root compartment for the autoscaling environment setup and define specific IAM policies to restrict access . This helps maintain better isolation, control, and security.
- Keep all resources in one compartment: Keep all related resources, such as the VCN, subnet, and custom image within the same compartment where access policies are configured. This ensures consistent access control and simplifies management.
- Secure your network: Refine your VCN security rules as needed to allow only the required ingress and egress traffic. Apply the principle of least privilege to enhance network security.
- Use custom images for fast provisioning: Use a custom image to configure the instance pool. This ensures that instances are provisioned quickly, as all prerequisite software is already installed.
- Validate the image before you create the instance pool: Verify the instance before creating the image to confirm that all required prerequisite software has been successfully downloaded and configured. This step ensures that future instances launched from this image will have the expected setup and dependencies in place.
- Apply instance pool scaling thresholds strategically: Define thresholds (for example, scale-out at 80%, scale-in at 50%) will give enough time for new instances to join the pool before workload surges.
Monitor Your Environments
Periodically throughout the day, monitor your environments. For example, ensure that all environments remain up and running.
Maintain Good Performance
A robot works in an application like a person does. Before creating your robots, understand their performance implications.
For example, consider a scenario in which ten robots are active in an application at a time. Determine whether the robots could impact the performance of the application, and take the appropriate action. You could reduce the number of robots, run the robots overnight, or increase the capacity of the machine that hosts the application.