Giter VIP home page Giter VIP logo

deprec's Introduction

deprec - Deployment Recipes for Capistrano

I've not used/update this in 5+ years - Mike

The deprec gem is a set of tasks for Capistrano. These tasks provide for the installation, configuration and control of system services on servers running Ubuntu linux. Deprec was created in 2006 by Mike Bailey to setup an environment for running Ruby on Rails web applications on Ubuntu servers. Since then its uses have grown to installing Xen virtualization, mail, monitoring, high availability IP failover and other services.

The tasks are run at the command line on your workstation and connect to remote servers via ssh to run commands and copy out files.

Deprec-2.x is a complete rewrite of the project that achieves the following:

  • support for Capistrano 2
  • generated config files are stored locally to enable editing and version control
  • support for more services (heartbeat, nagios, nginx, ntp, postfix, etc)
  • multiple Rails deployment options (Passenger+Apache, Mongrel+Apache/Nginx)
  • creation of a standard base set of task names
  • tasks are cleanly separated into namespaced units (one file per service)
  • interactive prompting for missing config values

Deprec and Capistrano are written in the Ruby programming language however no knowledge of Ruby is required to use it. Users should be able to write new tasks and modify existing options without prior knowledge of Ruby.

Installation

Deprec can using rubygems5.

sudo gem install deprec  # installs deprec and dependancies 
depify -c                # creates ~/.caprc which you may edit
cap -T                   # should list lots of deprec tasks

The .caprc file is loaded every time you use Capistrano. It in turn loads the deprec tasks so you always have them available. Editing the .caprc file in your home directory allows you to specify the location of your ssh key and enable some other useful options (documented in the comments). You can also put tasks here that you want access to, regardless of the current working directory.

Installing other things

I plan to document other things I use deprec for on http://www.deprec.org/. Feel free to poke around and see what's there. I use deprec to provision and manage servers so you might find some things in there I haven't documented. Lucky you.

Disclaimer

The tasks run commands that may make changes to your workstation and remote server. You are advised to read the source and use at your own risk.

Credits

Deprec is written and maintained by Mike Bailey [email protected]. More about me here: [http://mike.bailey.net.au/]

Deprec was inspired and uses the brilliantly executed Capistrano. Thanks Jamis! This gem includes a modified copy of Neil Wilson's very useful vmbuilder_plugins gem.

Thanks

Deprec wouldn't be what it is without the contributions of many people, a few of whom are listed here:

Square Circle Triangle: commissioned work that has included in the project. Eric Harris-Braun: great testing, bug reports and suggestions Gus Gollings: helped restore www.deprec.org Craig Ambrose: testing, documentation and beer

github forks of note: isaac paulreimer jasherai saimonmoore zippy

License

Deprec is licenced under the GPL. This means that you can use it in commercial or open source applications. More details found here: http://www.gnu.org/licenses/gpl.html

deprec - deployment recipes for capistrano Copyright (C) 2006-2008 Mike Bailey

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

deprec's People

Contributors

captainpete avatar gfairbrother avatar isaackearse avatar jasherai avatar jonysk avatar jorahood avatar kiere avatar mbailey avatar ramon avatar robc avatar thewoolleyman avatar xaviershay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

deprec's Issues

Creates mongrel.log when using passenger

It seems like several steps can be eliminated during deploy by skipping mongrel.log processing when using passenger. This would skip 4 commands (touch, chown , chrgrp, and chmod) and lighten the load during deploy.

Maybe we can join forces with our capistrano recipes?

We have also been maintaining a set of capistrano recipes for our organisation, and I think it would be great to join forces.
We can provide the other half of the server equation, since we run CentOS which uses the yum package manager.

Our recipes are at https://github.com/crossroads/crossroads_capistrano, and we do share a lot of recipes in common, but we will still have a few differing opinions to sort out.
For example, you prefer to check in your config files to source control, but our convention is to save config files to a 'shared' folder on the server, and symlink them into each release folder.
Instead of arguing over which way is right or wrong, perhaps we could resolve any conflicts by giving the user a choice between both options.

I've written our recipes gem with the goal of keeping our deploy.rb as concise as possible. For example, here is the full deploy script for one of our applications:

$ cat config/deploy.rb

require 'crossroads_capistrano'
load_crossroads_recipes %w(stack rvm passenger postgresql
                       newrelic hoptoad log revisions)

set :application,          "xxxxxxx"
set :domain,               "xxxxxxxx.org"
set :repository,           "https://xxxxxxxxxxxxxxxxxxxxxxx.git"
set :rvm_ruby_string,      "ruby-1.9.2-p136"
set :passenger_version,    "3.0.3"
set :user, "root"
set :use_sudo, false

$ cat config/deploy/live.rb

set :ip_address, "10.0.1.88"
set :site_domain_name, "xxxxxxxxxxxxxxxxxxxx"
server "xx.xx.xx.xx", :app, :web, :db, :primary => true
set :deploy_to, "/opt/rails/#{application}-preview"
set :branch, "master"

The last thing is that I'm not very fond of the 'deprec' namespace. I think it's really unnecessary, and I really don't want to type 'deprec' over and over again for every command.
I think this would be a barrier to collaboration if you don't see a way around that.
But I would be happy if the deprec namespace was optional, and could be configured from ~/.caprc.

Look forward to hearing your thoughts!

Mysql encoding

As nothing is configured in my.cnf mysql sets encoding to latin. It should be possible to configure or at even make the default encoding to utf-8.

database_yml_in_scm

Commit 0380310 enforces you to either keep the server's database.yml locally or in scm. The problem with it is that if you want to do neither, i.e. because your local database.yml is no appropriate for the server (i.e. it's appropriate for testing), and you don't want passwords kept in the scm version.

It would be very nice to be able to override the automatic push from the local config directory by setting something like:

set :push_local_database_to_server_yml false

Deprec 2.2.3 Gem incorrect _cset

Hi,

It looks like the 2.2.3 deprec gem is packaged wrong. In deprec.rb I can find the following code:

_cset :rake, 'rake'

_cset :rake, 'rakes'

I'm pretty sure the commented line is what I want so I have to manually edit the source. On Github the source code is showing correctly.

Cheers,

Rom

Integrity Task is broken

executing "sudo -p 'sudo password: ' integrity install --passenger /opt/apps/integrity"
servers: ["li99-142.members.linode.com"]
[li99-142.members.linode.com] executing command
*** [err :: li99-142.members.linode.com] 'install' was called incorrectly. Call
as 'integrity:installer:install [PATH] [--passenger] [--thin]'
*** [err :: li99-142.members.linode.com]
command finished

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.