Answer the question
In order to leave comments, you need to log in
Automated release installation on Prod?
There is a start-up web project working in closed alpha testing mode on a production server (FreeBSD).
Releases come with a period of about a week.
What is the best tool to automate release installation?
It includes:
- Stopping Tomcat
- Getting sources from GitHub
- Building a *.war file for installation
- Database backup
- Rolling migrations to the database
- Deleting the application archive on the server
- Copying *.war applications to /webapps
- Cleaning up Tomcat temporary directories
- Start tomcat
Answer the question
In order to leave comments, you need to log in
Ours looks like this.
1. Collected everything with maven
2. Put it in nexus (there are different versions of artifacts, respectively)
3. Deploy script does the following
- pumps war to prod
- nails tomcat
- unpacks
- starts
Rollback also - just the previous version is transferred to the script. The logs in you are all in the application, as well as maven ones.
Database update - performed through the maven flyway plugin or, if it's simpler - sql plugin and the sql file is fed.
We considered other "super" tools, such as capistrano, puppet and finally. But it all comes down to the fact that everything they do can be transferred to maven, and the minimum functionality that is impossible (this is stopping the tomcat and pumping out the artifact) and the shell script works fine.
The shell script can be run from any TeamCity, Bamboo or Hudson'ov within multi-stage plans.
The problem that I still can’t solve is managing changes to Tomcata and Apache configs: how to change them conveniently so that they are tracked in svn, they are partially tested on one server, and upon release, roll them out to all servers.
Maven (or Ant, depending on personal preferences) does an excellent job of building the project, the rest is a matter of deployment scripts, you can write them on anything (bash, python, you can even Ant). I heard something about such a deployment tool as Chef, but I can’t say anything about it, I haven’t used it.
If you are interested in depot to a remote server via ssh, then capistrano. It is intended for Ruby-on-Rails projects, but php projects also use it. I think there will be no problems with java.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question