Posts

Showing posts from November, 2013

Create a runnable war with embedded tomcat or run a maven tomcat war project without maven and a tomcat installation

I know the title of this post is a bit of a contradiction, running a maven tomcat webapp without maven and a tomcat installation WTF?.So before we begin let me clarify what I mean. You will need maven on your development environment and you will be using the tomcat7 maven plugin to deploy and run your application-. When delivering a small to medium sized java web application it could be nice to have it as a self contained application allowing you to just drop-it anywhere and just run it without having to install/upgrade Maven, Apache Tomcat, etc. (of course you'll still need java :p )What I would like to accomplish is to develop a web application using my usual tools and stack and then deliver the application in it's most simple way, without having to install and configure tomcat and maven on the target system.Running a WAR project without a Tomcat installation is not very complicated you just use the maven tomcat plugin and run the appropriate goal (ex: tomcat7:run). But runn…

Multi-hop ssh tunnel - howto : Creating a SSH tunnel with port forwarding between multiple hosts

Image
How to create a multi-hop ssh tunnel or how to chain multiple ssh tunnels. (or SSH inception)For security reasons sometimes you need to jump through hoops in order to connect to a server in SSH and from that server SSH to another server and so on Consider the following scenario : An application is deployed on a tomcat server on the host3 and listens on the port 8080From my local machine I need to access the tomcat server on the machine host3 but it's not reachable from my machine I need to carry out some tests that need a graphical browser (Firefox, Chrome, etc.) host3 is only accessible from host2which is only accessible from host1SSH tunneling can help you in this scenario; you can find more information regarding here by forwarding requests on a given port to another port on another machine all through a (or in our case multiple)SSH connection(s) Below is a graphical representation of what I'm trying to accomplish : So without anymore delay let's get to it : All of th…

Devops mode - first steps using puppet to automate environment configuration and installation

So it has been some time since I was at the DevoxxFR 2 years ago and had the chance to assist a few presentations regarding this "obscure movement" called DevOps and even tough I'm always interested in new stuff to play around with, coming out of the conference my feeling was "meh, I'll try it out sometime later"... and I never did... But recently I got a task assigned : "install and configure a development and integration server" The requirements were the following : Java JDK7Apache MAVENApache ANTGITSubversion (SVN)Jenkins with the following plugins :Git plugin Apache MAVEN pluginApache ANT plugin Jenkins should run on a custom port namely port 9999Now I've done this several times and there's nothing really complicated about it. But usually when I do something more than a few times I try to find a way to automate things (apparently we developers are lazy by nature) As I'm no sysadmin or Linux expert and installing and configuring the…