Resin, Deployment, Cloud, Clustering and EC2 (How To) Part I
Upcoming SlideShare
Loading in...5
×
 

Resin, Deployment, Cloud, Clustering and EC2 (How To) Part I

on

  • 1,631 views

http://www.caucho.com/resin-application-server/3g-java-clustering-cloud/ ...

http://www.caucho.com/resin-application-server/3g-java-clustering-cloud/

This covers setting up a Resin cluster in Amazon EC2. Much of the cluster setup would be the same in other environments as well. Resin is the only mainstream Java EE application server with clustering and cloud deployment built in and fully elastic that works in an EC2 environment. There are no add-ons, hacks, or tricks. Resin was simply designed to work well in the cloud. There are some extra things added for EC2, which would equally apply to other Virtualization 2.0 environments like Xen, and VMWare.

Statistics

Views

Total Views
1,631
Views on SlideShare
1,631
Embed Views
0

Actions

Likes
1
Downloads
28
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Resin, Deployment, Cloud, Clustering and EC2 (How To) Part I Presentation Transcript

  • 1. Resin, Deployment,Cloud, Clustering andEC2 (How To) Part 1 Session Replication, App Deployment and Clustering on EC2 Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved. caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc.
  • 2. Overview• Tutorial covers basics of using Resin Java Application Server on EC2 and EC2 like environments• Setting up Resin• Doing a cloud deploy• Setting up Resin Pro license• Deploying to EC2 box• Eclipse to create a simple war file and then deploy it to Amazon EC2Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 3. Resin works well with EC2 and IaaS• Many Steps in tutorial same for other IaaS solutions• Eucalyptus, CloudStack with CloudBridge, RightScale myCloud or even OpenNebula this guide should help you along as they all support the Amazon EC2 REST APIs.• Any IaaS cloud computing environment (private or public, on premises or hosted) very similar steps• Xen Server, Xen Cloud or VMWare vSphere etc. should be similar• Servers not only as a Resin on EC2 environment tutorial but just a general Resin deployment tutorialCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 4. Development boxes• Local dev box is Ubuntu (could be Linux, Windows, Mac OSX, but choose Ubuntu)• Remote EC2 box is Amazon Linux • Amazon Linux like CentOS • CentOS like RedHat• In a way it is a good Resin Linux tutorial that covers Debian like, and Red Hat like instances• (Resin runs on Solaris, Linux, Windows, Berkeley and Mac OSX).Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 5. Familiar with Amazon EC2?• If not, start here: http://docs.amazonwebservices.com/AWSEC2/ latest/GettingStartedGuide/Welcome.html (then come back)• Learn how to start/stop instances, etc.Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 6. Amazon WS Console to launch instanceCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 7. Start up new instance then install Resin• Fire up an Amazon Instance using Amazon Linux (basically CentOS 5.4)Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 8. Make sure Resin is runningCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 9. Install Resin on local dev box (Ubuntu)• Add Cauchos Debian repository to systems repositories• edit /etc/apt/sources.list• Add this lineCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 10. Test Resin setup on local dev boxCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 11. Use Eclipse to create test war fileCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 12. Create a simple servletCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 13. Export war fileCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 14. Deploy and test locallyCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 15. Create an Elastic IP for your AMI• Amazon EC2 instances are assigned two IP addresses • 1 public, and 1 private• The public address is mapped via Network Address Translation (NAT)• Every time you start or restart an instance, it gets new public and private addresses• This makes it hard to configure a static cluster topologyCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 16. Create an Elastic IP for your AMI• Amazon EC2 provides a service called Elastic IP addresses• Elastic IP addresses are static IP addresses.• Elastic IP addresses are associated with your account, not a specific instances.• You can associate an Elastic IP address with an instance.• It is good to associate your instance with an IP address so you can direct your calls to that instance when deploying an application• Also you need to know some address to configure the Triad• (Resin only communicates with private addresses, but uses public addresses and a secure handshake to exchange private addresses)Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 17. Create an Elastic IP for your AMICaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 18. Elastic IP address• It has to be reassign every time the server starts up• It has to be assigned to an AMI instance in order to be usedCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 19. Password and User name• You can’t execute commands remotely without a username and password• To do a remote deploy on Amazon EC2 from your dev box, you need a user name and passwordCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 20. Create password for your Amazon CloudCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 21. Put user-data with credentials in AMICaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 22. Create ec2.xml file and install it inCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 23. Make sure right ports are openCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 24. Deploy from command line• From development box, deploy test hello.warCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 25. ConclusionCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  • 26. Related links• Part 1 Resin Java EE Application Server clustering and deployment to EC2 (this in WIKI form)• Part 2 Resin clustering and deployment to EC2, session replication, Amazon Load Balancer• Resin Java EE Application Server’s Cloud Support and Clustering Support• Resin White Paper on Java EE Cloud ComputingCaucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.