Permalink
Browse files

basics instructions, cookbooks / build-essential

  • Loading branch information...
1 parent 894c9fc commit ea5178e0b60d4a437b548da0aa069715d5bb97c2 @obazoud committed Dec 30, 2011
View
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -x
+
+git clone https://github.com/obazoud/chef-solo-playground && cd chef-solo-playground
+sudo chef-solo -c /tmp/chef-solo-playground/solo.rb -j /tmp/chef-solo-playground/node.json
+# cookbook
+# -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
+rm -rf /tmp/chef-solo-playground
+
+
+
@@ -0,0 +1,24 @@
+DESCRIPTION
+===========
+
+Installs packages required for compiling C software from source.
+
+LICENSE AND AUTHOR
+==================
+
+Author:: Joshua Timberman (<joshua@opscode.com>)
+Author:: Seth Chisamore (<schisamo@opscode.com>)
+
+Copyright 2009-2011, Opscode, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
@@ -0,0 +1,35 @@
+{
+ "name": "build-essential",
+ "description": "Installs C compiler / build tools",
+ "long_description": "",
+ "maintainer": "Opscode, Inc.",
+ "maintainer_email": "cookbooks@opscode.com",
+ "license": "Apache 2.0",
+ "platforms": {
+ "fedora": ">= 0.0.0",
+ "redhat": ">= 0.0.0",
+ "centos": ">= 0.0.0",
+ "ubuntu": ">= 0.0.0",
+ "debian": ">= 0.0.0"
+ },
+ "dependencies": {
+ },
+ "recommendations": {
+ },
+ "suggestions": {
+ },
+ "conflicting": {
+ },
+ "providing": {
+ },
+ "replacing": {
+ },
+ "attributes": {
+ },
+ "groupings": {
+ },
+ "recipes": {
+ "build-essential": "Installs C compiler and build tools on Linux"
+ },
+ "version": "1.0.0"
+}
@@ -0,0 +1,10 @@
+maintainer "Opscode, Inc."
+maintainer_email "cookbooks@opscode.com"
+license "Apache 2.0"
+description "Installs C compiler / build tools"
+version "1.0.0"
+recipe "build-essential", "Installs C compiler and build tools on Linux"
+
+%w{ fedora redhat centos ubuntu debian }.each do |os|
+ supports os
+end
@@ -0,0 +1,45 @@
+#
+# Cookbook Name:: build-essential
+# Recipe:: default
+#
+# Copyright 2008-2009, Opscode, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+case node['platform']
+when "ubuntu","debian"
+ %w{build-essential binutils-doc}.each do |pkg|
+ package pkg do
+ action :install
+ end
+ end
+when "centos","redhat","fedora"
+ %w{gcc gcc-c++ kernel-devel make}.each do |pkg|
+ package pkg do
+ action :install
+ end
+ end
+end
+
+package "autoconf" do
+ action :install
+end
+
+package "flex" do
+ action :install
+end
+
+package "bison" do
+ action :install
+end
View
@@ -0,0 +1 @@
+Chef::Log.debug("Running recipe...")
View
@@ -0,0 +1,38 @@
+#!/bin/sh
+set -x
+
+wget -qO- https://raw.github.com/obazoud/linux-bootstrap/master/update-ubuntu.sh | sh
+
+# http://wiki.opscode.com/display/chef/Installing+Chef+Client+on+Ubuntu+or+Debian
+
+# pre installation
+echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list
+sudo mkdir -p /etc/apt/trusted.gpg.d
+gpg --keyserver keys.gnupg.net --recv-keys 83EF826A
+gpg --export packages@opscode.com | sudo tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null
+sudo aptitude --assume-yes --quiet update
+sudo aptitude --assume-yes --quiet install opscode-keyring
+sudo aptitude --assume-yes --quiet safe-upgrade
+
+# install
+echo "chef chef/chef_server_url string none" | sudo debconf-set-selections
+sudo aptitude --assume-yes --quiet install chef
+
+# Ruby
+sudo aptitude --assume-yes --quiet install ruby ruby-dev libopenssl-ruby rdoc ri irb build-essential wget ssl-cert curl
+
+# RubyGems
+cd /tmp
+curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.12.tgz
+tar zxf rubygems-1.8.12.tgz
+cd rubygems-1.8.12
+sudo ruby setup.rb --no-format-executable
+rm -rf /tmp/rubygems-1.8.12
+rm -f /tmp/rubygems-1.8.12.tgz
+
+# Gem mysql
+sudo aptitude --assume-yes --quiet install mysql-client libmysql-ruby libmysqlclient-dev
+sudo gem install mysql
+
+
+
View
@@ -0,0 +1,5 @@
+{
+ "run_list": [
+ "build-essential"
+ ]
+}
View
@@ -0,0 +1,5 @@
+log_level :debug
+file_cache_path "/tmp/chef-solo-playground"
+cookbook_path "/tmp/chef-solo-playground/cookbooks"
+json_attribs "/tmp/chef-solo-playground/node.json"
+

0 comments on commit ea5178e

Please sign in to comment.