Clone Admin Console: A Game-Changer
Clone Admin Console: A Game-Changer
Introduced in Washinton DC, the Clone Admin Console has been a game-changer for implementing cloning.
This article gives you an overview and a number of tips and tricks of this game-changing application.
Cloning Definition
Cloning is an essential part of the development process. Basically, cloning is copying the data from your PROD to the sub-prod instances (DEV, TEST, ACC). The goal of cloning is to refresh the sub-prod instances with the latest data from PROD.
Benefits:
- The development that's completed in sub-production environments has a higher chance of working as intended in production (after deploying them)
- Minimizing the amoun deployment risks (as the commits have minimal or no errors)
- There's faster issue resolution as developers have a higher chance of reproducing the issues seen in production and can quickly work on a resolution
The Instance Clone app helps you to select the right exclusions and preservers as part of your clone to ensure that you have the right data on the sub-prod instances after your clone.
In essence, the Instance Clone app brings all related things together in one interface.
Key Benefits of the Clone app:
- Simplicity
- Visibility
- Usability
Note: cloning is not supported on-prem.
Backup
Notify Developers: It's important to let your developers know that they need to backup their work whether that's committing it to source control or exporting it!
One of the most common mistakes that people make is not properly communicating the clone schedule and not ensuring that your developers have backed up their work.
If the developers are working custom applications they should get into the habit of setting their update set to "Complete" and then exporting them prior to the clone. Or a better approach is to commit their code to source control or the application repository to ensure their work is backed up properly. No matter what, developers should always back up their work before cloning!
If the version that was installed on the source instance was different than the version installed on the target instance, then the source instance version will be what is installed after the clone is finished.
Clone Admin Console
This OOTB ServiceNow store app enhances the user experience when cloning. The Instance Clone app helps you to select the right exclusions and preservers as part of your clone to ensure that you have the right data on the sub-prod instances after your clone. In essence, the Instance Clone app brings all related things together in one interface.
Benefits:
- Simplicity
- Visibility
- Usability
Home
This is the Home page of the app:
A great resource regarding Clone FAQs is this:
- https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0715621
When clicking on one of the changes it will show you the overall clone progress:
You can also see all the different settings for the clone. Additionally, it will show you at what stage of the clone is the clone:
Configurations
The configurations tab includes the clone instances and clone profiles.
Clone profiles
A clone profile enables you to store predefined target and clone options. The clone profile automatically populates your clone request with your selected profile settings. More specifically, clone profiles are typically settings which you configure in order to exclude or preserve certain tables from cloning.
Example:
You want clone a near identical copy of PROD to your Sandbox instance, but when cloning PROD to your Development instance you want to skip copying all of the users.
Definitions
Exclusions
Excluding data means that you'll skip bringing that data from your source instance to your target instance. In other words, it’s the data that you don’t want to copy over. When choosing to exclude data it’s telling the system that you want to bring an EMPTY table down to your target instance. If you don’t have any preservers set up for that table, then you’ll have an empty table in the end.
Example: a common use case is to exclude users and groups.
Exclusion List:
Example of Exclusions: create a Company Profile to exclude all tables listed on the Exclusion list, including child tables. When excluding tables, your target instance will still have the same table schema and hierarchy (i.e. empty usable tables) as the source instance.
Preservers
Preserving data means that you want to protect the data on the target instance so that it's not overwritten. In other words, it’s the data you wish to preserve on your target instance after the clone.
Example: you may want to retain the user preferences, audit and log records on the target instance so that they are not overwritten by the user preferences on the source instance.
What would happen to the User data on my target instance?
Note: for users there’s far more data that you need to consider preserving and/or excluding such as User Roles, Groups, Group Membership, Group Roles, and Role Contains records.
Cleanup scripts
Cleanup scripts: post clone scripts that are happening after your clone. If you want to modify data or do any type of manipulation after cloning.
This is a great example of a cleanup script.
Clone Request
Form
On the clone request page you can schedule the clone:
Recommended: schedule the clone in off hours to prevent disruption of activities, i.e., in the weekend.
Good to know: the Clone Profile already includes the clone System Profile. So, when you choose a custom clone profile, the system clone profile is already in there.
Optional Settings
Note: you can select on-demand backup. You can also pick your own frequency (weekly, every two weeks, etc.) to do the cloning.
Remember: cloning is a backup based process. Clone usually gets its data from the last nightly backup of your instance.
Clone request summary
Once you schedule a clone you get an overview of the clone request:
Additionally, you get also to see the exclusion settings, preserver settings and other settings that you have set up.
Then you can Confirm and Submit Clone Request.
Note: traditionally you would have to navigate to the System Clone > Request Clone to request a clone.
Clone Rollback
You have also the option to rollback a clone:
Basically, the rollback restores your target instance data to the state prior to the clone. Keep in mind that this must be done within 7 days after your clone.
Enhancements
Future enhancements:
- Adding Guidance Setup
- Walking you through to what to pick through what scenario for clones (clones can be different for upgrade vs development)
- Help you how to add or put together a clone profile from the clone home page (clone profile is an overlooked part of the platform. Clone profile really helps to set you up for success for your clones)
Bonus Tips
- Target version will be source version
- Review clone target system property (glide.db.clone.allow_clone_target)
- Automated Test Framework (ATF)
- Recommended: promote ATF tests to PROD, but inactivate them
- Avoid Rollback Clone as much as possible
- Clone Frequency
- Recommended: clone every 3 months
- Keep sensitive data in mind
- Clone start time actions
- You can adjust the exclusions and preservers at the last minute until your clone process has began
- Predictive intelligence: ML solutions
- Recommended: preserve your ML solutions data when cloning
- Set this system property glide.platform_ml.clone_artifacts to true if you want to ensure your ML solutions are preserved and included with the clone
That's a wrap!
References:
- https://www.youtube.com/watch?v=ntXC4Slot0s&ab_channel=ServiceNowDevProgram
- https://www.youtube.com/watch?v=rHxuRQVh37M&ab_channel=Allenovation
Comments
Post a Comment