Code / web application deployment guidelines?

I would like to hear ideas on how best to translate code from a development server to a production server.

List received, do not make this list will be useful.

Any tools to help automate steps.

  • Back up your existing code considering this list of files

  • Record the deployment of these files from dev to production

  • Allow easier rollback if deployment or application does not work in any way ...

I have never worked for a company that had a deployment process other than the very manual ftp files from developer to production.

What have you done in your companies, departments, etc.

Thanks...

Yes, I am a programmer with cool programs, but files are files, and this should be an agnostic language issue.

+7
source share
4 answers

Ok, I will bite. There is a technological aspect of this problem, which has already been addressed in other answers. But the real problem is the problem of the process . Where the real focus should be to ensure a meaningful software development life cycle (SDLC) —planning, development, verification, and deployment. I will cover each one in turn. What you want is repeatability at every step.

Planning

Compilation and recording of what needs to be delivered. Often enough tickets or user stories are enough. Sometimes you do more, like a written written document that a client signs, which translates into various artifacts, such as written use cases - in the end, what you want, recorded in an electronic system where you can link changes to the code with it. What makes me ...

Development

Remember that electronic system? Good. Now that you make changes to the code (do you directly control the source code?), You associate these changes with something in this electronic system - usually tickets. I like Trac , but also heard well about the Atlassian suite . It gives you tracking . Therefore, you can say what was done and how. Then you can use this system and the original control to create the assembly - all the bits needed for any changed - and the tag that build in the original control - that’s your list of changes, Even better if the assembly contains everything , so this standalone object that can be easily deployed on it. Then the assembly is done to ...

Check

Perhaps the most important step that many stores ignore is at your own risk. Defects discovered in production are exponentially more expensive to repair when they are discovered earlier in the process. And validation is often the only step when this happens in many stores - so make sure yours does it .

This should not be done by the programmer. ! It's like a fox watching a chicken coop. And whoever does, must follow some kind of plan. We use a test link . This means that every assembly is checked in the same way, so you can detect regression errors. And this assembly should be deployed in the same way as in production .

If everything goes well (we usually need at least 3 builds), the build is verified . And this is happening ...

Deployment

This should be a non-event, because you take the tested assembly, following the same steps as in testing. Maybe at first it gets to an intermediate server where there is an automated copying process, but the bottom line is that this should not be a problem at the moment, because you confirmed using the same process.

Conclusion

In terms of knowing what, where, what you really want, is the logical way to group changes together. This is where the idea of ​​creating an assembly comes. This is truly a unit that must go between steps in the SDLC. If you already have this, then the ability to understand the state of a given system becomes trivial.

+6
source

Check out Ant or Maven are build and deployment tools used in the Java world that can help you copy / ftp files, perform backups, and even check code from SVN.

You can automate the deployment steps with these tools, for example, Ant allows you to declare a set of tasks as part of your deployment. So you could, for example:

  • View version using SVNAnt or similar to directory
  • Copy (and possibly write down first) these files to the backup directory
  • FTP all files to your web server (s)
  • Create an email report for the deployment team

Indeed, you can do almost anything you want by spending time using Ant. Maven is a bit more structured (and newer), and you can see a discussion of the differences here .

Hope this helps!

+1
source

In a nutshell...

You should start with some version control solution - perhaps Subversion or Git. After that, you can create a script that generates a clean build of the source code and deploys it to your production server (s).

You can do this with a simple batch script, or use something like Ant for more control. The following is a simple example of a batch file using Subversion:

svn copy svn://path/to/your/project/trunk -r HEAD svn://path/to/your/project/tags/%version% svn checkout svn://path/to/your/project/trunk -r HEAD //path/to/target/directory 

Ant makes it easy to do things like automatically run unit tests and synchronization directories. For example:

 <sync todir="//path/to/target/directory" includeEmptyDirs="true" overwrite="true"> <fileset dir="${basedir}"> <exclude name="**/*.svn"/> <exclude name="**/test/"/> </fileset> </sync> 

This is really just a starting point. The next step may be a continuous integration solution such as Hudson . I would also recommend reading Pragmatic Project Automation: How to Build, Deploy, and Track Java Applications .

One special version of ColdFusion is to make sure you clear the application area as needed (to update any singleton components). The general approach here is to use a URL parameter that calls onRequestStart () to call onApplicationStart (). You can also clear the trusted cache .

+1
source

We use a system called AnthillPro: http://www.anthillpro.com

This is commercial software, but it allows us to fully automate the deployment process on several servers and operating systems (we currently use it for both ColdFusion and Java, but it can be used for most languages. Integrations:

http://www.anthillpro.com/html/products/anthillpro/tool-integrations.html

0
source

All Articles