Sie sind auf Seite 1von 43

v7 Amazon EC2 Cloud Deployment Guide

Copyright 2010 Sage Technologies Limited, publisher of this work. All rights reserved. No part of this documentation may be copied, photocopied, reproduced, translated, microfilmed, or otherwise duplicated on any medium without prior written consent of Sage Technologies Limited. Use of the software programs described herein and this documentation is subject to the End User Licence Agreement enclosed in the software package, or accepted during system sign-up. Sage, and the Sage logo are registered trademarks or trademarks of The Sage Group PLC. All other marks are trademarks or registered trademarks of their respective owners.

Executive Summary
ThisdocumentdetailsthetasksnecessarytodeploySageCRMVersion7ontoAmazonEC2Cloud.

What is Amazon EC2 Cloud?


Amazon EC2 Cloud is a fully managed hosting platform accessed by Amazons web service called Elastic Compute Cloud (EC2). It provides the ability to run virtual Windows and Linux servers in Amazons data centres around the world.EC2isbuiltontopofanotherofAmazonswebservicesSimpleStorageService(S3)whichprovidesthedata storagelayerforEC2.Figure1isaverysimplifiedoutlineofEC2andS3. Figure1:AmazonCloudEnvironmentoverview.

Why would a customer want it?


EC2 provides a payasyougo with no minimum charge infrastructure that will allow you to deliver Sage CRM for prospectsveryrapidlywith nohardwareinvestment.Youcanhavea cleanSageCRMonlineinstallrunningonthe webwithin30minutesfromstarting. Careful selection of AMI (i.e. one with an associated Elastic Block Store) is required to ensure customer data is persisted when an AMI is restarted. Installing and managing Amazon Cloud customer installations is therefore sufficientlycomplexforSMEstodelegateittoaBusinessPartner.Itis,however,wellwithinthecapabilitiesofaSage CRMPartner.IbelievethatthisthereforepresentsapotentialrevenueopportunityforSageCRMBusinessPartners.

1
Sage CRM Version 7 Amazon EC2 Cloud Deployment

EC2 Pricing Options


Amazon EC2 havetwo pricingoptions.On Demand pricing isgreatforDemos, Proof of Concept development and scalabilitytesting.ReservedInstancesareruntimeAMIsthatareintendedtoruncontinuously.Theyofferacheaper optionforproductioninstallsthatareruncontinuouslyforyears. Thelatestpricingcanbefoundhere:https://aws.amazon.com/ec2/pricing/.Asof16March2010thepricesfortheUS EastCoastwereasfollows: OnDemand ReservedInstances

2
Sage CRM Version 7 Amazon EC2 Cloud Deployment

EC2 Component Terminology


ThemostimportantconceptsaBusinessPartnerneedstounderstandaretheAMIandInstance.Amazonprovidesan onlineManagementConsoleforadministeringtheCloud,calledtheAWSManagementConsole.Figure2showsthe AWSManagementConsolelogindashboard. Figure2:AWSManagementConsole

1. AmazonMachineImage(AMI)
TheAMIisthemasterimagetemplatethatyoulaunchinstancesof.TheAMIisanalogoustoaVMWaresnapshot. ThereareafewtypesofAMIs: AmazonProvidedAMIAmazonprovidesasetofpubliclyavailableLinuxandWindowsbaseimagesthat youcanuseasastartingpoint. OtherPublicAMIsVariouscompaniesandindividualshavemadetheirAMIspubliclyavailable. UserCreatedAMIOnceyouvebuiltandcustomizedyourSageCRMsystem,youcancreateyourown bundleofthemachine.YourbundlecanbeusedtoregisteranewAMI.ThisisanewAMIthatyoucanuse asanewmasterimage.ThisAMIwillbeprivatetoyouunlessyouchoosetoshareitwithanotheruser.This couldbeagoodwaytopackageverticalSageCRMcustomisations. SharedAMIUserscaneasilysharetheirAMIswithotherusers.Forexample,SageTechnologiesismaking aSageCRMAMIavailabletoselectedpartners. 3
Sage CRM Version 7 Amazon EC2 Cloud Deployment

