chef-vpc-toolkit 2.6.1 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG
CHANGED
data/README.rdoc
CHANGED
@@ -12,7 +12,7 @@ The Chef VPC Toolkit is a set of Rake tasks that provide a framework to help aut
|
|
12
12
|
|
13
13
|
-Uses Cloud Servers VPC to create secure groups of servers in the public cloud.
|
14
14
|
|
15
|
-
-Supports
|
15
|
+
-Supports Debian, Ubuntu, Fedora, RHEL, and Centos.
|
16
16
|
|
17
17
|
-Creates a local Chef Server within the server group.
|
18
18
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.0
|
data/config/server_group.json
CHANGED
@@ -0,0 +1,48 @@
|
|
1
|
+
function install_chef {
|
2
|
+
|
3
|
+
apt-get install -y lsb-release &> /dev/null || { echo "Failed to install lsb-release"; exit 1; }
|
4
|
+
CODENAME=$(/usr/bin/lsb_release -cs)
|
5
|
+
local INSTALL_TYPE=${1:-"CLIENT"} # CLIENT/SERVER
|
6
|
+
|
7
|
+
local CDN_BASE="http://c2521002.cdn.cloudfiles.rackspacecloud.com"
|
8
|
+
local TARBALL="chef-client-0.9.16-debian.6.0-x86_64.tar.gz"
|
9
|
+
|
10
|
+
if [[ "$CODENAME" == "squeeze" ]]; then
|
11
|
+
if [[ "$INSTALL_TYPE" == "SERVER" ]]; then
|
12
|
+
TARBALL="chef-server-0.9.16-debian.6.0-x86_64.tar.gz"
|
13
|
+
else
|
14
|
+
TARBALL="chef-client-0.9.16-debian.6.0-x86_64.tar.gz"
|
15
|
+
fi
|
16
|
+
else
|
17
|
+
echo "Only Debian 6.0 (Squeeze) is supported at this time."; exit 1;
|
18
|
+
fi
|
19
|
+
|
20
|
+
apt-get update &> /dev/null || { echo "Failed to apt-get update."; exit 1; }
|
21
|
+
dpkg -L rsync &> /dev/null || apt-get install -y rsync &> /dev/null
|
22
|
+
|
23
|
+
if ! dpkg -L chef &> /dev/null; then
|
24
|
+
|
25
|
+
local CHEF_PACKAGES_DIR=$(mktemp -d)
|
26
|
+
|
27
|
+
wget "$CDN_BASE/$TARBALL" -O "$CHEF_PACKAGES_DIR/chef.tar.gz" &> /dev/null \
|
28
|
+
|| { echo "Failed to download Chef RPM tarball."; exit 1; }
|
29
|
+
cd $CHEF_PACKAGES_DIR
|
30
|
+
tar xzf chef.tar.gz || { echo "Failed to extract Chef tarball."; exit 1; }
|
31
|
+
rm chef.tar.gz
|
32
|
+
|
33
|
+
echo "chef-solr chef-solr/amqp_password password YA1B2C301234Z" | debconf-set-selections &> /dev/null || { echo "Failed to set debconf selections for chef-solr."; exit 1; }
|
34
|
+
echo "chef chef/chef_server_url string http://localhost:4000" | debconf-set-selections &> /dev/null || { echo "Failed to set debconf selections for chef."; exit 1; }
|
35
|
+
apt-get install -y ucf &> /dev/null || { echo "Failed to install ucf pkg"; exit 1; }
|
36
|
+
DEBIAN_FRONTEND=noninteractive dpkg -i -R chef* &> /dev/null || { echo "Failed to install the Chef Server via apt-get on $HOSTNAME."; exit 1; }
|
37
|
+
|
38
|
+
cd /tmp
|
39
|
+
rm -Rf $CHEF_PACKAGES_DIR
|
40
|
+
|
41
|
+
/etc/init.d/chef-client stop &> /dev/null
|
42
|
+
sleep 2
|
43
|
+
kill -9 $(pgrep chef-client) &> /dev/null || true
|
44
|
+
rm /var/log/chef/client.log
|
45
|
+
|
46
|
+
fi
|
47
|
+
|
48
|
+
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
function install_chef {
|
2
2
|
|
3
|
-
|
3
|
+
apt-get install -y lsb-release &> /dev/null || { echo "Failed to install lsb-release"; exit 1; }
|
4
|
+
CODENAME=$(/usr/bin/lsb_release -cs)
|
4
5
|
local INSTALL_TYPE=${1:-"CLIENT"} # CLIENT/SERVER
|
5
6
|
|
6
7
|
local CDN_BASE="http://c2521002.cdn.cloudfiles.rackspacecloud.com"
|
@@ -18,8 +19,14 @@ elif [[ "$CODENAME" == "maverick" ]]; then
|
|
18
19
|
else
|
19
20
|
TARBALL="chef-client-0.9.16-ubuntu.10.10-x86_64.tar.gz"
|
20
21
|
fi
|
22
|
+
elif [[ "$CODENAME" == "natty" ]]; then
|
23
|
+
if [[ "$INSTALL_TYPE" == "SERVER" ]]; then
|
24
|
+
TARBALL="chef-server-0.9.18-ubuntu.11.04-x86_64.tar.gz"
|
25
|
+
else
|
26
|
+
TARBALL="chef-client-0.9.18-ubuntu.11.04-x86_64.tar.gz"
|
27
|
+
fi
|
21
28
|
else
|
22
|
-
echo "Only Ubuntu 10.04
|
29
|
+
echo "Only Ubuntu 10.04, 10.10, and 11.04 are supported."; exit 1;
|
23
30
|
fi
|
24
31
|
|
25
32
|
apt-get update &> /dev/null || { echo "Failed to apt-get update."; exit 1; }
|
@@ -37,6 +44,7 @@ if ! dpkg -L chef &> /dev/null; then
|
|
37
44
|
|
38
45
|
echo "chef-solr chef-solr/amqp_password password YA1B2C301234Z" | debconf-set-selections &> /dev/null || { echo "Failed to set debconf selections for chef-solr."; exit 1; }
|
39
46
|
echo "chef chef/chef_server_url string http://localhost:4000" | debconf-set-selections &> /dev/null || { echo "Failed to set debconf selections for chef."; exit 1; }
|
47
|
+
apt-get install -y ucf &> /dev/null || { echo "Failed to install ucf pkg"; exit 1; }
|
40
48
|
DEBIAN_FRONTEND=noninteractive dpkg -i -R chef* &> /dev/null || { echo "Failed to install the Chef Server via apt-get on $HOSTNAME."; exit 1; }
|
41
49
|
|
42
50
|
cd /tmp
|
@@ -395,6 +395,8 @@ class ServerGroup
|
|
395
395
|
"centos"
|
396
396
|
when 187811 # Centos 5.4
|
397
397
|
"centos"
|
398
|
+
when 78 # Fedora 15
|
399
|
+
"fedora"
|
398
400
|
when 71 # Fedora 14
|
399
401
|
"fedora"
|
400
402
|
when 53 # Fedora 13
|
@@ -405,6 +407,10 @@ class ServerGroup
|
|
405
407
|
"rhel"
|
406
408
|
when 62 # RHEL 5.5
|
407
409
|
"rhel"
|
410
|
+
when 75 # Debian 6.0
|
411
|
+
"debian"
|
412
|
+
when 76 # Ubuntu 11.04
|
413
|
+
"ubuntu"
|
408
414
|
when 69 # Ubuntu 10.10
|
409
415
|
"ubuntu"
|
410
416
|
when 49 # Ubuntu 10.04
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-vpc-toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 2.
|
8
|
+
- 7
|
9
|
+
- 0
|
10
|
+
version: 2.7.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dan Prince
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-10-05 00:00:00 -04:00
|
19
19
|
default_executable: chef-vpc-toolkit
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/chef-vpc-toolkit.rb
|
118
118
|
- lib/chef-vpc-toolkit/chef-0.9.bash
|
119
119
|
- lib/chef-vpc-toolkit/chef_bootstrap/centos.bash
|
120
|
+
- lib/chef-vpc-toolkit/chef_bootstrap/debian.bash
|
120
121
|
- lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
|
121
122
|
- lib/chef-vpc-toolkit/chef_bootstrap/rhel.bash
|
122
123
|
- lib/chef-vpc-toolkit/chef_bootstrap/ubuntu-opscode.bash
|