Power Point PPT: Using Ant To Build J2 Ee Application – Complete Guide

ant-to-build-j2ee-application

Power Point PPT: Using Ant To Build J2 Ee Application

 

Tagged : / / / / / / / / / / / / / / / / / /

How to Run/Deploy Java EE applications on Amazon EC2?

running-java-ee-applications-on-amazon-ec2

Running Java EE applications on Amazon EC2: deploying to 20 machines with no money down

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.  Likewise, replicating even just part of a production environment is a major undertaking. With Amazon’s Elastic Compute Cloud (EC2), however, things are very different. A set of Linux servers is now just a web service call away. Depending on the type of the servers you simply pay 10-80 cents per server per hour for up to 20 servers! No more upfront costs or waiting for machines to be purchased and configured.

To make it easier for enterprise Java developers to use EC2, I have created EC2Deploy.  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.

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.

class ClusterTest extends GroovyTestCase {
  void testSomething() {
    AWSProperties awsProperties = new
        AWSProperties("/…/aws.properties")

    def ec2 = new EC2(awsProperties)

    def explodedWar = '…/projecttrack/webapp/target/ptrack'

    ClusterSpec clusterSpec =
       new ClusterSpec()
            .schema("ptrack", ["ptrack": "ptrack"],
                    ["src/test/resources/testdml1.sql",
                     "src/test/resources/testdml2.sql"])
            .slaves(1)
            .tomcats(1)
            .webApp(explodedWar, "ptrack")
            .catalinaOptsBuilder({builder, databasePrivateDnsName ->
                 builder.arg("-Xmx500m")
                 builder.prop("com.sun.management.jmxremote")
                 builder.prop("com.sun.management.jmxremote.port", 8091)
                 builder.prop("com.sun.management.jmxremote.authenticate",
                                     false)
                 builder.prop("com.sun.management.jmxremote.ssl", false)
                 builder.prop("ptrack.application.environment", "ec2")
                 builder.prop("log4j.configuration",
                               "log4j-minimal.properties")
                 builder.prop("jdbc.db.server", databasePrivateDnsName)})

    SimpleCluster cluster = new SimpleCluster(ec2, clusterSpec)

    cluster.loadTest("…/projecttrack/functionalTests/jmeter/SimpleTest.jmx",
        [1, 2])

    cluster.stop()
  }
}

Let’s look at each of the pieces.

First, we need to configure the framework as follows:

    AWSProperties awsProperties = new
        AWSProperties("/…/aws.properties")
    def ec2 = new EC2(awsProperties)

The aws.properties file contains various properties including the Amazon WS security credentials and the EC2 AMI (i.e. OS image) to launch. All servers use my EC2 appliance AMI that has Java, MySQL, Apache, Tomcat, Jmeter and some other useful tools pre-installed.

Next we need to configure the servers:

     ClusterSpec clusterSpec =
        new ClusterSpec()
             .schema("ptrack", ["ptrack": "ptrack"],
                    ["src/test/resources/testdml1.sql",
                     "src/test/resources/testdml2.sql"])
             .slaves(1)
             .tomcats(1)
             .webApp(explodedWar, "ptrack")
             .catalinaOptsBuilder({builder, databasePrivateDnsName ->
                 builder.arg("-Xmx500m")
                 builder.prop("com.sun.management.jmxremote")
                 builder.prop("com.sun.management.jmxremote.port", 8091)
                 builder.prop("com.sun.management.jmxremote.authenticate",
                                     false)
                 builder.prop("com.sun.management.jmxremote.ssl", false)
                 builder.prop("ptrack.application.environment", "ec2")
                 builder.prop("log4j.configuration",
                               "log4j-minimal.properties")
                 builder.prop("jdbc.db.server", databasePrivateDnsName)})

     SimpleCluster cluster = new SimpleCluster(ec2, clusterSpec)

This code first creates a ClusterSpec, which defines the configuration of the machines and the applications:

  • schema() – specifies the name of the database schema to create; names of the users and their passwords; the DML scripts to execute once the database has been create
  • slaves() – specifies how many MySql slaves to create
  • tomcats() – specifies how many Tomcats to run.
  • webApp() – configures a web application. This method takes two parameters: the path to the exploded WAR directory (conveniently created by Maven) and the context to deploy the web application under.
  • catalinaOptsBuilder() – supplies a closure that takes a builder and the DNS name of the MySQL server as arguments and returns the CATALINA_OPTS used to launch Tomcat. It’s primary purpose is to configure the web application(s) to use the correct database server

It then creates a cluster with that specification.

We then start the cluster:

    cluster.start()

At this point EC2Deploy will:

  1. Launch the EC2 instances running my appliance AMI.
  2. Initialize the MySql master database
  3. Create the MySql slave
  4. Create the database schema and the users
  5. Run any DML scripts (these are cached on S3 in a bucket called “tmp–dml” for the reasons described next)
  6. Upload the web applications to Amazon S3 (Simple Storage Service) where they are cached in order to avoid time consuming uploads (over slow DSL connections, for example). EC2Deploy only uploads new and changed files, which means that the bulky 3rd party libraries are only uploaded once. Each web application is stored in an S3 bucket called -tmp-war. If this bucket does not exist you will see some warning messages and the bucket will be created.
  7. Deploy the web applications on each of the Tomcat servers
  8. Configure Apache to load balance across the Tomcat servers

Once the cluster is started we can run a JMeter load test:

    cluster.loadTest("…/projecttrack/functionalTests/jmeter/SimpleTest.jmx", [1, 2])

The first argument specifies the test to run and the second argument is a list of JMeter thread counts. In this example, EC2deploy first runs the load test with one thread and then two threads. For each test run, it generates a report describing CPU utilization for each machine, average response time and throughput.

Finally, we stop the EC2 instances:

cluster.stop()

As you can see, EC2Deploy makes it pretty easy to deploy and test your enterprise Java application. I’ve used it to clone a production environment and run load tests. NOTE 1/28/08: The source code EC2Deploy along with a very cool Maven plugin is now available !

Tagged : / / / / / / / / / / / / / / / / / /

Click & Download TOP useful Freeware software

freeware-software

Click & Download TOP useful Freeware software

Office

OpenOffice – office suite
PC Suite 602 – office suite
AbiWord – text editor
Atlantis Nova – text editor
Microsoft PowerPoint Viewer  – power point files viewer
Adobe Reader – pdf reader
Foxit PDF Reader – pdf reader
PDFCreator – create pdf documents
Doc Convertor – document convertor
Convert – unit convertor
Converber – unit convertor
Sunbird – calendar/organizer
EssentialPIM Free – calendar/organizer
PhraseExpress – speed up your writing
ATnotes – create notes on the desktop

Archive managers

7-Zip – compression program
IZArc – compression program
TugZIP – compression program
CabPack – compression program
Universal Extractor – extract files from any type of archive

Internet

Firefox – web browser
Internet Explorer– web browser
Maxthon – web browser
Opera – web browser
Avant Browser – web browser
Thunderbird – email client
PopTray – check for emails
Free Download Manager – download manager
FlashGet – download manager
WellGet – download manager
Download Master – download manager
WGET – commandline download manager
HTTrack – offline browser
WebReaper – offline browser
Yeah Reader – RSS reader
GreatNews – RSS reader
RSSOwl – RSS reader

P2P  this is sharing files on your computer with someone else.

?Torrent – torrent client
Azureus – torrent client
BitComet – torrent client
ABC – torrent client
BitTornado – torrent client
eMule – p2p client
SoulSeek – p2p client
Shareaza – p2p client
DC++ – Direct Connect network client
PeerGuardian – IP blocker

Chat

Miranda – chat client
MSN Messenger – chat client
Yahoo Messenger – chat client
QIP – chat client
Gaim – chat client
JAJC – chat client
HydraIRC – IRC client
Talkative IRC – IRC client
IceChat – IRC client
Skype – VOIP client
Google Talk – VOIP client
VoipStunt – VOIP client
Gizmo – VOIP client
Wengo – VOIP client

Security

AVG Free – antivirus
Avast Home Free – antivirus
AntiVir PersonalEdition – antivirus
BitDefender Free – antivirus
ClamWin – antivirus
CyberDifender – Internet Security Suite
Ad-aware – anti-spyware
Spybot: Search & Destroy – anti-spyware
Windows Defender – anti-spyware
SpywareBlaster – anti-spyware
Spyware Terminator – anti-spyware
Tootkit Reveaker  – rootkit detection utility
Winpooch – system protection
HiJack Free – system protection
HighJackThis – hijackers detector and remover
Kerio Personal Firewall – firewall
Sygate Personal Firewall – firewall
ZoneAlarm – firewall
AxCrypt – file encryption
Simple File Shredder – securely delete files
PuTTy – SSH client
KeePass – password manager
LockNote – password manager
nPassword – password manager
Microsoft Baseline Security Analyzer – identify security misconfigurations

Network

Hamachi – VPN client
RealVNC – remote control
UltraVNC – remote control
Ethereal – local area network administration
The Dude – network administration
Wireshark – network administration
Angry IP Scanner – IP scanner
IP-Tools – IP scanner
Free Port Scanner – IP scanner
NetMeter – network bandwidth monitoring

Servers

FileZilla – FTP client
FileZilla Server – FTP server
EFTP – FTP client/server
XAMPP – integrated server package of Apache, mySQL, PHP and Perl
WAMP – Apache, PHP5 and MySQL server

Audio

Foobar2000 – audio player
WinAmp – audio player
1by1 – audio player
JetAudio – audio player
XMPlay – audio player
Xion – audio player
Apollo – audio player
MediaMonkey – music organizer
The GodFather – music organizer
dBpowerAMP – audio converter
Audacity – audio converter
WavePad – audio converter
Kristal Audio Engine – audio editor
Exact Audio Copy – CD ripper
Audiograbber – CD ripper
CDex – CD ripper
Mp3 Tag Tools – tag editor
Mp3tag – tag editor
Taggin? MP3 – tag editor
Monkey?s Audio – APE compressor/decompressor
mpTrim – mp3 editor
WavTrim – wave editor
EncSpot Basic – analyse mp3 files

Video

Windows Media Player – audio/video player
VLC – video player
Media Player Classic – video player
MV2Player – video player
CrystalPlayer 1.95 – video player
Zoom Player – video player
GOM Player – video player
viPlay – video player
DSPlayer – video player
VirtualDub – video editor
CamStudio – video screen recording
AviSplit – Avi splitter
Video mp3 Extractor – rip audio from video files
Free iPod Converter – convert all popular video formats to iPod video
MediaPortal – turning your PCinto a Media Center
The FilmMachine

Image

Gimp – image editor
PhotoFiltre – image editor
Paint.net – image editor
ArtRage – image editor
Artweaver – image editor
IrfanView – image viewer
Picasa – image viewer
XnView – image viewer
FastStone Image Viewer – image viewer
FuturixImager – image viewer
Easy Thumbnails – create thumbnails from images
JoJoThumb – create thumbnails from images
iWebAlbum – create web photo albums
JAlbum – create web photo albums
3D Box Shot Maker – design quality box shot
FastStone Capture – screen capture
WinSnap – screen capture

3D

Blender3D – 3D renderer
3Delight Free – 3D renderer
SketchUp – 3D modeling
Maya Learning Edition – 3D modeling

Developers

AutoIt – task automation
SciTE4AutoIt3 – text editor for AutoIt
AutoHotkey – task automation
PHP Designer – PHP editor
Notepad++ – text editor
ConTEXT Editor – text editor
PSPad – text editor
FoxEditor – text editor
Crimson Editor – source code editor
Elfima Notepad – text editor
Notepad2 – text editor
Nvu – HTML editor
Alleycode – HTML editor
BlockNote – web page editor
Weaverslave – web page editor

CD/DVD

DeepBurner – CD/DVD burner
CDBurner XP Pro – CD/DVD burner
BurnAtOnce – CD/DVD burner
Express Burn – CD/DVD burner
Zilla CD-DVD Rip?n?Burn – CD/DVD burner
ImgBurn – ISO, BIN burner
Daemon tools – virtual CD/DVD
DVD Decrypter – DVD ripper
DVD Shrink – DVD ripper
Nero CD-DVD Speed – CD/DVD info and quality test

Codecs

GSpot – codec information
AC3Filter – audio codec
Xvid – video codec
QuickTime Alternative – video codec
Real Alternative – video codec
K-Lite Codec Pack – all codecs

System Ulilities

CCleaner – system cleaner
xp-AntiSpy – OS setup
jv16 Powertools – system utilities
XP SysPad – system monitoring utility
What?s Running – process guard
Registrar Lite – registry editor
WinIPConfig – replacement for ?ipconfig.exe? and ?route.exe?
Unlocker – file eraser
Eraser – secure file eraser
Undelete Plus – file recovery
freeCommander – file manager
ExplorerXP – file manager
Duplicate File Finder – find all duplicate files
Ant Renamer – file renaming
ReNamer – file renaming
Icons From File – icos extractor
Chaos MD5 – MD5 generator
HashTab – MD5, SHA1 and CRC-32 file hashes
Rainlendar Lite – desktop calendar
Weather Watcher – weather firecast
Subtitle Workshop – subtitles editor
Ant Movie Catalog – movie organizer
Disclib – CD organizer
Dexpot – virtual desktops
DriveImage XML – create partition images
MozBackup – backup and restore bookmarks, etc.
SyncBack – system backup
Atomic Cock Sync – syncronize your clock
Citrus Alarm Clock – alarm clock
TaskSwitchXP – Alt-Tab replacement
Launchy – application launcher
allSnap – make all windows snap
Sysinternals Tools – various system tools
StrokeIt – mouse gestures
Net Profiles – create profiles of your network settings
ResourceHacker – view, modify, rename, add, delete
Java Runtime Environment – java for Windows

UI Enhancements

RocketDock  – application launcher
AveDesk – desktop enhancer
IconPhile – customize windows?s system icons
CursorXP Free – change mouse cursors
MacSound – volume control
LClock – Windows Longhorn clock
Y?z Dock – application launcher
Y?z Shadow – shadow effect to the windows
Y?z Toolbar – change the toolbar icons in Explorer and Internet Explorer
Taskbar Shuffle – rearrange the programs on the taskbar by dragging
Visual Task Tips – thumbnail preview image for each task in the taskbar
Badges  – put badges on any folder or file
Folderico – change icons of the folders
Folder Marker – mark your folders
Folder2MyPC – add favourite locations to My Computer
Microsoft TweakUI – system settings
BricoPacks – shell packs
ShellPacks – shell packs
Tango Shell Patcher – shell patcher
XPize – GUI enhancer
Vista Transformation Pack  – complete visual style
Vista Sound Scheme – Windows Vista sound scheme
Royale Theme – visual style

Hardware monitoring/Benchmarking

CPU-Z – cpu information
CrystalCPUID – cpu information
Central Brain Identifier – cpu information
Everest – system information
SiSoft Sandra – system information
SpeedFan – hardware monitor
Memtest86 – memory test
PowerMax – HDD test
3Dmark 06 – 3D game performance benchmark
Aquamark – performance benchmark
rthdribl – 3D benchmark
Fraps – 3D benchmark, fps viewer and screen recorder
Prime 95 – cpu benchmarking
SuperPI – cpu benchmarking
CPU Rightmark – cpu overclock
Core Temp – cpu temperature
ATiTool – video overclock
ATI Tray Tools – Radeon tweaker
aTuner – GeForce and Radeontweaker
RivaTuner – video overclock
Nokia Monitor Test – monitor adjustmets
UDPixel – fix dead pixels

