Friday Mar 23, 2007

Leaving Sun! :(

It was so great working at Sun. I worked on so many areas and learnt so many things

  • Starting from JDBC driver development
  • Transactions, design and performance
  • Admin infrastructure - Synchronization, Load Balancer administration, Web Services Management, Monitoring etc.
  • Update Center backend and APIs to name a few.

I am sad to leave Sun, but change can be a good thing.

My email address is  moc.liamg@mahtanawsiv.hsitas (spelt backwards to avoid spam). Wish me luck!

Monday Oct 30, 2006

Change a GlassFish domain to be cluster aware domain

GlassFish V2 supports Clustering including Load balancing, scalability and Failover. If you built GlassFish V2 and setup the domain using configur-runtime maven goal, it creates a PE style domain. Even if you run configure-cluster goal after that newer domains are always going to be PE style domains. Work around for this is to remove ${glassfish.home}/bin directory and re-do maven configure-cluster. This will make sure you have the correct cluster aware EE (Enterprise Edition) domains.

Thursday Oct 19, 2006

Feature rich NetBeans Update Center

I tried NetBeans Update Center a while back, however I did not blog about its features till now. The Update Center project for GlassFish will borrow code from NetBeans Update Center and add Desktop integration of Update Center, so that new modules and updates can be notified to the user.
The first screen of NetBeans Update Center Wizard looks like the following:

NetBeans shows all the Update Centers (for example NetBeans Update Center, Third Party Update Center etc), so that the users can pick only the Update Centers of their choice. If user already has an update (NBM file), user can install this update/module at this point. User can set proxy server information by clicking on "Proxy Configuration" button. I liked the fact that the default is to use the system proxy settings.

I click on "Next" button to select the modules and updates for the Update Centers. All the updates and new modules show with different icons. NetBeans does not all the existing modules here. I guess NetBeans has a ModuleManager to look at the current modules and their installed versions. User can also uninstall from the ModuleManager menu. It would be nice if NetBeans provides a link to ModuleManager from Update Center. I can click on the update to see the available version and the installed version. I can choose these using "Add", "Add All" button to be installed.

I selected CVS client and CVS Version System. NetBeans quickly downloads these components.

At any points these download process can be stopped. However it can not be resumed. It would be nice enhancement for large updates/modules in the order of few Mega bytes or more. If the internet connection is dropped, user does not have to start from the beginning. GlassFish Update Center is planning to use Sun Download Manager so that we provide this functionality. NetBeans NBM modules come with the certificate of the module developer. User can check the certificate for validity and trustworthiness of the module/update and make a decision to get this or not. A screenshot of the certification verification looks like the following:

To summarize I liked all the NetBeans Update Center features. Smart download, Desktop Integration (notify in case of updates or new modules) will further enhance user experience. Better integration between Module Manager and Update Center would also be a major plus. It would be nice, if user could also rollback an update easily.

Wednesday Oct 18, 2006

Do you like Automatic Updates feature in Windows?

I looked at Windows Automatic Updates feature to see how we can come up a nice design for Update Center in GlassFish. Like other products (Apple's and Google's Updaters) windows also shows the latest available updates with all the details. A sample updates windows looks like the following:

Microsoft identifies each update with an ID like KB918899 etc along with giving a long description about the update and the link to get more information. I am assuming the ID KB918899 is the knowledgebase article number rather than update ID. Lot of updates have variable sizes. For example KB918899 is mentioned as 1.5 MB - 4.4 MB. I rather want to see the exact size/maximum size of the update or atleast more explanation. I rather also want to see the updates be classified into categories - like Security Updates, Funcationality Updates (bugs) etc. I clicked on the "Change automatic updates settings" to look at the preferences menu. A sample preferences looks like the following:

I liked preferences menu better than Google's Updater for the following reason. Rather than showing 3 preferences ( Auto Download and Install, Notify and OFF) Microsoft has 4 preferences (Auto Down and Install, Auto Download and Notify, Just Notify and OFF). Google gives an option to user, so he can either allow or disallow collection of statistics. Microsoft does not give this option to user. It collects these statistics anyway. However Microsoft clearly states what kind of statistics it is collecting and why? I never saw such details from Google. Here is Microsoft's statistics collection policy:

Microsoft does not attempt show the installed software updates in the Automatic Updates menu. In GlassFish we also want to give similar 4 option preference menu to the users. If any comments or ideas on this subject please email to dev@updatecenter.dev.java.net. Thanks for reading.

Friday Oct 06, 2006

Learning from Software Update feature on Mac

Some of GlassFish engineers including me working on providing the auto update (update center) feature on GlassFish. That way users can get blue prints, frameworks, sample applications, additional modules or add on products as they are available on GlassFish, rather than downloading new builds and installing the whole new build. So I thought I would look at he Software Update feature on Mac. I started from "System Preferences" icon/menu. If you are not very familiar with Mac, "System Preferences" is equivalent to "Control Panel" in windows. System Preferences has 4 categories - Personal, Hardware, Internet & Network and System. "Software Update" is available in the System section. Once I clicked on "Software Update", the screen looks like the following:



This main screen shows the time when last software update was successfully. You can also select how often to check for updates. The default seems to be weekly. I clicked on the installed updates. It shows the following screen:



It shows the installed components, the date & time of the install and versions. Nice thing is it allows open this information a log file. This feature will be useful, if you want to share what types of updates are installed on your computer. I go back to Update Software tab, click on "Check Now" button. After a brief delay of showing the following screen



It comes back the list of the updates. It auto selects the recommended updates. For example in the following screen 4 out of 6 are selected. This screen also provides a brief description about the update. For example you can also look other 2 updates (which are currently unselected) and decide if you want to install them too. Airpot feature seems to fix connectivity and security issues. I chose this update, as I use wireless feature often and want to update to date with security features.



Another thing I liked about the Apple's Software Update feature is that it lets you download the updates in the background, can notify when the downloading of these updates is done. This way user does not have to wait for the download of the updates. I also the fact that restart required status shown, so I have a choice to select only "no restart required" updates when I do not want to restart the computer. We have looked at Google pack and its updater too. We will be looking at Ubuntu update features in preparation for desing of Update Center feature in GlassFish. If you are interested, please provide feedback and paticipate.

Thursday Sep 28, 2006

Could not create domain? What/Who is the culprit?

If you are removing the glassfish sources to refresh your build to get the latest sources. Re-checkout of the sources and building the sources should go through fine. Nut you may run into the following issue during configure-runtime stage

configure-runtime:
[copy] Copying 1 file to /export/satish/install/tip-gf
[mkdir] Created dir: /export/satish/install/tip-gf/bin
[echo] Current Java Version 1.5.0_06
[copy] Copying 1 file to /export/satish/install/tip-gf/config
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[copy] Copying 1 file to /export/satish/install/tip-gf/bin
[exec] Domain domain1 already exists in /export/satish/install/tip-gf/domains. Use a different domain name or the --domaindir option.
[exec] CLI130 Could not create domain, domain1

BUILD FAILED
File...... /export/satish/src/gf/glassfish/bootstrap/maven.xml
Element... ant:ant
Line...... 385
Column.... 76
exec returned: 1
Total time: 49 minutes 36 seconds
Finished at: Thu Sep 28 16:10:53 PDT 2006


If you guessed the reason, then you are smart :) and you can skip the rest of this blog. This is caused by an existing glassfish instance still running and is using the domains/domain1/autodeploy directory. GlassFish running instance crates .autodeploystatus file in the domain directory. Even though you removed this directory. The un-stopped running instance creates this file, if it is removed.

