2016-09-30

James Strachan - A busy Java developers guide to developing microservices on Kubernetes and docker

James Strachan blogged a few days ago about all the great work that has happened recently at the fabric8 project in terms of improving the developer experience with "kicking the tires" as I say it.

As a Java developer he shows how you can get started with a Kubernetes cluster with a single Maven command, that downloads and install the binaries. While its doing that you can go fetch a cup of coffee and relax.

And don't worry the installation is local and installing in your home directory under .fabric8. So at the end of the day, you can just delete it all, and its gone - no uninstall procedure or something like that.

It has never been that easy to just from Maven run

    mvn fabric8:run

And it will build, deploy your application in the cluster, and then tailing the log. And when you are done, just press ctrl + c to break and the app is un deployed.

Oh bugger there is a bug in the code somewhere. How do I debug this, when the application runs in the cluster and my Java IDE is running on my computer/laptop? Well behold just run:

    mvn fabric8:debug

And you can attach a remote debugger from your Java IDE.



Okay I don't want to steal more of James thunder. Now head over and read his blog piece and make sure also to watch the video at the end. Christian Posta demonstrates all this.


PS: Next week we are traveling and presenting in USA. So if you have the opportunity to attend then James Strachan, Christian Posta, Rob Davies, James Rawling and myself will be there to give talks and demos about this stuff and other cool things as well.

PPS: The next thing we are working on is a fabric8:watch so you can do live code changes in your running containers without a full redeploy. There is still a few things to iron out to make it work well, but we are getting very close.

No comments: