Giter VIP home page Giter VIP logo

slicehost_setup's Introduction

Capistrano recipe to setup an Ubuntu Slicehost server

This script sets up a Rails server stack on Slicehost, running Ubuntu Inprepid

Includes updated gems, ImageMagick, and setup configs as specified in Slicehost articles for Ubuntu Intrepid

What’s installed

  • Ubuntu Development Tools
  • Git
  • Apache
  • Passenger
  • MySQL
  • Ruby 1.8.6
  • Rubygems 1.3.1
  • Rails 2.3.2
  • IMageMagick

The following gems are installed:

  • radiant
  • flickr_fu
  • haml
  • mislav-will_paginate
  • fastercsv
  • RedCloth
  • rmagick
  • xml-magic
  • json
  • thoughtbot-paperclip

Also configures Apache for use with Passenger, as well setting up a vhost container for the rails app.
For more details, checkout config/deploy.rb

Prerequisites


  sudo aptitude safe-upgrade
  sudo aptitude full-upgrade

How to use

You should only need to modify the variables at the top of the deploy recipe in config/deploy.rb


  set :application, "mydomain.com" # The vhost container name (e.g. domain)
  set :repository,  "[email protected]:USERNAME/REPONAME.git" # GitHub repo where this deploy lives
  set :user, "username" # Username of your slice
  set :slice, "xx.xx.xx.xx" # The IP address of your slice

The two lines below probably only need to be used if you are also deploying your app from this same recipe
I only use this recipe for setting up my server, and is not contained in the app’s repo itself


  set :repository,  "[email protected]:USERNAME/REPONAME.git"
  set :deploy_to, "/home/#{user}/#{application}"

You can, of course, use this recipe as the primary deploy.rb, where all your cap commands access the declared namespaces. This would allow you to setup the recipe on a per project basis.

As an alternative, you can place this recipe in your app alongside the dev, staging, and production recipes using the capistrano-ext gem, which would allow you to issue cap commands on a per environment basis. In this case, you could name this recipe slicehost.rb. Be sure to declare this recipe in the top-level deploy.rb file.

To run the recipe in it’s entirety, issue the command cap slicehost:setup_env.

To see all the available commands, issue the command cap -T.

Credit to Matt Swasey of Viget Labs for the idea, based on his blog entry
http://www.viget.com/extend/building-an-environment-from-scratch-with-capistrano-2

Copyright © 2009 Brandon Calloway, released under the MIT License

slicehost_setup's People

Stargazers

Angus H. avatar Andre Ortiz avatar  avatar  avatar Sachin Sagar Rai avatar Bob avatar Liutauras avatar Lance Ball avatar Harold Daniel avatar Mike Clark avatar Daniel avatar

Watchers

Brandon Calloway avatar  avatar

Forkers

millisami lidi

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.