So stop the running instance and remove the domains directory. Then you are all set to a new version of GlassFish and ready to try out the newer builds.

Thursday Sep 21, 2006

Updating and Monitoring LB plug-in with Web Server 7.0

My previous blog talks about setting up a SSL connection between DAS and load balancer (Web Server 6.0), configuration changes can be pushed from DAS (Domain Administration Server) to Load Balancer automatically. This avoids manual copying of loadbalancer.xml. The monitoring data about load balancer can also be obtained, once SSL is setup. The following instructions talk about setting up Load Balancer in SSL Mode in Web Server 7.0.

Instructions to install load balancer (Web Server 7.0) and enable the 9.0 features:

Please install Web Server 7 Preview 2. Please make sure you do not use the default directory on windows (Program Files/Sun/WebServer7). Please choose a directory which does not contain any spaces. Otherwise create-selfsigned-cert command fails. This bug is fixed in the upcoming Web Server 7 Preview 3 release. Once the web server is installed in a non default directory, start the admin server as follows:

C:\\Sun\\WebServer7\\admin-server>bin\\startserv.bat
The Sun Java System Web Server 7.0 Administration Server service is starting....
The Sun Java System Web Server 7.0 Administration Server service was started successfully.

Get the config name of the server instance by using the wadm command.

C:\\Sun\\WebServer7>bin\\wadm.bat --user admin
Please enter admin-user-password>
Sun Java System Web Server 7.0-Technology-Preview-2 B06/19/2006 16:59
wadm> list-configs
CHAND-NT

