12.07.2015 Views

Automating Application Deployment - InterSystems Benelux

Automating Application Deployment - InterSystems Benelux

Automating Application Deployment - InterSystems Benelux

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Automating</strong><strong>Application</strong><strong>Deployment</strong>Kerry Kirkham


Agenda• Install Options• Customize installation• Unattended custom installation• Cloud <strong>Deployment</strong>s• Patching Options• Best-practices


Customised Instillations• %Installer• Utility that lets you define an installation• Highly customisable• Can load classes, globals and routines• Can execute methods• Used during installation• Must be run in the %SYS namespace


The process..• Define an installation manifest• Create a class that contains an XData blockdescribing the configuration• Contains an XData block• The root element in the XData block must be• It must define the setup() method, which must refer tothe XData block


The Manifest StructureRequiredOptionalOutermost XML tagOne for each namespaceContains namespace configurationDefines one or more databases


Manifest Tags• • • • • • • • • • • • • • • • • • • • • •


%Installer Wizard


setup() method• Automatically called during a Caché/Ensembleinstall/upgrade• Generates code for the defined manifest• Has 4 parameters• ClassMethod setup( ByRef pVars,pLogLevel As %Integer = 3,pInstaller As %Installer.Installer,pLogger As %Installer.AbstractLogger)As %Status [ CodeMode = objectgenerator, Internal ]


How to execute setup()• From Terminal• In the %SYS namespace, run:%SYS>Do ##class(MyPackage.MyInstaller).setup()• In code (once tested!)• Export the manifest class as DefaultInstallerClass.xmlto the same directory where the Caché install is run• It is imported into %SYS, compiled, and the setup()method is executed• SourceDir and ISCUpgrade variables areautomatically passed to setup()


Unattended Custom Install• Does not prompt the user for input• Lets you perform• Unattended custom installation• Upgrade• Reinstallation (repair)• Removal (uninstall)


Windows Unattended• msiexec.exe• Windows Installer Component• Used to install new programs that use WindowsInstaller package files (MSI).• Gives you full control over the installationprocess, allowing you to set:• install options, display options, logging options, update options,repair options, public propertiesmsiexec.exe [package_parameters]


Install Options• /i - normal installation• /a - administrative install• /j - advertise the product• u - advertise to the current user• m - advertise to all users• /g - the language identifier used by theadvertised package• /t - apply transform to advertise package• /x - uninstall the package


Display Options• /quiet - quiet mode (there is no userinteraction)• /passive - unattended mode (the installationshows only a progress bar)• /q - set the UI level:• n - no UI• b - basic UI• r - reduced UI• f - full UI


Samplemsiexec /i \.msi /qn /l msiexec /i cache_x64.msi /qn INSTANCENAME=CacheTest INSTALLDIR=C:\<strong>InterSystems</strong>\CacheTest /l C:\CacheInstall\log.log INSTALLERMANIFEST=C:\CacheInstall\DefaultInstallerClass.xml SERVICEAUTOSTART=1ADDLOCAL=server,dotnetbind,studio INITIALSECURITY=None• Creates a MSI log file• ADDLOCAL Component GroupsServer (server) Development (development)Studio (studio)xDBC (sqltools)Launcher (cube) Documentation (documentation)CSP Gateway (cspgateway)


Unix – Package Installer• Subdirectories of /package• Must contain manifest.isc file definingprerequisites• Can contain phase scripts – parameters,preinstall, install, postinstall• standard_install starting package for install


Command Line Parameters• More like Windows unattended install usingcommand line parameters• Use cinstall_silent script• Define install package(s) to be installed• Create your own package


Unix Parameters for cinstall_silentRequired• ISC_PACKAGE_INSTANCENAME• ISC_PACKAGE_INSTALLDIROptional• ISC_PACKAGE_PLATFORM• ISC_PACKAGE_UNICODE• ISC_PACKAGE_INITIAL_SECURITY• ISC_PACKAGE_MGRUSER• ISC_PACKAGE_MGRGROUP• ISC_PACKAGE_USER_PASSWORD


Unix – Unattended Install ExampleISC_PACKAGE_INSTANCENAME="Cache"ISC_PACKAGE_INITIAL_SECURITY="Minimal"ISC_PACKAGE_UNICODE="N"ISC_PACKAGE_MGRGROUP="cacheusr"ISC_PACKAGE_INSTALLDIR="/opt/cache" ./cinstall_silent database_server odbc


Cloud <strong>Deployment</strong>


Why the Cloud?Change in business model• Convenient, on-demand access• Rapid provisioning and deployment• Elasticity• Pay-as-you-go• Agile


Challenges• The two biggest challenges are:• Deploying & Managing systems• Deploying & Managing applications• Unique partnership with RightScale• Single-click deployment framework for Caché &Ensemble• Recipes to help you deploy your complete app with asingle-click!


Tools to Manage• RightScale now for…• Amazon• Rackspace• Deploy & Monitor• Availability Templates• High Availability• Disaster Recovery• Testing


What we have..• RightScale Server Templates:• Caché on Win 2008 R2 x64:• Ensemble on Win 2008 R2 x64:• Documentation:• RightScale public library


General steps• Sign up with Amazon EC2/AWS• Sign up with RightScale• You can access the <strong>InterSystems</strong> Caché / EnsembleServerTemplates and try them out• In ~20 minutes you will have a fully configuredsystem running in the cloud• If you want to use this framework to deploy -subscribe directly with RightScaleLet us know you cloud plans!


Patching


GoalsPatching process that’s:• Quick…• Flexible…• Extensible…• Automatable …• Customizable…• Substitutable for ad-hoc’s…


Planned Features• Checksum à Verify & Validate• Full rollback/undo capabilities• Pre- and Post-Install Hooks• Unattended (silent) mode• Patching for COS and EXE’s• Customer extensible• Eliminate restarts (unless necessary)


Best Practices


Architecture• Separate code and data• Make use of mappings• Global• Package• Security


On-going• Auditing• pButtons (as ref)• Backup / Restore (journaling)• Testing• Automate tasks (integrity etc.)• Manage Adhocs


Thank You

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!