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"; defaultConfig(thisInstance,thisShortName,thisIST,thisDWH); break; case tst: var thisShortName = "tst"; var thisIST = "ist2"; var thisDWH = "dwh4"; defaultConfig(thisInstance,thisShortName,thisIST,thisDWH); break; case trn: var thisShortName = "trn"; var thisIST = "ist1"; var thisDWH = "dwh1"; defaultConfig(thisInstance,thisShortName,thisIST,thisDWH); break; case pre: var thisShortName = "pre"; var thisIST = "ist1"; var thisDWH = "dwh1"; defaultConfig(thisInstance,thisShortName,thisIST,thisDWH); 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"); // 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: and Reply-To: addresses 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.reply_to = "servicenow-" + shortName + "@yale.edu"; gr.update(); } // align IST data source(s) gr = new GlideRecord("sys_data_source"); gr.addQuery("name","=","IST-User"); gr.query(); while(gr.next()) { gr.connection_url = "jdbc:oracle:thin:@ldap://oid.its.yale.edu:389/" + IST + ",cn=oracleContext,dc=world"; gr.update(); } // align DWH data source(s) gr = new GlideRecord("sys_data_source"); var qc = gr.addQuery("name","=","DW - Manager"); qc.addOrCondition("name","=","DWH-DIVDEPTORG"); gr.query(); while(gr.next()) { gr.connection_url = "jdbc:oracle:thin:@ldap://oid.its.yale.edu:389/" + DWH + ",cn=oracleContext,dc=world"; 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)