2014年8月9日星期六

Red Hat JBoss - HP IT Summit in Taiwan, Openshift and Devops

Last Friday, I had a JBoss talk in HP taiwan IT summit, normally, developers doesn't really go to the forums like this, HP are know for their Hardware and infrastructure solutions, but I was there to break the boundary between developers and infrastructure gentlemen/ladies :)

It was a very short 40 minutes session, and it was the last session of the day, to make sure everyone is still awake and concentrating, I also did a little demo too.

As a developer, I wanted to discuss how Openshift has really boost the DevOps, and make our life much easier from a developer point of view, and also allowing system administrators to be relieved from their boring day to day routine job.

Automation place a big part of the DevOps world, OpenShift let developers create and setup a runtime environment on their own, so no more email or phone calls between 2 parties, developers can spin up an application server in few seconds without bothering his/her colleague. Inside Openshift, there are various cartridges you can choose from, the cartridges are how OpenShift installs Languages & Middleware, so there will be an JBoss Enterprise Application Server, or JBoss Fuse for developers to choose their middleware platform, and there are also cartridges of MongoDB or Postgresql and more, if developer needed a database. The instance developers create can be deploy both on premise or cloud, it is completely transparent to developers. They will not need to worry about anything can can then concentrated on their work. With JBoss developer studio it seamlessly combines with openshift, so developers can quickly update their code through the git to the repository inside their openshift nodes.

To make sure we make the most of DEVOPS, we should seriously consider breaking our code/project into smaller chunks, (Believe me, It is so common in Taiwan that I bumped into a WAR or EAP even a JAR file with 1-200 MB, even seen one with more then 700MB). Modulize it, It will improve the development cycle

1. Shorten the developement cycle with less code to maintain and test
2. Less complex code, so it's easier to maintain.
3. Modules can be reused. Even Test code are easier to create because we have limit what each module can do.
4. And be replace or remove with less impact, because it's less sticky in code.

To modulize it and make it more suitable to run in cloud, it is important that we keep it stateless. Or keep the state in your data. Openshift is also a great xPaaS, meaning it provides a great platfrom that integrates everything together with the help from JBoss Fuse technology. With the combination of JBoss Fuse and Openshift, it allows administrator to dynamically create as many instance as the hardware can handle. Give more flexibility to them.

I hope I crack a little hole in the wall between devlopers and system adminstrator with Openshift. :)
Thanks! And here are the slides on that day.

Red Hat JBoss - HP IT 高峰論壇 , Openshift 與 Devops

上週五亂入HP 的論壇去講JBoss, 怎麼JBoss 的開發者會去HP 這種超級硬邦邦的場子。沒錯JBoss 也可以去平台論壇喔!

今天講的主題是 DEVOPS 因為只有短短的40分鐘其實並沒辦法講得很深入。而且小姐我喜歡玩DEMO 多過於在台上一直念一直念催大家入睡.

因為我是開發者,當然要從IT 開發者的角度去好好的討論一下。到底OpenShift 在DevOps 的世界裡面有什麼功能跟好處呢。

首先在DEVOPS 世界中,有個很重要的Keyword 就是 Automation, 透過Openshfit 可以讓開發的程式人員自己啓動自己想要的環境。 在Openshift 中,有很多的Catridge 可以提供給大家自由選擇,例如說,Java 的開發者可以透過自己本地環境的開發工具,直接建立想要的執行環境。而且這個環境可以同時安裝在公司內部的系統或是外部的雲端上。 現場立馬建立環境,並且部署到Openshift 上。

為了配合成功的DEVOPS, 開發者在寫程式的時候,不能像以前一樣,有事沒事就寫一個1-200MB 的大包程式,開發者應該要朝著分散的程式區塊來寫。所以就可以加快上線的速度,而分散的程式的好處就是,

1. 開發週期變短
2. 需要維護的程式碼較不複雜 (天兵把簡單的事寫複雜則不在此限)
3. 測試模組較好維護
4. 可以隨時置換抽離

