Deployment Automation

I have a Lift application that is packaged as a WAR archive and needs to be deployed to Jetty. However, I want to be able to perform several tasks automatically:

  • Specify the target server (or server collection). I have several servers, from development to testing and production servers, and I would like to be able to control the deployment destination with great ease.
  • A destination (e.g., DEVELOPMENT) may mean a set of servers for load balancing purposes.
  • Testing phase. Basically, with every deployment, I would like to run the entire test suite and prevent the deployment if the application does not compile or if one or more tests fail.
  • The WAR archive must be deployed under Jetty, again on one or more Amazon EC2 Linux machines. (Ubuntu 12.10)

I use SBT and I have no idea how well it will play with Puppet or something like that. How would you do that?

+6
source share
4 answers

I watched this question, hoping that someone would come up with a smart answer. Since they did not, I think that I will sort out my feelings about this.

To my knowledge, there is no existing tool to automate these types of deployments, and I assume that since there are so many different scenarios. At a minimum, you have:

  • One dev server, where it simply copies the WAR into place and restarts the application server.
  • One production server where the process is similar, but you do not want the process to disrupt your users. Considerations here include storing session data for a restart and planning for a limited time restart for a while.
  • A small cluster in which you have load balancing on many nodes. Now things are really getting complicated. You can use various LB tools (HA Proxy, NGINX, Amazon Elastic LB), and if you care about your user experiences, you need to coordinate a rolling restart of application servers. Also causes the migration of any session data between nodes.
  • You have a large cluster consisting of small clusters in different geographic regions. Here you are dealing with C # 3 +, which configuration should be done for coordination between regions.

I believe that 1 and 2 would be easiest to find a common tool, and if these were the only situations I had to deal with, I would probably just decompose Jenkins along with the application. It can be easily configured using the git branch, when changes occur, build code and restart Jetty. By the time you get to 3 and 4, I think that the number of different tools involved and the need to coordinate them exclude any standard solution. I don’t think this is just a problem in the Java / Scala world, as I have seen reviews from the Github people on the custom tools that they created to control the deployment of their Rails application .

As for Puppet, with a caution I have never used, it seems that this may be a useful tool for this type of process. You will need some kind of central coordinator to work with the cluster, and I believe that Puppet can help with this.

+5
source

You can use our BuildMaster product to complete all of these steps. I noticed that you mentioned Puppet, which is important to note that this tool is intended to automate the infrastructure, and not to deploy and deliver software.

Working in the DevOps space, we found that it is important to support software and infrastructure deployment orthogonally and synchronize as part of a collaboration (developers do not work with people and vice versa).

To address your markers:

Multiple Server Deployment

When creating an automatic deployment plan, you can specify a server group and add / remove servers from the group as needed.

Testing phase

You can set up a workflow with any number of test environments before production, and these workflows can include automatic checks (i.e., promotion requirements) to pass the tests before allowing the build to be upgraded to the next environment. Built-in - to ensure that Unit tests pass, but you can specify them for any command line tool or even write your own extension.

jetty deployment

Copying a WAR file is as simple as deploying an artifact to the server using the SSH agent.

+1
source

also looked at this question.

And in fact, with the same feeling: you cannot consider all possible environments, and the structure just allows you to choose what you want. So, grab any convenient deployment tool and just use it.

(And, of course, SBT allows you to test, prevent packaging, and there are many deployment tools that have WAR-s and Jettyies knowledge.)

0
source

This is a typical DevOps script. I think Jenkins will help solve the first two requirements by adding a couple of open source plugins to gain more control over jobs such as CloudBees Build Flow and Node and Label Parameter.

Puppet or Chef will certainly help you configure a group of systems with pre-configured software. They are almost equivalent, but the chef supports fewer OS platforms.

I suggest you turn to OpenStack Continuous Integration, especially regarding project automation and infrastructure automation: http://ci.openstack.org/

For deployment, there is urbancode uDeploy, which allows you to design an automatic deployment process on a user-friendly graphical interface, but now it is commercial (acquired by IBM). In fact, Jenkins can do the same, but he needs more coding and scripting.

0
source