Friday, December 17, 2010
Automated License Checks
讓企業軟體更具魅力的五大法則
來源 : ZDNet
雖然企業軟體在現代生活中扮演相當重要的角色,但大部分都是無趣的。因為這些專案通常是大型且容易失敗,無法輕易破解螢幕畫面以及在毫無意義的軟體更新中,供應商已經失去創新的意願。為了讓美好的感覺再回到企業,以下是讓企業軟體更具吸引力的五大法則:
1. 具功能性且適用於工作: 在基層工作方面,軟體的基本功能就是讓使用者可以順利完成任務,如果連這點都做不到,那麼軟體就失去存在的意義。
2. 涵蓋商業流程領域: 企業軟體應可以自動處理特定商業流程,像是CRM、會計等等。好的企業軟體必須能提供全方位且自動化的流程處理。
3. 絕佳的使用者介面: 最好的軟體就是讓用戶可以很快了解並上手,並且容易導入。如果無法達到此要求,那麼這個軟體就沒有吸引力了。
4. 感覺良好的魔力: 千萬不要輕忽感覺的影響力,這是另一項評量使用者是否滿意的指標。通常失敗的案子,在感覺良好的得分都是0。
5. 激烈的競爭: 創新是需要競爭及要求來激發的。如果沒有競爭的壓力,根本無法設計出具吸引力的企業軟體。
Tuesday, November 9, 2010
Hudson 一定要裝的 10 個 plugin
The Violations plugin
The Violations plugin is a one-stop-shop for code quality metrics. It supports the principal Java code quality tools: checksytle, pmd, cpd, findbugs, and simian, plus a few others.
Use this plugin to keep track of how your code quality metrics are doing over time, or to review various code quality metrics for a particular build. You can even force a build to fail if there are too many violations. If you do this, just be careful not to interrupt the developer flow too much. For example, you might set up a special QA build (run every night or every hour, for example), that will fail if the QA metrics aren't up to scratch.
The only catch is that you have to integrate the code quality metrics (checkstyle, PMD, Findbugs, or whatever) into your builds. If you are creating new build scripts, you should of course be doing this anyway, but it can be more of a challenge for large legacy code bases.
The Clover plugin
Clover is a kick-ass code coverage tool if there ever was one, and the Hudson Clover plugin is an excellent complement to the tool. The Clover plugin is unique: it lets you add code coverage to (most) existing Ant builds without having to change the build file. This is great for legacy projects. It also lets you generate aggregate coverage statistics on multi-module Maven projects.
If you don't have Clover, all is not lost - the Coberturaand Emma plugins do a great job too, though you do have to set up the code quality metrics in your project yourself first.
The Parameterized Trigger pluginThe Parameterized Trigger plugin lets you add parameters to your build jobs that users enter when they kick off a build. This comes in handy for release or deployment automation, for example, where you want to enter the version number or label you want to release or deploy. You can also get your build job pass these parameters on to other parameterized build jobs.
The Sonar pluginThe Sonar plugin makes it trivial to integrate your projects with Sonar. Sonar is a powerful open source code quality metrics reporting tool, which displays code quality metrics for multiple projects in a variety of ways on a web site.
The Sonar Hudson plugin is magic. It lets you integrate your existing Maven projects into Sonar, with no modifications to the projects. It even works for Ant projects, though there is some configuration to do in this case.
The VMware pluginThe VMWare plugin lets you start up a VMWare virtual machine before a build, and shut it down afterwards. This is excellent for functional or web tests on different platforms.
The Amazon EC2 pluginThe Amazon EC2 plugin lets you start up Hudson slaves an EC2 instance on demand, and then shut them down when they are no longer required. Again, this is great for cross-platform tests, but also for load tests, or periods when you need to expand your CI capacity greatly for a short period of time (just before major releases, for example).
The Setenv pluginThe The Setenv plugin lets you set environment variables for a particular build job. These environment variables are available to any sort of build job, be it Freestyle, Maven, Shell, or whatever. Many build scripts use environment variables for a variety of purposes, and this plugin makes it much easier to integrate these projects into Hudson.
Sectioned View pluginThe Sectioned View Plugin lets you break your job views into sections, such as 'Test Results' and 'Job Graphs'.
The Radiator View plugin
The Radiator View Plugin lets you display the build status for your projects in a format that is easy to see from a distance. Set this up on a large LCD screen visible to all.
The Hudson Helper iPhone app
And finally, the Hudson Helper iPhone app. This is a neat little iPhone app that lets you monitor your builds via your iPhone. Don't leave home without it!
Sunday, October 31, 2010
如何取得經過 Apache 2 Proxy 處理過的 real IP
若要安裝此 Apache Proxy , 可以用下列指令先安裝
sudo apt-get install apache2
sudo a2enmod proxy
sudo a2enmod proxy_http
然後再指定 module 的內容如下
ProxyPass /hudson http://localhost:8081/hudson但此時內部 server 透過 api 拿到的 ip 都會是此 proxy server 的 IP 。若要拿到 real IP 則需要透過 http header 拿,這些 header 如下
ProxyPassReverse /hudson http://localhost:8081/hudson
ProxyRequests Off
# Local reverse proxy authorization override
# Most unix distribution deny proxy by default (ie /etc/apache2/mods-enabled/proxy.conf in Ubuntu)
Order deny,allow
Allow from all
X-Forwarded-For
The IP address of the client.
X-Forwarded-Host
The original host requested by the client in the Host HTTP request header.
X-Forwarded-Server
The hostname of the proxy server.
不過這個要 server 端的 code 必須偵測並加上這些 API 才能取得
Saturday, October 30, 2010
Disable X-server in Ubuntu 10.10
1. 更改 /etc/default/grub 將 GRUB_CMDLINE_LINUX="" 改成 GRUB_CMDLINE_LINUX="text"
2. sudo update-grub
3. sudo reboot
這樣就可以讓 Ubuntu Server 進入 command line, 需要的時候再用 startx 進入 desktop
Install Sun JDK into Ubuntu 10.10
若要安裝 Sun 的 JDK,則要有另外的步驟安裝
1. 先增加 partner 的 repository
sudo apt-get install python-software-properties
sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"
2. 安裝 jdk
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
若要將預設的 jdk 換成 sun 的,就用
sudo update-java-alternatives -s java-6-sun
Tuesday, October 5, 2010
Java Build Server
http://www.zenbi.nl/en/blog_how_to_build_a_java_buildserver.php
這份 article 在講解如何去建立一個 build server ,讓程式開發可以自動化做 build 與 Test ,減少人工的浪費。
目前 build tool 中比較 popular 的有 luntbuild, hudson, apache continuum ,此 article 建議用 luntbuild ,個人用過 luntbuild ,比較起來 luntbuild 太基本,必須用 professional 才能滿足比較大的需求。hudson 最近研究過,發現此 build tool 可以支援 plugin 功能,大大的增加其運用彈性,在此建議此 build tool 。continuum 也是比較基本的 build tool
build tool 已經漸漸的變成軟體開發的一環,須要建立起來才能有效控管軟體的 productivity and Quality