可是相對地,分散的區塊與區塊之間,因為拆得開,所以盡量就不要是Stateful 的了。
因為要部署的區塊多了,Openshift 可以讓你可以決定要起幾個環境。然後以一個整體的角度去管理了。對於開發者現在的問題,反倒是,我要如何將這些區塊完整地聯結呢?Openshift 與 JBoss Fuse 結合後,開發者可以透過設定讓模組與膜組之間的聯結更動態。所以在抽患之間又可以更隨意。透過 這兩個結合而成的xPaaS 平台,開發者也可以隨自己喜好建制需要的instance了!

OpenShift 可以消彌開發跟維運單位之間那條界線,讓開發的人可以建立自己的環境,讓維運的人可以整體的來看架構,而非一台一台的維護。寫得好累,用講的果然比較快,要睡了..

當天的Slide 放在這裡,請查收囉~

2014年7月22日星期二

Red Hat JBoss Fuse - Getting Started, Home Loan Demo Part 5

This is the last one of my getting started demo for JBoss FUSE 6.1. For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.

This series of videos are focused on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. In this video I am going deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is we have a system, that takes in XML files from different vendor's home loan application into a folder, and we will need to process the data give house an appraised value and then provide the information back to the vendors. 

First demo was to take in and process the information, and put it into a message broker,  and the second demo,  was about processing the customer data, by reading the xml file and store it into a Postgres Database. The third demo, was slightly complex, by adding value to the house by the number of surrounding schools to the house. we referenced Google App Engine (Google Geocoding API to get the co-ordinate from Address, then use Google Places API to get number of surrounding schools) and then updated the new appraised value into house table in Postgres Database.

And from last demo, we have expose an restful web service endpoint for Vendors to query the new house value and data via customer's Nation ID. 

In this demo, the project is now ready to be deployed into a Testing environment. By using the fabric8 plugin in JBoss Fuse, we are going to start up JBoss Fuse, and create a broker and container in our Fuse management console. Deploy our project onto the OSGi container in JBoss Fuse 6.1. 



In this demo, you will learn, 

Deploy your Camel Project via Fabric8 plugin 
This plugin makes it easy to create or update a fabric profile from your maven project.
When you deploy your project to a fabric profile with this plugin the following takes place:

  • uploads any artifacts into the fabric's maven repository
  • lazily creates the fabric profile or version you specify
  • adds/updates the maven project artifact into the profile configuration
  • adds any additional parent profile, bundles or features to the profile.

Create a new container in JBoss Fuse
The Fabric in JBoss Fuse makes it really easy to provision, automate, configure, and manage from a central location

There is one thing I forgot to mention in the Video,
For Fabric8 plugin to deploy the profile into your JBoss Fuse, need to edit your ~/.m2/settings.xml file to add the fabric server's user and password so that the maven plugin can login to the fabric..

e.g. add this to the <servers> element:

<server>
  <id>fabric8.upload.repo</id>
  <username>admin</username>
  <password>admin</password>
</server> 



Thanks for following this series of getting started. :)


2014年7月21日星期一

Red Hat JBoss Fuse - Getting Started, Home Loan Demo Part 4

This is the 4th part of my getting started demo for JBoss FUSE 6.1. For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.

There will be a series of videos coming after this one, we will focus on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. And in the last video of the series I will deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is we have a system, that takes in XML files from different vendor's home loan application, they will place their customer input into 2 different XML files, one with it's customer data, the other with their housing details. Both files will be place into same folder either by FTP or Batch generated overnight.

First demo was to take in and process the information, first we need to separate the 2 kinds of files, because they are handled differently. And appraised the value of the house before sending it to a messaging broker.

Second demo,  was about processing the customer data, by reading the xml file and store it into a Postgres Database.

Third demo, we were added value to the house by the number of surrounding schools to the house. we referenced Google App Engine (Google Geocoding API to get the co-ordinate from Address, then use Google Places API to get number of surrounding schools) and then updated the new appraised value into   house table in Postgres Database.

In this demo, the vendors are asking for an service, that provides all the data with the updated appraised house value back to them. And they are requesting if the information can be provided through a Restful Web service. It's a piece of cake for JBoss Fuse developer to expose an service via Web Service, we simply setup and configure the endpoints. 

In this demo,  you will learn

CXFRS Endpoint

The cxfrs: component provides integration with Apache CXF for connecting to JAX-RS services hosted in CXF.

SQL Endpoint 
The sql: component allows you to work with databases using JDBC queries.



