toquen 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -10
- data/lib/toquen/bootstrapper.rb +0 -2
- data/lib/toquen/templates/ubuntu_bootstrap.erb +7 -10
- data/lib/toquen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60347daff862f9d0e982d621f11a771cc9a9bf14
|
4
|
+
data.tar.gz: c85e030a7ab529d75561901e907cc4b94253e543
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c622aa58984509dd48f53b3faed12ca650e40c56989c8736e38576820c67baee88a8985f7b724f799b59fd81ba85fde0a9c401ce209a6cfc96c24664d92c9d1
|
7
|
+
data.tar.gz: 52c6ed6c0f46f1d9aec9d1810be76b9df6e021efe90f2ad6277f6c7f536b77910aaa373e0195d50572e708f0e12d2e54503e9a4491a316728dfb03ebf14a0a44
|
data/README.md
CHANGED
@@ -39,9 +39,8 @@ Bootstrapping a server will perform all of the following:
|
|
39
39
|
|
40
40
|
1. Update all packages (assuming a Debian/Ubuntu system)
|
41
41
|
1. Sets the hostname to be whatever you set as value for the Name tag in AWS
|
42
|
-
1.
|
43
|
-
1. Install
|
44
|
-
1. Install the chef and bundler gems
|
42
|
+
1. Installs Ruby / RubyGems
|
43
|
+
1. Install the chef gem
|
45
44
|
1. Reboot
|
46
45
|
|
47
46
|
You can bootstrap a single server by using:
|
@@ -91,13 +90,6 @@ By default, instance information is only pulled out of the default region (us-ea
|
|
91
90
|
set :aws_regions, ['us-west-1', 'us-west-2']
|
92
91
|
```
|
93
92
|
|
94
|
-
You can also manually specify the version of ruby (default 1.9.3) and rubygems (defualt 2.2.2) you want installed:
|
95
|
-
|
96
|
-
```ruby
|
97
|
-
set :rubygems_version, "2.1.11"
|
98
|
-
set :ruby_version, "2.0"
|
99
|
-
```
|
100
|
-
|
101
93
|
## View Instances
|
102
94
|
To see details about your aws instances you can use the **details** cap task.
|
103
95
|
|
@@ -119,3 +111,7 @@ To allow an SSH connection from your current machine (based on your internet vis
|
|
119
111
|
And then, when you're finished:
|
120
112
|
|
121
113
|
$ cap databases close_ssh
|
114
|
+
|
115
|
+
Or, if you want to do everything in one step:
|
116
|
+
|
117
|
+
$ cap databases open_ssh cook close_ssh
|
data/lib/toquen/bootstrapper.rb
CHANGED
@@ -7,8 +7,6 @@ module Toquen
|
|
7
7
|
hosttype = fetch(:hosttype, 'ubuntu')
|
8
8
|
path = File.expand_path("../templates/#{hosttype}_bootstrap.erb", __FILE__)
|
9
9
|
raise "Bootstrap process for #{hosttype} does not exist!" unless File.exists?(path)
|
10
|
-
rubygems_version = fetch(:rubygems_version, '2.2.2')
|
11
|
-
ruby_version = fetch(:ruby_version, '1.9.3')
|
12
10
|
user = fetch(:ssh_options)[:user]
|
13
11
|
StringIO.new ERB.new(File.read(path)).result(binding)
|
14
12
|
end
|
@@ -1,20 +1,17 @@
|
|
1
|
-
#!/bin/bash
|
1
|
+
#!/bin/bash -l
|
2
2
|
if [ -e "/home/<%= user %>/bootstrap.lock" ]; then exit 0; fi
|
3
3
|
DEBIAN_FRONTEND=noninteractive apt-get -y update
|
4
4
|
DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
|
5
5
|
DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
|
6
|
-
DEBIAN_FRONTEND=noninteractive apt-get -y install
|
7
|
-
|
6
|
+
DEBIAN_FRONTEND=noninteractive apt-get -y install ruby ruby-dev build-essential
|
7
|
+
|
8
|
+
gem install --no-rdoc --no-ri chef
|
9
|
+
|
10
|
+
echo Setting host variables...
|
8
11
|
echo "127.0.0.1 <%= host.properties.awsname %>" >> /etc/hosts
|
9
12
|
echo "<%= host.properties.awsname %>" > /etc/hostname
|
10
13
|
hostname "<%= host.properties.awsname %>"
|
11
|
-
|
12
|
-
rm -rf rubygems*
|
13
|
-
wget -q http://production.cf.rubygems.org/rubygems/rubygems-<%= rubygems_version %>.tgz
|
14
|
-
tar -zxf rubygems-<%= rubygems_version %>.tgz
|
15
|
-
cd /usr/src/rubygems-<%= rubygems_version %>
|
16
|
-
ruby setup.rb
|
17
|
-
gem install --no-rdoc --no-ri chef bundler
|
14
|
+
|
18
15
|
touch /home/<%= user %>/bootstrap.lock
|
19
16
|
echo "Rebooting now, standby..."
|
20
17
|
reboot
|
data/lib/toquen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toquen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Muller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|