This link has been bookmarked by 37 people . It was first bookmarked on 09 Jan 2008, by Harjeet Singh.
-
09 Feb 11
-
06 Jan 11
-
18 Nov 09
-
14 Nov 09
-
24 Apr 09
-
16 Aug 08
DJHell .Computer hardware has traditionally been a scarce, expensive resource. In the early days of computing developers had to share a single machine. Today each developer usually has their own machine but it?s rare for a developer to have more than one. This me
AWS blog Chris Richardson Cloud Computing EC2 Java JEE Web importiert Architektur Cloud Computing development
-
17 Jun 08
-
13 Jun 08
-
03 Jun 08
-
24 May 08
Brent SordylEC2Deploy a Groovy framework for deploying an enterprise Java application on a set of Amazon EC2 servers. EC2Deploy provides a simple, easy to use API for launching a set of EC2 instances; configuring MySQL, Apache and one or more Tomcat servers
-
16 May 08
-
30 Apr 08
-
21 Apr 08
-
11 Feb 08
-
29 Jan 08
-
14 Jan 08
-
11 Jan 08
-
10 Jan 08
-
09 Jan 08
-
<h1>Running JEE applications on Amazon EC2: deploying to 20 machines with no money down</h1><br/> <div class="date"><a rel="nofollow" href="http://chris-richardson.blog-city.com/read/prev/412074678.htm" rel="previous" title="read the previous entry">«</a><br/> <a rel="nofollow" href="http://chris-richardson.blog-city.com/" rel="home" title="visit home page">H</a> <a rel="nofollow" href="http://chris-richardson.blog-city.com/console/admin/e.cfm?i=412074678" rel="nofollow" title="edit entry">E</a><br/> <a rel="nofollow" href="http://chris-richardson.blog-city.com/read/next/412074678.htm" rel="next" title="read the next entry">»</a><br/> <br/> <br/> <a rel="nofollow" href="http://chris-richardson.blog-city.com/#">email</a></div><br/> <div class="date">posted Monday, 7 January 2008</div><br/> <br/> <div class="bodytext"><p class="MsoNormal">Computer hardware has traditionally been a scarce, expensive resource. In the early days of computing developers had to share a single machine. Today each developer usually has their own machine but it’s rare for a developer to have more than one. This means that running performance tests often involves scavenging for machines. <span> </span>Likewise, replicating even just part of a production environment is a major undertaking. With <a rel="nofollow" href="http://www.amazon.com/gp/browse.html?node=201590011" target="_blank">Amazon’s Elastic Compute Cloud (EC2)</a>, however, things are very different. A set of Linux servers is now just a web service call away. You simply pay 10 cents per CPU-hour for up to 20 machines! No more upfront costs or waiting for machines to be purchased and configured.</p> <p class="MsoNormal">To make it easier for enterprise Java developers to use EC2, I have created EC2Deploy.<span> </span>It’s a Groovy framework for deploying an enterprise Java application on a set of Amazon EC2 servers. EC2Deploy provides a simple, easy to use API for launching a set of EC2 instances; configuring MySQL, Apache and one or more Tomcat servers; and deploying one or more web applications. In addition, it can also run JMeter and collect performance metrics.</p> <p class="MsoNormal">Here is an example script that launches some EC2 instances; configures MySQL with one slave, Tomcat and Apache; deploys a single web application on the Tomcat server; and runs a JMeter test with first one thread and then two.</p> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';">class ClusterTest extends GroovyTestCase {</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>void testSomething() {</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>AWSProperties awsProperties = new </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>AWSProperties("/…/aws.properties")</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>def ec2 = new EC2(awsProperties)</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>def explodedWar = '…/projecttrack/webapp/target/ptrack'</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>ClusterSpec clusterSpec = </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>new ClusterSpec()</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><span> </span>.schema("ptrack", ["ptrack": "ptrack"], </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>["src/test/resources/testdml1.sql", </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>"src/test/resources/testdml2.sql"])</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>.slaves(1)<span> </span></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><span> </span>.tomcats(1)</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>.webApp(explodedWar, "ptrack")</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>.catalinaOptsBuilder({builder, databasePrivateDnsName -></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>builder.arg("-Xmx500m")</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>builder.prop("com.sun.management.jmxremote")</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>builder.prop("com.sun.management.jmxremote.port", 8091)</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><span> </span><span> </span>builder.prop("com.sun.management.jmxremote.authenticate", <span> </span></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>false)</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><span> </span>builder.prop("com.sun.management.jmxremote.ssl", false)</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>builder.prop("ptrack.application.environment", "ec2")</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>builder.prop("log4j.configuration", </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>"log4j-minimal.properties")</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>builder.prop("jdbc.db.server", databasePrivateDnsName)})</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>SimpleCluster cluster = new SimpleCluster(ec2, clusterSpec)</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>cluster.loadTest("…/projecttrack/functionalTests/jmeter/SimpleTest.jmx",</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>[1, 2])</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>cluster.stop()</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span>}</span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';">}</span></pre> <p style="margin-bottom: 0.0001pt;" class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"> </span></p> <p class="MsoNormal">Let’s look at each of the pieces.</p></div>
-
<h1><br/>Running JEE applications on Amazon EC2: deploying to 20 machines with no money down<br/>></h1><br/> <div class="date"><a rel="nofollow" href="http://chris-richardson.blog-city.com/read/prev/412074678.htm" rel="previous" title="read the previous entry"><br/>«<br/>></a><br/> <a rel="nofollow" href="http://chris-richardson.blog-city.com/" rel="home" title="visit home page"><br/>H<br/>></a> <a rel="nofollow" href="http://chris-richardson.blog-city.com/console/admin/e.cfm?i=412074678" rel="nofollow" title="edit entry"><br/>E<br/>></a><br/> <a rel="nofollow" href="http://chris-richardson.blog-city.com/read/next/412074678.htm" rel="next" title="read the next entry"><br/>»<br/>></a><br/> <br/> <br/> <a rel="nofollow" href="http://chris-richardson.blog-city.com/#"><br/>email<br/>></a></div><br/> <div class="date"><br/>posted Monday, 7 January 2008<br/>></div><br/> <br/> <div class="bodytext"><p class="MsoNormal"><br/>Computer hardware has traditionally been a scarce, expensive resource. In the early days of computing developers had to share a single machine. Today each developer usually has their own machine but it’s rare for a developer to have more than one. This means that running performance tests often involves scavenging for machines.<br/>> <span> </span><br/>Likewise, replicating even just part of a production environment is a major undertaking. With<br/>> <a rel="nofollow" href="http://www.amazon.com/gp/browse.html?node=201590011" target="_blank"><br/>Amazon’s Elastic Compute Cloud (EC2)<br/>></a><br/>, however, things are very different. A set of Linux servers is now just a web service call away. You simply pay 10 cents per CPU-hour for up to 20 machines! No more upfront costs or waiting for machines to be purchased and configured.<br/>></p> <p class="MsoNormal"><br/>To make it easier for enterprise Java developers to use EC2, I have created EC2Deploy.<br/>><span> </span><br/>It’s a Groovy framework for deploying an enterprise Java application on a set of Amazon EC2 servers. EC2Deploy provides a simple, easy to use API for launching a set of EC2 instances; configuring MySQL, Apache and one or more Tomcat servers; and deploying one or more web applications. In addition, it can also run JMeter and collect performance metrics.<br/>></p> <p class="MsoNormal"><br/>Here is an example script that launches some EC2 instances; configures MySQL with one slave, Tomcat and Apache; deploys a single web application on the Tomcat server; and runs a JMeter test with first one thread and then two.<br/>></p> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><br/>class ClusterTest extends GroovyTestCase {<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>void testSomething() {<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>AWSProperties awsProperties = new<br/>> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>AWSProperties("/…/aws.properties")<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>def ec2 = new EC2(awsProperties)<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>def explodedWar = '…/projecttrack/webapp/target/ptrack'<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>ClusterSpec clusterSpec =<br/>> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>new ClusterSpec()<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><span> </span><br/>.schema("ptrack", ["ptrack": "ptrack"],<br/>> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>["src/test/resources/testdml1.sql",<br/>> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>"src/test/resources/testdml2.sql"])<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>.slaves(1)<br/>><span> </span></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><span> </span><br/>.tomcats(1)<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>.webApp(explodedWar, "ptrack")<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>.catalinaOptsBuilder({builder, databasePrivateDnsName -><br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>builder.arg("-Xmx500m")<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>builder.prop("com.sun.management.jmxremote")<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>builder.prop("com.sun.management.jmxremote.port", 8091)<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><span> </span><span> </span><br/>builder.prop("com.sun.management.jmxremote.authenticate",<br/>> <span> </span></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>false)<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><span> </span><br/>builder.prop("com.sun.management.jmxremote.ssl", false)<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>builder.prop("ptrack.application.environment", "ec2")<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>builder.prop("log4j.configuration",<br/>> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>"log4j-minimal.properties")<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>builder.prop("jdbc.db.server", databasePrivateDnsName)})<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>SimpleCluster cluster = new SimpleCluster(ec2, clusterSpec)<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"> </span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>cluster.loadTest("…/projecttrack/functionalTests/jmeter/SimpleTest.jmx",<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>[1, 2])<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>cluster.stop()<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span> </span><br/>}<br/>></span></pre> <pre><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><br/>}<br/>></span></pre> <p style="margin-bottom: 0.0001pt;" class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"> </span></p> <p class="MsoNormal"><br/>Let’s look at each of the pieces.<br/>></p></div>
-
-
08 Jan 08
-
07 Jan 08
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.