PIKE >> Intelligent Deployment

Build Status Coverage Status Dependency Status Code Climate

Warning: This is an early state of development. There may be bugs and uncomplete features. Use it at your own risk.

What is pike?

Pike is a smart deployment automation system built to make your life easier.

Based on my experiences made with vlad, capistrano and manual deployments, I've build a deployment automation, which is easier to use and supports sudo, ssh, powerful configuration and very flexible build processes. Additionally I've combined it with the result of my Ruby Archives experiment. So pike doesn't clone the git repository on the production machine, rather then cloning it locally, run the build, packs everything neccessary in a single ruby archive file, compresses it and sends it to the production machine to deploy that file in a very clean way. That reduces the amount of depdencies required on the server, files on the server and the temptation to change files in the repo to quick patch something.

The goal of pike is to ship a smart but easy to use deployment automation system which makes deployments fun and your life easier.

Features

  • Custom build process: Create your own lifecycle with the tasks you need.
  • Huge arsenal of builtin tasks.
  • Nice verbose logging and a very fancy console output format.
  • Reduces your app code to the required minimum, packs it in one file, compresses it and sends that one file to the server
  • Release management
  • Automated Rollback if something breaks
  • Based on SSH
  • local and remote tasks
  • Integrates well with ...
    • sudo
    • your .ssh/config
    • rvm
    • rails
  • Built to make you happy. And me.

Usage

  1. Read the Pikefile documentation
  2. Setup a Pikefile
  3. Run pike your_environment setup which will setup the infrastructure initially on your server
  4. After that you can deploy the app via pike your_environment or just pike if your environment is named production

Screenshot

Documentation

Contribution

  1. Fork via the github fork button
  2. Clone your fork to your local machine
  3. Run script/setup
  4. Run bundle exec rspec spec/ and see how everything passes (green)
  5. Make your changes
  6. Run bundle exec rspec spec/ and repeat 5. and 6. until everything passes
  7. Commit
  8. Repeat 5. - 7. until you're done
  9. git push
  10. Open a pull request
  11. Get a beer and wait for the merge

Thanks to

  • Vlad and Capistrano for the idea, a good implementation and the (good and bad) experiences I've made by using them.
  • sshkit and net-ssh-shell for the experiences I've gathered with them about Net::SSH
  • Captain Christopher Pike (Star Trek) for inspiring me to the project name. Or should I thank Gene Roddenberry?

FAQ

Why did you built another deployment automation while there are capistrano and vlad out there? Why are you competing against capistrano/vlad/whatever?

I want you to understand, that I don't want to replace capistrano or vlad or other deployment automations with pike. I've used capistrano and vlad and they do a good job, the huge user base of both projects confirm that.

The issue is, both capistrano and vlad don't meet my requirements and are useless for my deployment style and use case. If I would use one of them, I had to write many complex recipes. Instead of writing those recipipes, I also could write my own deployment automation, which has the features I need. So I did. My goal for pike is to create a smart deployment automation with fancy and clear output, which integrated well with some mainstream ruby technologies (rails, rvm) and sudo and which makes your life easier and deployments more fun.

I have no problem with capistrano, vlad or other deployment automations, I just wanted to create my own one, which meets my requirements. That's it :)

If you think, that pike doesn't help you, feel free to use any other software you like, I'll not judge you. Software is a tool which should make your life easier and I don't like the way of thinking like some developers out there do while arguing against me, that their product is better then another one. That's like the Windows vs Mac vs Linux discussion, which I really hate. The point is: Everything has it's strengths and weaks. Use those tools that help you to get your work done and be happy. And Linux is the best one. ;)

WTF is a .rba file?

It's a ruby archive. A file format I've invented for pike. Ok to be honest, just a file extention I've inveted, since is a boring .tar.gz file containing production optimized ruby code.

The idea behind is simple: Instead if cloning all your repository code to the production server, which contains a lot of clutter like documentation, rspec, coverage reports, git files, IDE files, whatever, pike clones the project on your develop machine, removes all the clutter from the directory, runs some tasks like precompiling the assets and then packs everything (including the compiled assets) without the clutter in a single compressed file, which is sent to the server.

The advantages: Your file transfer to your server is faster and your project requires less disk space there while it also hides the code from you, which makes it harder to do code changes on the production machine to fix something. It forces you to do changes on your development machine and redeploy. Additionally your project directory on the server is very clean so you can focus on the important stuff like config files.

The disadvantages: None ;)

Licence

pike is licensed under the MIT License.

Copyright (c) 2013 Benjamin Kammerl aka phortx

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.