I will be working with the CHAND-NT configuration. Most commands need the --config parameter, so instead of typing that over and over, I'll set it once:

wadm>set wadm_config CHAND-NT

Then create a self signed certificate as follows

wadm> create-selfsigned-cert --server-name=CHAND-NT --nickname=ServerCert --token=internal

With the certificate installed, I now need a listener on some port which will have SSL enabled. I'll need a default virtual server associated with a listener, so first I want to check what virtual servers are configured so far:

wadm>list-virtual-servers
CHAND-NT

Ok there is only one (the default) virtual server here, so I'll go with that one:

wadm>create-http-listener --server-name=CHAND-NT --default-virtual-server-name=CHAND-NT --listener-port=8090 http-listener-ssl

Finally I need to set a few things on my new SSL listener: at the very least it needs to be enabled and it needs to be associated with the nickname of the cert it's going to use:

wadm>set-ssl-prop --http-listener=http-listener-ssl enabled=true
wadm>set-ssl-prop --http-listener=http-listener-ssl server-cert-nickname=MyServerCert

After all the configuration is done, I just need to deploy this new configuration and start my server:

wadm>deploy-config host.red.iplanet.com
wadm>start-instance

I can now go and check https://CHAND-NT:8090 from a browser to verify the setup is working.

Please export DAS certificate by executing the command

<as home>/lib/upgrade/pk12util -d <domain root>/config -o sjsas.p12 -W <file password> -K <master password> -n s1as

Please import the das certificate into webserver instance.

pk12util -i sjsas.p12 -d C:\\Sun\\WebServer7\\admin-server\\config-store\\JHAUK\\config


If obj.conf does not contain the following lines, please inser the following lines to the end of obj.conf

<Object ppath="\*lbconfigupdate\*">
PathCheck fn="get-client-cert" dorequest="1" require="1"
<Object>
<Object ppath="\*lbgetmonitordata\*">
PathCheck fn="get-client-cert" dorequest="1" require="1"
</Object>

You can verify the above setup from DAS. From the appserver admin gui, create a cluster, load balancer. Instead of using local CA, you can use any other CA and server certificate. In that case you skip step 5 and 6, but need to import server certificate you obtained from other CAs.
From CLI, the following creates the load balancer and sets it up, so that DAS posts the configuration changes automatically to that load balancer.

asadmin create-http-lb-config --target cluster1 sample_lb_config

asadmin create-http-lb --config sample_lb_config --autoapplyenabled=true --devicehost device_host_or_ip --deviceport device_port sample_lb

Give the webserver host and https listener port for device host and port. Click on test connection to test the connection. By default load balancer created from GUI uses SSL connection to connect to load balancer device.

About

sv96363

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today