Tip: Have VM run same EAR as produciton

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Monday, April 30, 2012 5:42 PM
To: Thompson, Sonya (HAL); Ruckman, Maurice (HAL); Phatak, Sheetal (HAL); Bojja, Sridhar (HAL Contractor); Fillman, Eric (HAL)
Cc: Augustine, Anila (HAL)
Subject: New JBoss config for developer vms

The /home/jboss1/HAL folder contains all the static content needed to run the application on developer vms. Its equivalent on infrastructure servers is /wbi/haldata/webxxx (where xxx can be tst, res, ...). Apache for example has its document root set to /home/jboss1/HAL/halwebsite on developer vms, and to the equivalent /wbi/haldata/webtst/halwebsite on webtest.

You can use symbolic links to simulate the production environment on your developer vm: have your HAL folder be a link to /wbi/haldata/webprd_cluster1 and your apache will serve the same static content as the production website:

1) ln -s /wbi/haldata/webprd_cluster1 /home/jboss1/HAL

2) Download the production ear from hudson and drop it into your JBoss deploy folder and you are running the same ear as the production environment as well.

Installing Maven Inside Eclipse (Subversion Eclipse Plug-in)

Initial install of plug-in

1. Create a Maven Workspace "/home/jboss1/workspace-your-space"
2. File, New, Other, "Checkout Maven Projects from SCM"
3. Next
4: Click on "Find more SCM connectors in the m2e" link (Maven to Eclipse)
5. Check "m2e-subclipse"
6. Finish
7. Next
8. Next
9. Next
10. Accept terms and conditions, and "Finish"
11. Click "OK" for "Security Warning" wait for "Installing Software"
12. Allow "Eclipse" to restart

Subsequent Installation of Projects

1. File, New, Other
2. File, New, Other, "Checkout Maven Projects from SCM"
3. Next
4. Choose "SVN" in the SCM URL, left-most drop-down

5. Copy the URL from SVN and remove the trailing slash, such as:
http://halsvn01/svn/hal/branches/RC/yy.ww-RC
Default values: Checkout Head Revision, and Checkout All Projects

6. Next
7. Use default Workspace location, Finish
8. Wait about a minute for it to import and build

Debug on Server

1. Right-click on hal-ear, "Run As", "Debug on Server"
2. Next, Finish

If you have problems debugging because of a gateway timeout error then make sure of the following:
/etc/httpd/conf/workers.properties
set worker.template.reply_timeout=0 (instead of 30000)

Removing errror in JSP's

1. Right-click hal-parent and choose "Import..."
2. General,"File System"
3. Click Next
4. From directory: /home/jboss1/programs/jboss-eap-5.1/jboss-as/server/standard/deploy/jbossweb.sar
5. Click besides jstl.jar and standard.jar to activate the check boxes
6. Into: hal-parent
7. Click "Finish"
8. Right-click hal-web, "Build Path", "Configure Build Path"
9. Click on "Java Build Path"
10. Click Libraries tab
11. Click "Add Jar", click on your hal-parent project, and filter to jstl.jar, press OK

Reference: http://stackoverflow.com/questions/1265309/eclipse-cannot-find-the-tag-library-descriptor

Change your JRE to 1.6 compliance instead of 1.5

1. hal-ejb, Project, Properties, Java Compiler, use "JavaSE-1.6"
2. In your Markers tab there is an error "Java compiler does not match the version of the installed java project facet", right-click, quick fix, Change to Java 1.6, and click Finish

If you encounter an error during build

** This needs further investigation **
1. You may encounter a "Building workspace" error, as such you will need to disable the JavaScript Validator
2. Click OK twice, if error encountered
3. Go to Workbench, Windows, Preferences, Javascript, Validator, Errors/Warning
4. Uncheck the "Enable JavaScript semantic validation"
5. Apply, "Accept Full Build", and OK
6. Right-click on hal-web project, properties
7. Builders, uncheck JavaScript Validator
8. Continue, through side-effect warning
9. OK

Merge into RC (Release Candidate)

scan/replace the following two items:
webss-9999-new-feature
WEBSS-XXX

Checkout new copy of feature to your VM
svn co http://halsvn01/svn/hal/branches/features/webss-9999-new-feature

Merge feature with trunk
svn merge http://halsvn01/svn/hal/trunk

Commit Merge
svn commit -m "Sync feature branch webss-9999-new-feature with trunk. Fix WEBSS-XXX"

Checkout new copy of trunk
svn co http://halsvn01/svn/hal/trunk

Merge Code via Command Line
svn merge --reintegrate http://halsvn01/svn/hal/branches/features/webss-9999-new-feature
svn commit -m "Reintegrate feature branch webss-9999-new-feature into trunk. Fix WEBSS-XXX"

Delete Feature Branch After Successful Merge (why so quick to delete?)
svn delete http://halsvn01/svn/hal/branches/features/webss-9999-new-feature -m "Feature merged to trunk, deleting for cleanup"

Problems Encountered?

If there is a problem with merge-info where Subversion is saying there are "Missing range errors", then you should check to see if there is merge info on files or folders other than just the parent folder.  See here.

You can resolve conflicts with the switch --accept=working, which takes the working copies version of things.  When we originally started using SVN, the meta data became out of sync due to folks checking in individual files inside Eclipse, instead of checking in their entire feature branch.  Here's an example of usage:

svn resolve --accept=working halwebsite/com

Merge Code via Eclipse

  • In the IDE, go to File >> Import >> Maven >> Import Existing Maven Project & import the RC project
  • Right click the hal-parent (the dir might be named after the RC, so 12.17-RC) and say merge
  • Select the reintegrate radio option
  • Review the changes
  • If okay, commit the changes from command line

How QA2 copies haldata

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Tuesday, April 24, 2012 10:20 AM
To: Bojja, Sridhar (HAL Contractor); Thompson, Sonya (HAL); Phatak, Sheetal (HAL)
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL)
Subject: qa2

I created a new /wbi/haldata/webqa2 folder. The Apache document root for qa2 is now /wbi/haldata/webqa2/halwebsite (it was /wbi/haldata/webtst/halwebsite before). I also added a line in the Hudson job that deploys to qa2 so that it copies ${WORKSPACE}/halwebsite onto /wbi/haldata/webqa2/halwebsite at the end of the job.

Install new version of Eclipse

Still a work in progress but here are the results so far:

The Maven project with our base JBoss install has lots-o-errors, and seems to run slowly.  I’ve installed the newest version of Eclipse.  It still shows many JSP errors but some of them are worth fixing and it seems like it cannot find tag library through our proxy perhaps.  It also seems to run a bit snappier and it does not have that JSF problem that occurs when viewing JSP pages.

Still probably will need to install a few more times, here’s what’s been tried so far.

Eclipse Version
eclipse-jee-indigo-SR2-linux-gtk-x86_64.tar.gz

For Maven Integration with Eclipse
http://download.eclipse.org/technology/m2e/releases/

Subclipse
http://subclipse.tigris.org/update_1.6.x (works)
http://subclipse.tigris.org/update_1.8.x (failed)

From: Fillman, Eric (HAL)
Sent: Sunday, June 16, 2013 9:27 PM
To: Klein, Brian (HAL)
Cc: Ruckman, Maurice (HAL)
Subject: I think I got Eclipse working on the Linux VM

Can you try this on your machine and see if it fixes the problem?

On your Linux VM, go in to where your main eclipse directory is located.

On my VM, it’s in /home/jboss1/programs/eclipse.

Within this directory, there should be a file called eclipse.ini.  It contains a bunch of arguments and parameters that get passed to Eclipse when it starts.

Make a copy of eclipse.ini, and call it eclipse.ini.bak or something like that.

Open eclipse.ini in text editor, and add the following to the bottom of the list of arguments.

-Dorg.eclipse.swt.browser.XULRunnerPath=/home/jboss1/programs/jbdevstudio/studio/plugins/org.mozilla.xulrunner.gtk.linux.x86_64_1.9.1.2a/xulrunner

-Dorg.eclipse.swt.browser.UseWebKitGTK=false

What this does is tells Eclipse to use XULRunner that is part of the JBoss Dev Studio rather than the XULRunner that was patched on Wednesday.  Eclipse needs to run with XULRunner 1.9.2 or earlier.  The patch on Wednesday upgraded the version used by Firefox to version 17 or something like that, and that’s what Eclipse is trying to use.  It don’t work.

JBoss Dev Studio works because it’s using that 1.9.1.2a version of XULRunner.

Save the changes to eclipse.ini, and try to start Eclipse.

Let me know how it goes.

Thanks.

Eric

 

Subversion Maintenance – Adding Users

1. SSH to the subversion server
Putty to halsvn01.hq.halw.com

sudo to root:
The Unix team added sudoers file for mlr, ezf, and sst to be able to do the following, additional users would needed added by Unix team:

sudo /usr/bin/htpasswd -m /etc/httpd/conf/.htaccess
sudo /bin/vi /etc/httpd/conf/svn_acl
sudo /usr/bin/vim /etc/httpd/conf/svn_acl

originally Guillaume used:
sudo su -

2. Edit the configuration files

The following will allow you to enter the user's password:

cd /etc/httpd/conf
ls -la
htpasswd -m /etc/httpd/conf/.htaccess user-account

The following will allow defines access control in subversion:
vim svn_acl

vim command
[Esc] [:] [q] to quit without saving
[Esc] [:] "wq" to write (save) and quit

[i] - Insert

You will change users in groups which propagate down through the rest of the script, here's the start of the script:

[groups]

## For HAL
#developers
dev = aja, szb, ezf, sst, mlr, sxp, kxs, wgh, mad, mwm, c-rgong, c-rsmith, jeff, c-rradhakrishnan, jay, guillaume, c-mhartman, c-fcastro, c-dgreca, @rm, @rev, @qa

Searching for files

Use the attached Perl script in conjunction with the following example bash command:

for i in `perl findfiles.pl /home/jboss1/workspace_maven/hal-parent/hal-web/ .jsp`; do grep -il 'look for something'  $i; done

findfiles.pl (txt)

Cloning a VM Fixes

We had two configuration files that required changes after Brian received a cloned VM.  The haldevjbs04 (source) was changed to haldevjbs06 (target) and all was good again.

/etc/httpd/conf/httpd.conf
/etc/httpd/conf/workers.properties

Subversion folder needs deleted:
/home/jboss1/.subversion

Also, browser settings are copied too.

You should no longer have either of the following cron jobs running:

rm /etc/cron.hourly/jboss-config
rm /etc/cron.hourly/svn-update