salted-rails 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +31 -6
  2. data/init.sh +12 -10
  3. data/lib/salted-rails/version.rb +1 -1
  4. metadata +1 -1
data/README.md CHANGED
@@ -4,9 +4,10 @@ Salted-Rails: Provision a vagrant machine for rails using salt.
4
4
 
5
5
  This gem inspects your rails app configuration to work out what needs to be installed in the virtual machine.
6
6
 
7
- THIS GEM IS IN ALPHA STAGE! THINGS MAY CHANGE AND BREAK WITHOUT NOTICE!
7
+ This gem reflects my personal preferences in setting up a virtual machine for rails projects,
8
+ and will change over time as I refine it for use with other projects.
8
9
 
9
- It Inspects:
10
+ It inspects:
10
11
  * .ruby-version / .rvmrc to control the version of ruby installed (using rbenv)
11
12
  * config/database.yml to create users and databases
12
13
  * Gemfile and Gemfile.lock to preload gems into the system, and trigger the installation of packages required by gems
@@ -15,20 +16,40 @@ This configures vagrant in the way that I personally like:
15
16
  * ubunutu 12.04 (LTS) 32bit from cloud-images.ubuntu.com (up to date packages and more memory free for systems < 4GB memory)
16
17
  * forward ssh agent
17
18
  * digital ocean default to 'San Francisco 1'
18
- * salt provisioning based on rails Gemfile[.lock], database.yml and .ruby-version configuration
19
+ * salt provisioning with 0.16.4 version (to avoid problems with 0.17.0) and /etc/hostname fix
19
20
  * forward post 3000, 80, 443
21
+ * Include fix vbguest fix for upgrading virtualbox additions with ubunutu cloud
20
22
 
21
- I am intending to add a capistrano helper as well
23
+ I am thinking of doing the following in the future:
24
+ * Configuring up vim with a standard set of plugins
25
+ * Expand it for use with capistrano (for deployment to staging and production servers), including hardening up the server for security
26
+ * Expand it to construct continuous testing / delivery servers
22
27
 
23
28
  ## Installation
24
29
 
25
- ### Vagrant
30
+ ### Packages and plugins
31
+
32
+ Download init.sh script and run:
33
+
34
+ $ wget https://raw.github.com/ianheggie/salted-rails/master/init.sh
35
+ $ sh init.sh
36
+
37
+ This will:
38
+
39
+ * prompt you to install vagrant (1.3.3 not 1.3.4) if not already present
40
+ * prompt you to install virtualbox (4.2.18 or later) if not already present
41
+ * install this (salted-rails) vagrant plugin as well as the following other plugins:
42
+ * deep\_merge vagrant-digitalocean vagrant-vbguest
43
+ * If your project has a Vagrantfile.example, it will copy it to Vagrantfile
44
+ * Prompt for and setup ~/.vagrant.d/Vagrantfile with your digital ocean client and api keys (if not already present)
26
45
 
27
46
  Add as a vagrant plugin
28
47
 
29
48
  vagrant plugin add salted-rails
30
49
 
31
- And then adjust your Vagrantfile as follows (accepting all the defaults, one machine):
50
+ ### Vagrantfile
51
+
52
+ Adjust your Vagrantfile as follows (example of accepting all the defaults, one default machine):
32
53
 
33
54
  Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
34
55
 
@@ -101,6 +122,10 @@ The mirror value can also be:
101
122
  * a country code - eg 'au', 'uk', 'us' etc
102
123
  * url of mirror - specify the full url (in the same format as mirrors.txt above)
103
124
 
125
+ ### Updating virtualbox guest additions
126
+
127
+ Use `vagrant vbguest --do install` to update the virtualbox guest additions (required for shared folders to work with OS/X)
128
+
104
129
  ### Capistrano
105
130
 
106
131
  Add this line to your application's Gemfile:
data/init.sh CHANGED
@@ -14,7 +14,7 @@ if which vagrant; then
14
14
  echo Checking vagrant plugins are installed ...
15
15
 
16
16
  vagrant plugin list > /tmp/t$$
17
- for plugin in deep_merge vagrant-digitalocean vagrant-vbguest # salted-rails
17
+ for plugin in deep_merge vagrant-digitalocean vagrant-vbguest salted-rails
18
18
  do
19
19
  if grep $plugin < /tmp/t$$; then
20
20
  vagrant plugin update $plugin
@@ -24,20 +24,22 @@ if which vagrant; then
24
24
  done
25
25
 
26
26
  else
27
- echo ACTION REQUIRED: Please install vagrant 1.3.4 or later from http://www.vagrantup.com/
27
+ echo ACTION REQUIRED: Please install vagrant 1.3.3 (1.3.4 has a bug) from http://www.vagrantup.com/
28
28
  msg='(PLEASE RERUN SCRIPT AFTERWARDS)'
29
29
  fi
30
30
 
31
- if [ -f Vagrantfile.example ]; then
32
- if [ -f Vagrantfile ]; then
33
- echo Found Vagrantfile '(previously copied from example)'
31
+ if [ ! -f Vagrantfile ]; then
32
+ if [ -f Vagrantfile.example ]; then
33
+ if [ -f Vagrantfile ]; then
34
+ echo Found Vagrantfile '(previously copied from example)'
35
+ else
36
+ echo Copying Vagrantfile.example to Vagrantfile '(so you can customize it)'
37
+ cp Vagrantfile.example Vagrantfile
38
+ fi
34
39
  else
35
- echo Copying Vagrantfile.example to Vagrantfile '(so you can customize it)'
36
- cp Vagrantfile.example Vagrantfile
40
+ echo WARNING: Vagrantfile.example not found - skipped Vagrantfile setup
41
+ msg='(Please run vagrant init in your rails project directory then edit Vagrantfile)'
37
42
  fi
38
- else
39
- echo ERROR: setup_vagrant Must be run in rails root directory '(Vagrantfile.example not found)'
40
- msg='(PLEASE RERUN SCRIPT FROM CORRECT DIRECTORY)'
41
43
  fi
42
44
 
43
45
  mkdir -p $HOME/.vagrant.d
@@ -1,3 +1,3 @@
1
1
  module SaltedRails
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salted-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: