Successfully reported this slideshow.
Your SlideShare is downloading. ×

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

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 26 Ad

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

Download to read offline

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.

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.

Advertisement
Advertisement

More Related Content

Recently uploaded (20)

Advertisement

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

  1. 1. Resin, Deployment, Cloud, Clustering and EC2 (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. 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 EC2 Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  3. 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 tutorial Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  4. 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. 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. 6. Amazon WS Console to launch instance Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  7. 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. 8. Make sure Resin is running Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  9. 9. Install Resin on local dev box (Ubuntu) • Add Caucho's Debian repository to system's repositories • edit /etc/apt/sources.list • Add this line Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  10. 10. Test Resin setup on local dev box Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  11. 11. Use Eclipse to create test war file Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  12. 12. Create a simple servlet Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  13. 13. Export war file Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  14. 14. Deploy and test locally Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  15. 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 topology Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  16. 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. 17. Create an Elastic IP for your AMI Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  18. 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 used Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  19. 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 password Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  20. 20. Create password for your Amazon Cloud Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  21. 21. Put user-data with credentials in AMI Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  22. 22. Create ec2.xml file and install it in Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  23. 23. Make sure right ports are open Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  24. 24. Deploy from command line • From development box, deploy test hello.war Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  25. 25. Conclusion Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
  26. 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 Computing Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.

Editor's Notes

  • \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

×