Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Scripted Steps

Copy & paste into Background Scripts in each instance.

//
// bw - 20120416 - adapted from http://wiki.service-now.com/index.php?title=Post-Cloning_Checklist

//
// canonical instance names... change if any instance name changes
var dev = "yaledevelopment";
var tst = "yaletest";
var trn = "yaletraining";
var pre = "yalepreproduction";
var prd = "yale";

//
//get this instance's name
var thisInstance = gs.getProperty("instance_name");
 
//
// all non-prod is broken out in case the need arises to break formation
// with the defaultConfig().
switch (thisInstance) {
	case prd: 
                // shouldn't be cloning prod post-go-live!
		gs.print("**** You're running this script in production, are you asking for trouble?");
		break;
	case dev: 
                var thisShortName = "dev";
		defaultConfig(thisInstance,thisShortName);
		break;
	case tst: 
                var thisShortName = "tst";
		defaultConfig(thisInstance,thisShortName);
		break;
	case trn: 
                var thisShortName = "trn";
		defaultConfig(thisInstance,thisShortName);
		break;
	case pre: 
                var thisShortName = "pre";                
		defaultConfig(thisInstance,thisShortName);
		break;
	default: 
		gs.print("**** I don't understand what this instance is for: " + thisInstance);
}

// 
// default way to configure a non-prod instance
function defaultConfig(instance, shortName) {
	//set the base color (did we decide yet??)
	// gs.setProperty("css.base.color","mediumseagreen");
 
	//set header name (did we decide yet??)
	// gs.setProperty("glide.product.description","DEV Instance");

        // set SAML properties
        gs.setProperty("glide.authenticate.sso.saml2.issuer","https://" + instance + ".service-now.com");
        gs.setProperty("glide.authenticate.sso.saml2.service_url","https://" + instance + ".service-now.com/navpage.do");

        // set SMTP properties
        gs.setProperty("glide.email.user","s_sn" + shortName);
        gs.setProperty("glide.email.server","mail.yale.edu");
        gs.setProperty("glide.smtp.port",587);
        gs.setProperty("glide.smtp.tls",true);
        gs.setProperty("glide.smtp.auth",true);
        gs.setProperty("glide.smtp.active",true);  // for now, maybe we'll only do this for test later on
        gs.setProperty("glide.email.test.user","its50test@mailman.yale.edu");
	gs.print("Remember to set glide.email.test.user_password");
               
        // set POP3 properties
        gs.setProperty("glide.pop3.server","connect.yale.edu");
        gs.setProperty("glide.pop3.secure",true);
        gs.setProperty("glide.pop3.user","s_sn" + shortName);
	gs.print("Remember to set glide.pop3.password");

        // set notification From: address for all active Email Notifications
        gr = new GlideRecord("sysevent_email_action");
        gr.addQuery("active","=",true);
        gr.query();
        while(gr.next()) {
            gr.from = "servicenow-" + shortName + "@yale.edu";
            gr.update();
        }

        // let the admin know we're all done
	gs.print("Applied Instance-Specific Configurations"); 
}

Manual Steps

  • add MID server accounts, re-register MID servers (to script)
  • delete non-relevant (i.e. production) MID servers (to script)
  • ensure SMTP & POP passwords are correct (these should survive a clone anyway)
  • realign data sources by instance (TBD)
  • No labels