Games

123 Free Solitaire  – solitaire games collection
Arcade Pack – classic arcade games
Live For Speed – online racing simulator
Enigma – puzzle game
Freeciv – multiplayer strategy game
Tux Racer – race down steep, snow-covered mount?ins

Education

SpeQ Mathematics  – mathematics program
Dia – diagram creation program
Google Earth – explore the world
NASA World Wind – 3D virtual globe
Celestia – explore the space
Stellarium – planetarium

Miscellaneous

nLite – Build your own custom Windows disk.
VirtualPC – create virtual machines
grabMotion – webcam capture
iDailyDiary – simple page-for-a-day diary
Pivot Stickfigure Animator – create stick-figure animations
Wink – create presentations
Scribus – professional page layout
FreeMind – mind mapping software
Windows Live Writer – WYSIWYG blog authoring

Wallpapers

Michael Swanson  – 1920 x 1200; 1600 x 1200; amazing wallpapers
Mikhail Arkhipov – 1920 x 1200; 1600 x 1200; amazing wallpapers

Tagged : / / / / / / / / / / / / / / / /

5 Keys to Automating Configuration Management for Application Infrastructure

automating-configuration-management-for-application-infrastructure

5 Keys to Automating Configuration Management for Application Infrastructure

One of the trends being discussed in business, among vendors and in the analyst community is the importance of automating the functions performed by IT. Growing demands by the business, tight budgets and compliance pressures together accentuate the need for IT to be more agile, efficient and responsive to business stakeholders.

Naturally, vendors rush into this environment, each touting the unique benefits of its solution set and the urgency to move forward immediately.  A key area targeted for IT automation is the area of ‘configuration management.’  As it relates to automating day to day IT functions, configuration management can mean many different things: patch management, server and network management or others.

One of the newer targets for configuration management techniques is the application layer itself.  Think about that great stack of software that comprises a contemporary J2EE application—application server, web server, database, middleware and so on—typically from different vendors.  But they all adhere to industry standards, right?  So they all must plug and play together nicely, right? Not really.

In fact to make the entire stack work effectively, there are many individual configuration files, each one with a long list of their own parameters, which need to be edited, tuned and controlled.  And because the set of software is so complex, each element is managed by its own specialist in isolation without much knowledge of the other pieces of the puzzle.

The combination of many software assets, configured manually without much knowledge of dependencies leads to predictable results.  Someone makes a change in one area while stability and performance problems show up elsewhere.  Once the problem crops up, a team of IT specialists will take hours, maybe days to track down the problem and provide the solution.  Analyst firms like Enterprise Management Associates and Forrester Research agree problems in the configuration of the application infrastructure are now one of the leading causes of downtime.

Some vendors and businesses are now focused on a comprehensive approach to tackling this problem. The five building blocks required are easy enough to understand:

  1. Discovery and mapping—What application element and software assets do I have in my environment? How are they configured, item by item?
  1. Change monitoring—Inform management not only about the applications that have changed, but tell them how they have changed.

 

  1. Release Management—Sometimes called ‘provisioning,’ this relates to the ability to model configuration changes to the application infrastructure and then deploy those changes consistently across all phases of the application life-cycle.
  1. Auditing and Reporting—Show the business that IT supports corporate governance initiatives, not only at the server and network level, but also at the critically important application layer.

 

  1. Integration with the IT environment—Insure that the tools for configuration management of the application infrastructure work seamlessly with your problem management system or your configuration management database.

1.‘Discovery’ is usually where these solutions should start—as long as they do not end there!  In order to provide the IT team with a solution to managing the thousands of configuration settings in a J2EE application stack, you need to have a repository of the environment itself, a working model that reflects your application infrastructure.  With this repository of data in place, IT can then begin to comprehend how the various elements on the application layer are actually