WerecommendthataPartneruseaSageCRMsharedAMItobeginwith.ThepartnercanuseanAmazonprovided AMIiftheywanttocreatetheirownverticalcustomisationwhentheyhavereachedagoodlevelofunderstanding andexperiencewiththeAmazonCloud. CreatingYourOwnAMI(Bundle) YoucaneasilycreateyourownAMI(bundle)fromanexistingimagethatyouhavecustomized.Bundlesaresimilarto VMwaresnapshots.Bundlingisaprocessusedtocreateanewimagefromarunningonesoyoudontneedtodoany furtherinstallationconfigurationeachtimeyouneedtouseaserver.ThenewAMIcanbesharedwithotherusers. AMIBundlesarestoredinAmazonsSimpleStorageServices(S3)environment.AdditionalS3storagecostsapplyto holdthenewAMI.SeemoredetailsbelowontheS3environment. Itishighlyrecommendedthatyoucreateanewbundleatvariousstagesofdevelopmentsoyoualwayshaveapoint intimeyoucanrevertbacktowithouthavingtostartcompletelyover. Forcompletedetailsoncreatingandmanagingbundles/AMIs,visit: http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/bundlinganamiwindows.html

2. Instances
AfteranAMIislaunched,theresultingrunningsystemiscalledaninstance.TheInstanceistheactualrunningvirtual machine. InstanceTypes(HardwareConfigurations) StandardInstances Instancesofthisfamilyarewellsuitedformostapplications. m1.smallSmallInstance(Default)1.7GBofmemory,1EC2ComputeUnit(1virtualcorewith1EC2 ComputeUnit),160GBofinstancestorage,32bitplatform m1.largeLargeInstance7.5GBofmemory,4EC2ComputeUnits(2virtualcoreswith2EC2 ComputeUnitseach),850GBofinstancestorage,64bitplatform m1.xlargeExtraLargeInstance15GBofmemory,8EC2ComputeUnits(4virtualcoreswith2EC2 ComputeUnitseach),1690GBofinstancestorage,64bitplatform

HighCPUInstances InstancesofthisfamilyhaveproportionallymoreCPUresourcesthanmemory(RAM)andarewellsuitedfor computeintensiveapplications. c1.mediumHighCPUMediumInstance1.7GBofmemory,5EC2ComputeUnits(2virtualcores with2.5EC2ComputeUnitseach),350GBofinstancestorage,32bitplatform c1.xlargeHighCPUExtraLargeInstance7GBofmemory,20EC2ComputeUnits(8virtualcores with2.5EC2ComputeUnitseach),1690GBofinstancestorage,64bitplatform EC2ComputeUnit(ECU)OneEC2ComputeUnit(ECU)providestheequivalentCPUcapacityofa1.01.2 GHz2007Opteronor2007Xeonprocessor. Moreoninstancetypescanbefoundhere:http://aws.amazon.com/ec2/instancetypes/

4
Sage CRM Version 7 Amazon EC2 Cloud Deployment

EC2 Security
AmazonEC2enablesthefirewalltobeextensivelyconfiguredbymeansofSecurityGroups.TheEC2firewallallows youtoassignyourinstancestouserdefinedgroupsanddefinefirewallrulesforthesegroups.Asinstancesareadded orremoved,theappropriaterulesareenforced.Similarly,ifyouchangearuleforagroup,thechangesare automaticallyappliedtoallmembersofthegroup.Figure3showsatypicaldefaultfirewallsetup. Figure3:DefaultFirewallconfiguration Asecuritygroupisanamedcollectionofaccessrules.Theseaccessrulesspecifywhichincomingnetworktraffic shouldbedeliveredtoyourinstance.Allotheringresstrafficwillbediscarded.Youcanmodifyrulesforagroupat anytime.Thenewrulesareautomaticallyenforcedforallcurrentlyrunninginstancesandinstanceslaunchedinthe future. When you launch an AMI instance, you can assign it to as many groups as you like. If no groups are specified, the instanceisassignedtothedefaultgroup.Bydefault,thisgroupallowsallnetworktrafficfromothermembersofthis groupanddiscardstrafficfromotherIPaddressesandgroups.Ifthisdoesnotmeetyourneeds,youcanmodifythe rulesettingsofthedefaultgroup. ConfiguringFirewallSettings Forcompletedetailsonsettingupfirewallsecuritygroupsandaccessrules,visit: http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/usingnetworksecurity.html 5
Sage CRM Version 7 Amazon EC2 Cloud Deployment

