mirror of https://github.com/apache/jclouds.git
Update location of bootstrap script to work with OSGi.
Update bootstrap script to match latest Chef releases.
This commit is contained in:
parent
11c1f29e41
commit
45a6ddbe39
|
@ -19,16 +19,14 @@
|
|||
|
||||
package org.jclouds.chef.statements;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import com.google.common.base.Throwables;
|
||||
import org.jclouds.scriptbuilder.domain.OsFamily;
|
||||
import org.jclouds.scriptbuilder.domain.Statement;
|
||||
import org.jclouds.util.Utils;
|
||||
import org.jclouds.util.Strings2;
|
||||
|
||||
import com.google.common.base.Throwables;
|
||||
import javax.inject.Singleton;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
|
@ -38,8 +36,7 @@ public class InstallChefGems implements Statement {
|
|||
@Override
|
||||
public String render(OsFamily family) {
|
||||
try {
|
||||
return Utils.toStringAndClose(InstallChefGems.class.getClassLoader().getResourceAsStream(
|
||||
"install-chef-gems.sh"));
|
||||
return Strings2.toStringAndClose(getClass().getResourceAsStream("install-chef-gems.sh"));
|
||||
} catch (IOException e) {
|
||||
Throwables.propagate(e);
|
||||
return null;
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
if [ ! -f /usr/bin/chef-client ]; then
|
||||
apt-get update
|
||||
apt-get install -y ruby ruby1.8-dev build-essential wget libruby-extras libruby1.8-extras
|
||||
mkdir -p /tmp/bootchef
|
||||
(
|
||||
cd /tmp/bootchef
|
||||
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz
|
||||
tar xvf rubygems-1.3.6.tgz
|
||||
cd rubygems-1.3.6
|
||||
ruby setup.rb
|
||||
cp /usr/bin/gem1.8 /usr/bin/gem
|
||||
)
|
||||
rm -rf /tmp/bootchef
|
||||
gem install chef ohai --no-rdoc --no-ri --verbose
|
||||
fi
|
|
@ -0,0 +1,16 @@
|
|||
if [ ! -f /usr/bin/chef-client ]; then
|
||||
apt-get update -o Acquire::http::No-Cache=True
|
||||
apt-get install -y ruby ruby1.8-dev build-essential wget libruby-extras libruby1.8-extras
|
||||
# Comment next line for production controlled environments, this should be part of a recipe
|
||||
apt-get -y upgrade
|
||||
(
|
||||
mkdir -p /tmp/bootchef
|
||||
cd /tmp/bootchef
|
||||
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
|
||||
tar zxf rubygems-1.3.7.tgz
|
||||
cd rubygems-1.3.7
|
||||
ruby setup.rb --no-format-executable
|
||||
rm -fr /tmp/bootchef
|
||||
)
|
||||
/usr/bin/gem install ohai chef --no-rdoc --no-ri --verbose
|
||||
fi
|
Loading…
Reference in New Issue