-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
40 lines (32 loc) · 1.01 KB
/
setup.sh
File metadata and controls
40 lines (32 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
CHEF_URL="git://github.com/arbylee/FlickFitChef.git"
sudo yum install -y git-core
sudo yum install -y rubygems
sudo yum install -y ruby-devel.x86_64
sudo yum install -y make
sudo yum install -y sqlite-devel.x86_64
if [ ! -f /etc/profile.d/rubygems-paths.sh ]; then
sudo bash -c "echo 'export PATH=/var/lib/gems/1.8/bin:\$PATH' > /etc/profile.d/rubygems-paths.sh"
fi
sudo yum install -y gcc
if [ "`sudo gem sources | grep github`" = "" ]; then
sudo gem sources -a http://gems.github.com/
else
echo "Skipping github, already in sources"
fi
if [ "`sudo gem sources | grep opscode`" = "" ]; then
sudo gem sources -a http://gems.opscode.com/
else
echo "Skipping opscode, already in sources"
fi
NULL=`sudo gem which chef`
RETURNVAL=$?
if [[ $RETURNVAL -eq "1" ]]; then
sudo gem install ohai chef --no-rdoc --no-ri
else
echo "Chef already installed"
fi
rm -rf /tmp/FlickFitChef
cd /tmp
git clone $CHEF_URL
### sudo bash -lc "chef-solo -l debug -c ${ROLE}.rb -j ${ROLE}.json -r ${RECIPEURL}"