-
-
Save fujin/29b14d15f318918c562d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "This script requires superuser access to install apt packages." | |
echo "You will be prompted for your password by sudo." | |
# clear any previous sudo permission | |
sudo -k | |
# run inside sudo | |
sudo sh <<SCRIPT | |
# add treasure data repository to apt | |
echo "deb http://packages.treasure-data.com/precise/ precise contrib" > /etc/apt/sources.list.d/treasure-data.list | |
# update your sources | |
apt-get update | |
# install the toolbelt | |
apt-get install -y --force-yes td-agent | |
SCRIPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include_recipe 'ubuntu' | |
include_recipe 'apt' | |
# This should probably be configured to verify the key; you should find a key from a gnupg.net or similar. | |
apt_repository "treasure-data" do | |
uri 'http://packages.treasure-data.com/precise' | |
distribution node['lsb']['codename'] | |
components %w(contrib) | |
end | |
package 'td-agent' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sufficient care should be taken to add this recipe to a cookbook which contains 'depends' metadata for the 'apt' and 'ubuntu' cookbooks. Ubuntu cookbook is optional but I find it useful to have consistent chef-generated /etc/apt/sources.list across boxen.