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"; var thisIST = "ist3"; var thisDWH = "dwh7"; var thisAdmins = ["ww26-admin","ekt6-admin","bm364-admin","gilbert-admin","drm43-admin"]; defaultConfig(thisInstance,thisShortName,thisIST,thisDWH,thisAdmins); break; case tst: var thisShortName = "tst"; var thisIST = "ist2"; var thisDWH = "dwh4"; var thisAdmins = ["ww26-admin","vb248-admin"]; defaultConfig(thisInstance,thisShortName,thisIST,thisDWH,thisAdmins); break; case trn: var thisShortName = "trn"; var thisIST = "ist1"; var thisDWH = "dwh1"; var thisAdmins = ["ww26-admin","mo4-admin","kb32-admin"]; defaultConfig(thisInstance,thisShortName,thisIST,thisDWH,thisAdmins); break; case pre: var thisShortName = "pre"; var thisIST = "ist1"; var thisDWH = "dwh1"; var thisAdmins = ["ww26-admin"]; defaultConfig(thisInstance,thisShortName,thisIST,thisDWH,thisAdmins); 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, IST, DWH) { //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"); setSAMLProperties(instance); setSMTPProperties(shortName); setPOP3Properties(shortName); // // align instance-specific data sources setDataSourceURL("IST-User","jdbc:oracle:thin:@ldap://oid.its.yale.edu:389/" + IST + ",cn=oracleContext,dc=world"); setDataSourceURL("DW - Manager","jdbc:oracle:thin:@ldap://oid.its.yale.edu:389/" + DWH + ",cn=oracleContext,dc=world"); setDataSourceURL("DWH-DIVDEPTORG","jdbc:oracle:thin:@ldap://oid.its.yale.edu:389/" + DWH + ",cn=oracleContext,dc=world"); // let the admin know we're all done gs.print("Applied Instance-Specific Configurations"); } // end defaultConfig() function setSAMLProperties(instance) { // // set SAML properties so SSO logins are redirected to the right instance 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"); } // end setSAMLProperties() function setSMTPProperties(shortName) { // // set SMTP properties for a given instance... assume password the same across instances. gs.setProperty("glide.email.user","servicenow-" + shortName + "@yale.edu"); gs.setProperty("glide.email.server","smtp.gmail.com"); 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"); // } // end setSMTPProperties() function setPOP3Properties(shortName) { // // set POP3 properties for a given instance... assume password the same across instances. gs.setProperty("glide.pop3.server","pop.gmail.com"); gs.setProperty("glide.pop3.secure",true); gs.setProperty("glide.pop3.user","servicenow-" + shortName + "@yale.edu"); // } // end setPOP3Properties() function setDataSourceURL(name, url) { // // align data source(s) with this name to specified url var gr = new GlideRecord("sys_data_source"); gr.addQuery("name","=",name); gr.query(); while(gr.next()) { gr.connection_url = url; gr.update(); } // } // end setDataSourceURL()
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)
- reset any user passwords for *-admin accounts (on demand... this encourages semi-regular password resets).