EC2 Scalability
ElasticIPAddress WheneveranAMIinstanceisrestarted,anewDHCPIPAddressandassociatedDNSmappingareassignedtothe instance.ThismeansthatallSageCRMuserswouldhavetobecontactedwithanewURLtologintoeverytimethe serverisrestarted.Figure4showsatypicaldynamicIP/DNSmapping:

Figure4:RunninginstancedynamicURL. ToavoidthiswecanallocateastaticIPaddressforourcustomerthatismappedtotherunningIPAddress/DNSname. WemustpayausagefeeforthestaticIP.AmazoncallsthisanElasticIP.AnotherusefulaspectofusinganelasticIP isthatitenablesustomapthisstaticIPtoaDNSnameinourDNSservertohidethefactthatSageCRMisrunningin theAmazonCloud.

6
Sage CRM Version 7 Amazon EC2 Cloud Deployment

NotethatwheneverwerestartanAMIinstance,wemustexplicitlyremaptheElasticIPtotherunningserver instance.Figure5showsatypicalElasticIPmapping. Figure5:ElasticIPmapping. So,insteadofusingthebaseURLfortheinstance(thatchangeseverytimetheAMIisrestarted): http://ec218473220218.compute1.amazonaws.com/CRM/eware.dll/UK WeusethemappedelasticIPURL(thatstaysthesamenomatterhowmanytimestheAMIisrestarted): http://184.73.220.218/CRM/eware.dll/UK Andwecouldmap184.73.220.218toauserfriendlyDNSname,suchas: http://mybusinessdomainname/CRM/eware.dll/UK 7


Sage CRM Version 7 Amazon EC2 Cloud Deployment

OrtoTinyURL: http://tinyurl.com/sagecrm7demo ElasticBlockStore(EBS) Bydefault,anAMIrunswithlocalstorage.Thislocalstorageisdeletedwhentheinstanceisrestarted.ForSageCRM instances,wemustensurethatweselectanAMIwithanassociatedEBStopersisttheSageCRMdataacrossrestarts. WeselectanAMIwithablockstorebyexplicitlysearchingtheAMIlistforEBSAMIsasshowninfigure6below.

Figure6:SearchforWindowsEBSAMIimagessuppliedbyAmazon. AmazonEBSvolumesprovideoffinstancestoragethatpersistsindependentlyfromthelifeofaninstance.Amazon EBSvolumesarehighlyavailable,highlyreliablevolumesthatcanbeattachedtoarunningAmazonEC2instanceand areexposedasstandardblockdevices.AmazonEBSvolumesoffergreatlyimproveddurabilityoverlocalAmazonEC2 instancestores,asAmazonEBSvolumesareautomaticallyreplicatedonthebackend(inasingleAvailabilityZone). Forthosewantingevenmoredurability,AmazonEBSprovidestheabilitytocreatepointintimeconsistentsnapshots ofyourvolumesthatarethenstoredinAmazonS3,andautomaticallyreplicatedacrossmultipleAvailabilityZones.

8
Sage CRM Version 7 Amazon EC2 Cloud Deployment

ThesesnapshotscanbeusedasthestartingpointfornewAmazonEBSvolumes,andcanprotectyourdataforlong termdurability. TheEBSstorageassociatedwithanAMIisshownintheVolumesscreenasshowninFigure7below. Figure7:MappedEBSvolumestoourruntimeAMIimages.

9
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Other EC2 Tools and Administration UI Options


ApartfromtheAmazonAWSManagementConsole,thereareanumberofthirdpartyandopensourcetoolsfor managingtheAmazonCloud.ApopularalternativeforFirefoxusersisElasticFox.Figure8showsthesame informationasAWSinElasticFox.

Figure8:ElasticFox

10
Sage CRM Version 7 Amazon EC2 Cloud Deployment

AnotherpopularpluginforFirefoxistheS3FoxtooltomanagethebackingS3storage.Figure9showsaviewofS3 Fox.

Figure9:S3Fox. Amazon S3 is storage for the Internet. The S3 environment is where bundles (AMIs) are stored. Additional S3 storage costs apply to hold the new AMI. S3 can also be used to store installation files and other files for your instances. 11
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Example Deployment of Sage CRM in Amazon EC2


ThefollowingsectiondemonstratesastepbystepexampleofhowtoinstallSageCRMVersion7inAmazonEC2from scratch.Inthisexample,wewilluseabareAmazonAMIratherthanapreinstalledSageCRMAMItodemonstrate thewholeprocess.

