How to setup Hudson to do remote deployment of WAR to Tomcat? - hudson

I have bit of experience in running a simple build upon every SVN commit (it is a piece of cake)
Regarding deployment of the war to a remote production server via
Hudson, there seem to be some alternatives:
use the 'deploy' target in the app's build.xml
use the deploy-plugin of Hudson
which I fail to get working :(
What is the simplest way to do a remote deployment to Tomcat?
Are there any examples available?
And what about release management? How do we tag our releases in
your SCM?
I use Maven for builds.

Since I am working with WAS I use the WAS Builder Plugin for deployment. However, I could also just fire up a batch/shell script for deployment. My current approach is to use slaves that run on the target machine where I want to deploy and assign my deployment jobs to them.
For tagging you can use whatever you prefer. The are 3 basic options:
Let maven do it
run a command line command
use a Hudson plugin
We use subversion, so the Subversion Tagging Plugin would be a natural match. However, we don't use Hudson for tagging right now. However, there are several plugins out there for different SCMs. I usually prefer a plugin over a command line, one reason is that company policy forbids to store passwords unencrypted and it is usually fairly easy to configure.

Our strategy has been to combine the promoted builds plugin and the deploy plugin in hudson. Then, when something is "promoted," send an email and do the deployment. The deployment plugin is cargo based and works with a variety of web and app servers.
Maybe post a little info about why the deploy plugin isn't working for you?

Related

PhpStorm Remote Development

I am interested in evaluating PhpStorm. I am currently a VSCode user but want tighter integration with my PHP development.
The only feature I see that might be a show stopper is not having a Remote Development feature. A lot of the codebases I work on do not reside on my local machine.
Does PhpStorm currently have this option? Specifically, this has proven to be very beneficial in my day to day operations: https://code.visualstudio.com/docs/remote/ssh
Does PhpStorm have remote development built into it?
PhpStorm doesn't have this Remote Development (with SSH) feature currently.
Though you could use it to edit remote files directly with SSH: https://www.jetbrains.com/help/phpstorm/editing-individual-files-on-remote-hosts.html but debugging, refactorings, and some other IDE features are not supported for such files.
We do consider supporting the workflow for full remote development support, when you're having sources in one place, building them in another and opening an editor in the third one, but we do not have particular plans to share or ETAs for it, sorry.
Please watch this feature request here for update notifications: IDEA-226455.

Does ClojureScript project need a process manager?

I want to start a project that using Node.js+Express.js+ClojureScript in light of https://gist.github.com/jneira/1171737 . But I am afraid that if I deploy the project to production environment, it should be protected by a process manager, like pm2 in a Node.js project.
As far as I know, pm2 is needed by a Node.js project because that Javascript in Node.js is single-threaded, so exception will cause Node.js apps to halt. pm2 will protect the app and make it running forever.
But does a ClojureScript project running in Node.js need a process manager? If so, how should I do the work like pm2?
Thanks!
As ClojureScript compiles to javascript there is no difference in the tooling you can use to manage the node.js process. You can just follow the normal pm2 instructions if you want to use pm2. If you are running a web server I'd suggest you also check out passenger.
And on the actual need to use a process manager, and which manager to use in that case: Those are depending a lot on personal taste / opinion.

Using berks for local development only?

I don't want to use berks in production because I don't like the idea of nodes going out to the web to pull cookbooks (I only want them to pull them from the Chef server in the normal way). But I like using Berks for local development because it resolves the dependencies for kitchen for me.
I was thinking about just adding berksfile and berksfile.lock to gitignore, but I figured I'd ask if it is possible to accomplish this with berks without removing it from production.
"nodes" will never go to the internet looking for cookbooks, they'll always be sourced from the chef server, so.... The question back is: how do you propose to deliver cookbooks to the chef server used to manage your production nodes?
What most people appear to do is commit the Berkshelf lock file and just run a "berks apply" against the target chef server. That will most likely fit your needs.
Personally, I like better separation between development and my production/non-production systems. I create a release tarball containing all the cookbooks that I've tested in development, using the "vendor" command in Berkshelf, and store this binary in a revision control system like Nexus. I suspect many would consider this over-kill, but it enables me to deliver an off-line (no internet connection required) and traceable delivery of my configuration.

How to test openshift action_hooks prior to git push to Openshift server

I have been looking at Openshift docs and on Stack Overflow for a while now and I can't seem to get any answers.
I want to know what the standard pattern is for developing applications for deployment on Openshift? I am especially concerned with testing of action_hooks prior to deployment. I found this particularly troublesome when I was using a DIY cartridge recently where I had to deal with downloading dependencies in my build script prior to starting my application. As my application kept failing to start every time I made a change and pushed it (I only did this as an initial test of the Openshift service, I would never develop like this). I ended up having to ssh onto my instance and resolve the issue by trial and error (not really ideal).
I appreciate any help anyone can offer.
Thanks
The only way that I am aware of to test action hooks on OpenShift is to ssh into an application and run them manually from the command line. This way you can quickly debug & update them. Then copy them to your git repository and do a git push to deploy the new code.
The only other way I can think of would be to run OpenShift Origin (v2) locally and use that to test with.

Package Java web app along with jboss, mysql and activemq for deployment

I have a springframework web application that uses JBoss, MySQL and ActiveMQ.
At the moment, I have to install and configure JBoss, MySQL and ActiveMQ and JBoss manually.
What is the best way to package the application so a user can maybe do a one click install (on Linux platform, maybe Windows too?)
The "proper" way to do it is to pull down the source or src.rpms (or the equivalent of src.rpms depending on your distro) and repackage them correctly. If you have never messed with packaging linux application then this will probably take you a long time and will yield mediocre results unless you are willing to invest a lot of time.
An easier method is to write a shell script. Copy every shell command you type into a .sh file and run that file as a privileged user. If you edit files manually (with vim, emacs or gedit) instead edit the files with perl, sed, and awk, or just crush the files by curl'ing the modified version from a local webserver or copied from scp.
You can include the commands to install the packages as well as configure them in the script if you like.
As far as ActiveMQ is in question, you can always embed it in your application. Take a look at http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html for more info