You can also find the source project in my github.
https://github.com/weimeilin79/homeloan-part3

2014年7月16日星期三

Red Hat JBoss Fuse - Getting Started, Home Loan Demo Part 3

This is the 3rd part of my getting started demo for JBoss FUSE 6.1. For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.

There will be a series of videos coming after this one, we will focus on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. And in the last video of the series I will deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is we have a system, that takes in XML files from different vendor's home loan application, they will place their customer input into 2 different XML files, one with it's customer data, the other with their housing details. Both files will be place into same folder either by FTP or Batch generated overnight.

First demo was to take in and process the information, first we need to separate the 2 kinds of files, because they are handled differently. And appraised the value of the house before sending it to a messaging broker.

Second demo,  was about processing the customer data, by reading the xml file and store it into a Postgres Database.

As for this demo, we are going to do a bit more, with house data, we are going to add value to the house by the surrounding schools of the house. To do that we will need to reference Google App Engine (Google Geocoding API to get the co-ordinate from Address, then use Google Places API to get number of surrounding schools) and then update the new appraised value. Then store it into a table in Postgres Database.


In this demo,  you will learn

Endpoint reading from activemq messaging broker
The ActiveMQ component allows messages to be sent to a JMS Queue or Topic; or messages to be consumed from a JMS Queue or Topic using Apache ActiveMQ.

JAXB transformation
Translate one data format(XML) into another(Pojo) using JAXB

SQL Endpoint 
The sql: component allows you to work with databases using JDBC queries.

RecipientList Endpoint with dynamic Restful URL 
Which allows you to route messages to a number of dynamically specified recipients.

Http4 Endpoint
The http4: component provides HTTP based endpoints for calling external HTTP resources 





I hope you like it. :)

You can also find the source project in my github.
https://github.com/weimeilin79/homeloan-part2

2014年7月15日星期二

Red Hat JBoss - 紅帽舊金山技術大會上的超酷範例,讓你變成JBoss之星!

2014年的紅帽技術大會是在舊金山開的,有很多不同的超酷的課程。每年技術大會大家最期待的就是JBoss 的 Keynote 範例, 讓你可以玩遍所有的JBoss 技術,把目前最酷的技術串聯成一個範例,然後現場發表!今年也不例外,應該已經變成紅帽技術大會的一個傳統了吧。我們把這個Keynote 的範例整理成一個可以重複安裝,使用的版本。讓你可以拿來參考,甚至賣弄我們都沒關係!誰叫我們是open source! 廢話不多說,去下載來玩鱉~ 讓你體驗紅帽美國技術大會上的氣氛!

1. 到網址下載然後解壓縮
2. 請記得讀README 檔案喔!然後在installs 路徑下,放入JBoss 的產品
3. 執行 init.sh.
...
繼續依照指令安裝,然後用你的twitter 帳號,就可以啓動一個流程。 更多的東西請見Salesforce integration.

2014年7月14日星期一

Red Hat JBoss Fuse - Getting Started, Home Loan Demo Part 2

This is the 2nd part of my getting started demo for JBoss FUSE 6.1. For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.

There will be a series of videos coming after this one, we will focus on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. And in the last video of the series I will deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is we have a system, that takes in XML files from different vendor's home loan application, they will place their customer input into 2 different XML files, one with it's customer data, the other with their housing details. Both files will be place into same folder either by FTP or Batch generated overnight.

First demo was to take in and process the information, first we need to separate the 2 kinds of files, because they are handled differently. And appraised the value of the house before sending it to a messaging broker.

And for this demo,  we are going to concentrate on processing the customer data, by reading the xml file and store it into a Postgres Database. There are many components in JBoss Fuse that you can choose to interact with DB. This demo uses the most simple and straight forward sql component, just like a normal sql insert in your java program, but less coding needed, isn't it fun!   
In this demo,  you will learn

Endpoint reading from activemq messaging broker
The ActiveMQ component allows messages to be sent to a JMS Queue or Topic; or messages to be consumed from a JMS Queue or Topic using Apache ActiveMQ.

JAXB transformation
Translate one data format(XML) into another(Pojo) using JAXB

SQL Endpoint 
The sql: component allows you to work with databases using JDBC queries.




You can also find the source project in my github.
https://github.com/weimeilin79/homeloan-part2