Quantcast
Channel: xCommunity : Popular Discussions - Discuss
Viewing all articles
Browse latest Browse all 932

Using Constants to help in script migration between environments

$
0
0

Moving script packages between environments often causes problems and means sometimes urls and other information that may have been specific to an environment is incorrect and needs changing. To overcome this you can use company constants to set some of these values in each environment . Then a generic script which looks for these constants can be created.

 

One advantage of this is that it means your script versions can be consistent across environments so moving from DEV -> UAT -> PROD is much easier

 

You will find Company Constants in the left hand menu once you have clicked the "Admin" tab

companyconstants.jpg

 

In the initial Script package we can retrieve these Company constants like this.

 

conpanyconstants scripts.jpg

Change the AlarmPoint_URL to now be as shown and so your script will not migrate between environments e.g DEV to Test or PROD

 

So changing:

 

$Alarmpoint_URL = http://localhost:8888/

 

To

 

$Alarmpoint_URL = $xm_url

 

Note: Company Constant names need to be in uppercase if your xMatters version is using an early 4.1 Patch

 

You may also want to look at "Event Domain" and "Global" constants for your use.


Viewing all articles
Browse latest Browse all 932

Trending Articles