Giter Club home page Giter Club logo

debian-rails's Introduction

Important note - This version works best when ran with debian v7.* (Wheezy). A debian v8.* (Jessie), version is currently in the works to replace the master branch.

Requirements

Vagrant and Ansible

brew install ansible
(ansible > 1.3, and it's dependencies)

This ansible build works best with using Debian images/boxes.

Config and Setup of Vagrant

Before Running

copy id_rsa.pub to the files directory, because ssh is changed to use pubkey authentication.

cp ~/.ssh/id_rsa.pub provision/files/workstation.pub
Required steps
# vagrant plugins - https://github.com/mitchellh/vagrant/wiki/Available-Vagrant-Plugins
# vagrant caching - https://github.com/fgrehm/vagrant-cachier
#   http://fgrehm.viewdocs.io/vagrant-cachier
#   https://github.com/fgrehm/vagrant-cachier/blob/master/docs/usage.md
vagrant plugin install vagrant-cachier

########## START ##########
# Depending on your setup you may need to issue the following commands
# you more than likely won't need to use the following commands
##########
brew install curl-ca-bundle
#add the following line to you environment file .bashrc .zshrc .bash_profile etc
export SSL_CERT_FILE=/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt
########## END ##########

Vagrant Commands

Load and Provision the Box/VM

vagrant up

Reload and (re)Provision the box

vagrant reload --provision

Shutdown/Suspend the current VM

vagrant halt
vagrant suspend

Completely Destroy the provisioned box/VM

vagrant destroy
# destroy vagrant VM without confirmation
vagrant destroy -f

# if vagrant/ansible freezes giving you an error that the instance is already open use the following commands
vagrant global-status
# this will output all open vagrant instances with their ids, providers etc
vagrant destroy 0965180
# this will kill the current vagrant process with that particular specified id

DigitalOcean

To use with DigitalOcean use the following commands:

# https://github.com/smdahlen/vagrant-digitalocean
vagrant plugin install vagrant-digitalocean

Copy contents of file or change from host_vagrants/digitalocean to Vagrantfile in base directory

# to load it up use the following command
vagrant up --provider=digital_ocean

# reprovision the VM
vagrant provision

Vagrant Roles

Role Contents
apt Update and upgrade
build Install and build required libraries
database Install redis, PostgreSQL, and databases
development Install all general required tools (imagemagick, memcached, etc.)
prereq_config Configure Prerequisites for particular settings in order to install needed packages
ruby Install Ruby, RVM, Rails
security Harden Linux box, install ufw, ssh, and fail2ban
webserver Install nginx, Phusion Passenger, and required libraries

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.