2.‘Change Monitoring’ represents a critical component of a configuration management solution for application infrastructure.  With so many servers, instances and individual parameters, the number of configuration items quickly runs to the thousands per application.

Change monitoring must identify not only that a component changed, it must also identify exactly where the change was made and on which server(s).  Right now, IT specialists comb through text files trying to figure this out when there’s an application outage or when the application can’t make the transition out of the lab and into production. At mValent we call this “Hack and Hope”– they hack into text files, make a change and hope that it resolves the problem.  Automation tools instead can be used not only to find the change, but to find only relevant changes, ignoring unimportant differences.

Another key component of change monitoring to be addressed would be the notion of versioning and roll-back.  This is a well understood capability that exists in source code control systems and was applied by Documentum among others to the content management problem.  Now, we should focus on providing versioning and roll-back to the thousands of configuration settings which comprise a J2EE application stack.  Rather than have IT scramble to figure out what has changed when there’s an outage, let’s just re-instate a known working version of all of the configuration settings.  Then, IT can take the analysis and resolution off-line without the pressure to restore service immediately.

3. ‘Release Management’ is an important forward-looking area of a configuration management solution for application infrastructure. Right now, IT teams use a mixture of scripts and manual methods to deploy changes to application infrastructure settings. New solutions look to apply true automation to this process, insuring that configuration changes are modeled, evaluated and approved prior to deployment. Release management also validates that the process applies changes correctly. This also offers automatic deployment of changes to configuration settings and provides ‘out of the box’ templates for deploying new versions of an application server or a complete J2EE application stack.

These tasks currently take days to achieve and are error-prone.  Applying automation reduces cost and time while advancing quality.

4. ‘Audit and Reporting’ in a configuration management solution for application infrastructure refers to a capability report on the application infrastructure at a detailed level.  This would include reporting on change activity—which applications are driving the most change and causing IT execs the most headaches with SLAs.  Currently, this information exists at the server and network level, but less commonly for the applications themselves where change and upheaval is more likely.

Audit and Reporting also measures how your application infrastructure complies with recommendations, standards or your best practices for how the infrastructure should be configured.  Which assets are in compliance? Which are out of compliance?

Solutions should also measure change activity. Who made the change, Why, When, and so on.  And, it would be appropriate to measure whether changes were made according to your change process or were made outside that process.

5. ‘Integration with your IT environment’ in a configuration management solution for application infrastructure refers to the ability of the solution to fit with the other elements in the IT ecosystem, like your problem and incident management system, your Configuration Management Data Base (CMDB), a source code management system or your corporate LDAP directory.

Ideally the solution will integrate directly with these items and create a ‘closed loop’ environment for managing change to the application infrastructure.  As an example, when a ticket is opened requesting a change to the configuration setting for the web server, the solution should automate the actual change process, include the ticket number in the reason for change and report back to the incident system so that the ticket can be closed.

This eliminates yet another manual process and opportunity for error in IT management.

Benefits & Summary.  The major benefits of a configuration management solution for application infrastructure relate to reducing complexity and promoting compliance for IT.  By transforming today’s manual, error-prone tasks into a sequence of automated processes, your IT team will see benefits in:

·  Improving the productivity of your IT Infrastructure Team, by upwards of 50% and enabling them to spend more time on new initiatives rather than fire-fighting

·  Accelerating time-to-value for applications by 25%

·  Improving the quality and uptime of your applications by reducing the key elements that cause most of today’s outages

·  Providing comprehensive best practices and compliance reports to management and stakeholders.

With today’s IT struggling to meet increasing demands without headcount increases, a configuration management solution for application infrastructure offers important sources of value. configured.  More important, IT can begin to understand the dependencies between, say, how the data base is configured and its impact on the application server.  Thus, application configuration problems can be averted before they arise.

 Source: http://www.cmcrossroads.com

Tagged : / / / / / / / / / / / /