Beforeyoustart
CustomersandBusinessPartnersareresponsibleformanagingtheirownEC2cloudinstancesviatheAmazon WebServices(AWS)ManagementConsole.Thisincludescustomeraccountactivity,security,accountcharges andallaccountconfiguration.ItwillnotbepossibletobillyourcustomersdirectlyfromAmazonEC2. Sage Technologies and Sage OpCos have no involvement in the relationship between the Business Partner andtheAmazonEC2cloud. IfBusinessPartnersneedtosignupforanEC2account.Thisisdescribedinbriefbelow.Moreinformation canbefoundathttp://aws.amazon.com/ec2/ Sage CRM issues in the cloud should be logged in the usual way, escalating up to the Sage OpCo support channelasanOnPremisecase.TheEnvironmentOSonthecaseshouldbesettoAmazonEC2instance. The following video introduces the Amazon Web Services Management Console: http://media.amazonwebservices.com/console/AwsConsole.html, and is worth watching before you get started.

12
Sage CRM Version 7 Amazon EC2 Cloud Deployment

1. SignUptoAmazonEC2foranaccount YouwillneedaspecificuserlogontoAmazonEC2.StartbyregisteringwithAWS:

13
Sage CRM Version 7 Amazon EC2 Cloud Deployment

2. CreateaKeypair ThekeypairisaPKIsecuritypolicytoprotectyourinstanceandassociatedEBSdatafromotherAmazonusers.All runninginstancesandbundledAMIsareprotectedwithyourkeypair. Note:BeforecreatingaKeyPair,pleasemakesuretheFileDownloadoptionisenabledinInternetExplorer.Whenyou receivetheprompttodownloadthePrivateKeyPairencryptionfile,pleasesaveitinasecureplace.Youwillbeasked foritwhenyouretrievethedefaultWindowspasswordfortheAMIimage,andyoucannotdownloadthefileagain. CreateakeypairbyclickingtheCreateKeypairbuttononthetoolbar: Fillinthekeyname.Amazonwillgenerateapublicandprivatekeypair.Thepublickeywillbeuploadedand controlledbytheAmazonEC2platformandyouwillseetheprivatekeylistedinyourAWSConsole.

14
Sage CRM Version 7 Amazon EC2 Cloud Deployment

3. SelectanAMIwithabackingEBS LogintotheAWSConsolewithyouremailaddressandpassword.SearchforaWindows32bitAMIwithbackingEBS: Forthisexamplewewillchoosethelowcost32bitWindowsServer2003withSQLExpressRDBMS.

15
Sage CRM Version 7 Amazon EC2 Cloud Deployment

4. StarttheAMIInstance SelecttheAMIcheckboxandclicktheLaunchbuttoninthetoolbar.Acceptthedefaultsettings(Smallinstance,etc):

16
Sage CRM Version 7 Amazon EC2 Cloud Deployment

5. RemotelogintotheAMIInstance YouwillfirstneedtogettheServeradministratorpasswordbeforeremoteloggingintotheinstance: Beforeattemptingtogettheadminpassword,givetheinstance5to10minutestostartup.

17
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Youwillneedtoenteryourprivatekeyintothecheckboxtodecryptthepassword:

Note:IfyougetanIEprompttostoprunningthescriptduringdecryption,selectNo.

18
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Makesureyoucopythepasswordsomewheresafeasyouwillnotbeabletogetitagainonceyouconfigurethe instance.

19
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Nowremotelogintotheserver:

20
Sage CRM Version 7 Amazon EC2 Cloud Deployment

6. UploadtheSageCRMInstaller YouwillneedtohaveasoftcopyoftheSageCRMinstallerCD.Youcanuseanymethodtouploadtheinstaller,FTP, WinSCP,Filezilla,etc.IpreferWinSCP.YouwillprobablywanttoturnoffIEEnhancedSecuritytemporarilyinorderto maketheuploadlesstedious.

21
Sage CRM Version 7 Amazon EC2 Cloud Deployment

7. ConfiguretheAMIinstanceforSageCRM NowweneedtoconfigureSQLServerandIISforSageCRMtoworkproperlyintheCloud. StartbyenablingTCP/IPonSQLServerExpresstoport1433

22
Sage CRM Version 7 Amazon EC2 Cloud Deployment

NowsetServerauthenticationtoSQLServerandWindowsAuthenticationmode:

23
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Nowchangethesauserpasswordandenableforlogin:

