| Clone Windchill |
|
This is a follow-up post on the Presentation given by Shawn Lothrop, Boston Engineering's IT Director, on June 4th, 2012 at Planet PTC on Cloning Windchill in Minutes. The Presentation and administration scripts can be downloaded from the links below. All sample files and scripts used in the presentation demo are included in the BEC Windchill Cloning Toolkit. Clone Windchill in Minutes Presentation: Download BEC Windchill Cloning Toolkit V1: Download Steps to Clone Windchill with Virtualization and Reverse Proxy1. Create Windchill ApplianceCreate the Virtual Machines, VMs, that will make up your Windchill system and store the set of VMs in your virtualization infrastructure. A monolithic setup will have only one VM, while a multi server system will have a VM for each separate Windchill component. The VM(s) can be created by converting physical systems, clone existing VM(s), or installing a fresh Windchill environment. The VM(s) should be configured as described below. In order to gain the full benefits of cloning Windchill in a virtualized environment, it is highly recommend that a unique database VM is used in your Windchill Appliance. Attempting to leverage a shared instance of Oracle or SQL Server will reduce, or eliminate, the benefits of virtualization. i) Dedicated VM or Windchill Application VM: Install Proxy ApacheInstall a second Apache service on your Windchill application server or on a new VM. If two Apache services are installed on the same VM be sure the Windchill Apache service is listening to a non-default port such as 8880. To setup the new Apache service as a Windchill Reverse Proxy, update the sample windchill_proxy.conf file by replacing "windchill.mydomain.com" with the Windchill application hostname and include the new configuration file in your Reverse Proxy Apache httpd.conf config file. Lastly, comment out any Loadmodule statements for the following modules in any other Apache config files. The default PTC Apache service loads proxy_connect_module, which must be commented out.
ii) Windchill Application VM: Configure Windchill "System Banner Alert Message"Setting up the Windchill System Banner Alert Message will allow the Cloned Windchill systems to be easily identified by end users. To setup a Windchill banner execute the following:
Additional details on setting up a Windchill banner are located in the Windchill Customization Guides. Windchill 9 Example Banner:
Windchill 10 Example Banner:
iii) Windchill Application VM: Purge Log files and CachesPurge the Log files for all Windchill components, and if your running Windchill 9.X purge your Tomcat and InfoEngine caches. iv) All VMs: Remove Dependence on DNSDefine all systems in the hosts file on each VM. The hosts file should point each hostname used in your Windchill configuration (eg ldap, replication server, CAD workers, database, email etc.) at an IP. To be safe, point all hosts in your Windchill Appliance hosts file(s) at a loopback IP in the 127.0.0.1/24 range to prevent any system from inadvertently attempting to connect to an external resource. Application Server Hosts File for a server with a hostname of windchillhost.local and a Windchill URL of windchill.mydomain.com: v) All VMs: Turn off ServicesSet all Windchill services and the network connection to be manually started on boot. vi) All VMs: Copy Administration Automation ScriptsCopy any administration automation scripts into your VMs. A set of example automation scripts is available in the BEC Windchill Cloning Toolkit . To use the example scripts you must update variables under the "Local Vars" section for your specific Windchill system.
vii) All VMs: Hostname, Windows SID, and Other machine specific settingsThe VM(s) in the Windchill Appliance access all Windchill systems via the hosts file, therefore, the hostnames, Windows SID, and most other machine specific settings can remain the same. The only machine specific settings that must change are the MAC and IP address of the Network interface. Almost all VM environments automatically control the MAC address to ensure uniqueness, and the IP address of each VM will be set during the deployment step. Some IT departments require Windows VM templates to be prepared for cloning by striping out all machine specific settings such as the SID. If your environment has such a requirement the Windows Sysprep tool can be used to prepare a system before being stored in the Virtual Environment. Some Virtual Environments, such as VMware, can be setup to run Sysprep on deployment of a new VM. viii) Store VM(s) in Virtual EnvironmentOnce all of the VM(s) that make up your Windchill Virtual Appliance have been created you can store the VM(s) via one or more of the following storage locations for future use:
2) Clone Your Appliance VMsUsing your Virtual environment and the Windchill Virtual Appliance you created in Step 1, clone your Windchill Appliance VM(s). The method used to clone your Windchill Appliance VM(s) will depend on the storage method(s) selected in Step 1.
After each VM has been cloned boot the VM and configure the following. A sample Bash script, HostnameChange.sh, is supplied showing how steps i and ii can be automated. Depending on your infrastructure step iii can also be automated. i) Configure and start the network interfaceIf the Virtual Environment didn't auto configure a new network interface (MAC, IP, ect) during the cloning process, then you'll need to configure the interface by hand. ii) Optionally change the server hostnameSince the servers are using hosts files rather than DNS changing the the server hostname is not a requirement. iii) Update the Hosts file as neededWhen you update your hosts file be careful to not remove any required entries for Windchill services such as LDAP, infoEngine, database, etc. Point any uneeded services at a loopback IP in the 127.0.0.0/24 range such as replication servers, CAD workers, index server, etc. Also, be sure to take into account potential 3rd party software dependencies in the hosts file, such as Oracle's listener configuration. 3) Restore Desired Windchill Dataset Restore an appropriate Windchill Dataset from your Windchill backup archive. If possible script the restore procedure for the Windchill Dataset (ie SQL, LDAP, and File Vault) and allow the person cloning, and/or administering the Windchill clone to execute all of the restore steps. Unlike traditional rehosting methods, a Reverse Proxy URL change allows the data in a cloned Windchill system to be refreshed at any point in time without having to rerun a rehosting/rename routine. The Reverse Proxy layer separates the Windchill URL from the internal Windchill Hostname. 4) Update Windchill URLThe Windchill URL is updated by running the WindchillChangeURL.sh or WindchillChangeURL.bat scripts. These scripts configure Windchill to use the Reverse Proxy and can be run as many times as needed to change the Windchill URL. After each Windchill URL updated the hosts file on each client or corporate DNS will need to be updated to allow name resolution from each client. 5) Start Windchill!Your Windchill system has been cloned! You can now leverage the flexibility of virtualization to reduce your development, migration testing, and training costs. |