RestartSQLServerandtestthatyoucanloginassawiththenewpasswordyoujustset.

24
Sage CRM Version 7 Amazon EC2 Cloud Deployment

BydefaultIISwillhaveASPprohibited.EnableASPinIISManager:

25
Sage CRM Version 7 Amazon EC2 Cloud Deployment

8. InstallSageCRMontheAMIInstance NowwecaninstallSageCRM.

26
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Itiscriticalthatyousetthedatabasetolocalhost.ThisisbecausethedatabasenamechangeseverytimetheAMI instanceisrestarted(astheAMIcanberunonanyVMinanyphysicalserverwithintheAmazonEC2Cloud infrastructure):

Ifyouchoosetheactualmachinename(thedefaultpresented),thenyouwillfindSCRMwillfailtostartupwhenthe AMIinstanceisrestarted.Thiscanbefixedlaterbutitismuchbettertoavoidthatsituationbysettingthemachine nametolocalhostnow.

27
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Theinstallshouldnowcompleteasnormal:

28
Sage CRM Version 7 Amazon EC2 Cloud Deployment

9.

Checktheinstallworks

FromtheAWSconsole,copythePublicDNSandmakeupaSageCRMURLasfollows: http://ec21847390172.compute1.amazonaws.com/CRM/eware.dll/UK

29
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Checkthatthisinstallworksfromabrowser:

30
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Loginusingadminandthedemopersonausersandtestthattheapplicationworksasexpectedincludingthe Interactivedashboard: Congratulations!YouhavesuccessfullydeployedSageCRMtotheCloud.

31
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Wearenotfinishedhowever.Whileyoucanusetheaboveinstanceasademo,youcannotrealisticallyuseitin production.ThisisbecausetheURLwillhavetochangeiftheinstanceisrestarted. Letsdemonstratethis.GototheAWSconsoleandrestarttheinstance(StopfollowedbyStartnotreboot):

32
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Waitfor5to10minutesfortheinstancetoreboot.Youcancheckthattheserverhasfullyrebootedbyremote connectingtoityouwillnotbeabletoremoteconnectuntiltheserverhasfullyrebooted. NotethatthepublicDNShaschanged:

33
Sage CRM Version 7 Amazon EC2 Cloud Deployment

ThenrefreshthebrowsershowingSageCRMearlier:

34
Sage CRM Version 7 Amazon EC2 Cloud Deployment

ChangetheURLtothenewPublicDNSname:

35
Sage CRM Version 7 Amazon EC2 Cloud Deployment

CheckthatyouhaveSQLServersetupcorrectlybycheckingthatyoucanloginasoneofthepersonasandcanusethe applicationincludingtheInteractiveDashboard(asSQLServeronthisinstancewillhavechangedmachinename):

36
Sage CRM Version 7 Amazon EC2 Cloud Deployment

10. AllocateanElasticIPAddresstotheinstall ThesituationwheretheinstanceURLchangeseverytimeitisrestartedisobviouslyaseriousissueforproduction.We cansolvethisproblembyallocatingastaticElasticIPtotheinstance.Letsdoitnow.SelecttheElasticIPsmenu.If therearenoexistingelasticIPsyouwillbepromptedtoallocateone.Nowyouneedtoassociatetheallocatedstatic IPwithyourinstance:

37
Sage CRM Version 7 Amazon EC2 Cloud Deployment

NowchangetheURLintheSageCRMlogintothisstaticIP:

Logonasapersonaandcheckthatyoucanaccesstheapplicationasbefore.

38
Sage CRM Version 7 Amazon EC2 Cloud Deployment

Restarttheinstanceasbefore.WhentheinstancehasstartedupyoumustreassociatetheElasticIPwiththe instanceagaintoreestablishtheIPmappingtothenewinstancePublicIP/DNS: 39
Sage CRM Version 7 Amazon EC2 Cloud Deployment

CheckthatthesameURLwiththeelasticIPsuccessfullyworksirrespectiveofthenewinstancePublicDNS. 11. ConfigureyourDNSorTinyURL Finally, you canmapthe Elastic IP either toyour DNS ifyou want to hide theAmazon Cloudbehind your company websiteorsimplymakeitintoaTinyURL.

40
Sage CRM Version 7 Amazon EC2 Cloud Deployment

CRM Document Version Code

IMP-CLO-ENG-700-2.0

Das könnte Ihnen auch gefallen