Skip to content

Commit 349792a

Browse files
committed
initial
0 parents  commit 349792a

File tree

8 files changed

+161
-0
lines changed

8 files changed

+161
-0
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.vagrant
2+
Berksfile.lock
3+
*~
4+
*#
5+
.#*
6+
\#*#
7+
.*.sw[a-z]
8+
*.un~
9+
/cookbooks
10+
11+
# Bundler
12+
Gemfile.lock
13+
bin/*
14+
.bundle/*
15+
*.box

Berksfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
source "https://supermarket.getchef.com"
2+
3+
metadata
4+
5+
cookbook "percona", github: "beyond9/chef-percona"
6+
cookbook 'b9mysql', github:'beyond9/b9mysql'
7+
cookbook 'b9npm', github: 'beyond9/b9npm'
8+
cookbook 'b9ruby', github: 'beyond9/b9ruby'
9+
cookbook 'b9php', github: 'beyond9/b9php'
10+
cookbook 'b9apache', github: 'beyond9/b9apache'
11+
12+
13+
cookbook "php"
14+
cookbook "yum", ">= 3.0.0"
15+
cookbook "apache2", github: 'cescalante/apache2'
16+
cookbook "memcached", ">= 1.6.6"
17+
cookbook "sqlite"
18+
cookbook "sendmail"

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'berkshelf'

Thorfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# encoding: utf-8
2+
3+
require 'bundler'
4+
require 'bundler/setup'
5+
require 'berkshelf/thor'

Vagrantfile

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant.configure("2") do |config|
5+
config.omnibus.chef_version = :latest
6+
7+
# All Vagrant configuration is done here. The most common configuration
8+
# options are documented and commented below. For a complete reference,
9+
# please see the online documentation at vagrantup.com.
10+
11+
config.vm.hostname = "172.17.8.5"
12+
13+
# Every Vagrant virtual environment requires a box to build off of.
14+
config.vm.box = "b9centos"
15+
16+
# The url from where the 'config.vm.box' box will be fetched if it
17+
# doesn't already exist on the user's system.
18+
config.vm.box_url = "https://github.com/beyond9/b9centos/releases/download/v7.0.0/centos7-20141106.box"
19+
20+
# Assign this VM to a host-only network IP, allowing you to access it
21+
# via the IP. Host-only networks can talk to the host machine as well as
22+
# any other machines on the same network, but cannot be accessed (through this
23+
# network interface) by any external networks.
24+
config.vm.network :private_network, ip: "172.17.8.5"
25+
26+
# The path to the Berksfile to use with Vagrant Berkshelf
27+
# config.berkshelf.berksfile_path = "./Berksfile"
28+
29+
# Enabling the Berkshelf plugin. To enable this globally, add this configuration
30+
# option to your ~/.vagrant.d/Vagrantfile file
31+
config.berkshelf.enabled = true
32+
33+
# An array of symbols representing groups of cookbook described in the Vagrantfile
34+
# to exclusively install and copy to Vagrant's shelf.
35+
# config.berkshelf.only = []
36+
37+
# An array of symbols representing groups of cookbook described in the Vagrantfile
38+
# to skip installing and copying to Vagrant's shelf.
39+
# config.berkshelf.except = []
40+
41+
config.vm.provision :chef_solo do |chef|
42+
chef.json.merge!({
43+
:apache => {
44+
:sites_path => "/var/www",
45+
:server_port => "80",
46+
:listen_ports => ["80", "443"]
47+
},
48+
:percona => {
49+
:env => 'dev'
50+
},
51+
:passwords => {
52+
:root_password => '',
53+
:myadmin_password => '',
54+
:debian_password => '',
55+
:server_repl_password => ''
56+
}
57+
})
58+
59+
chef.add_recipe "b9apache::default"
60+
chef.add_recipe "b9apache::vagrant"
61+
chef.add_recipe "b9php::default"
62+
chef.add_recipe "b9php::pear"
63+
chef.add_recipe "b9php::oracle"
64+
chef.add_recipe "b9ruby::default"
65+
chef.add_recipe "b9mysql::default"
66+
chef.add_recipe "b9npm::default"
67+
chef.add_recipe "memcached"
68+
chef.add_recipe "sqlite"
69+
chef.add_recipe "sendmail"
70+
chef.add_recipe "b9base::default"
71+
end
72+
end

metadata.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name 'b9base'
2+
maintainer 'Chris Escalante'
3+
maintainer_email '[email protected]'
4+
license 'All rights reserved'
5+
description 'Installs/Configures Ruby'
6+
version '0.0.1'
7+
8+
depends 'rvm'
9+
depends 'yum'
10+
depends 'yum-epel'
11+
depends 'yum-percona'
12+
depends 'percona'
13+
depends 'mysql'
14+
depends 'b9php'
15+
depends 'b9ruby'
16+
depends 'b9apache'
17+
depends 'b9ruby'
18+
depends 'b9npm'
19+
depends 'memcached'
20+
depends 'sendmail'

readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# b9centos
2+
3+
Features:
4+
5+
* Cent OS 7
6+
* Ruby 2.1.4
7+
* PHP 5.6
8+
* Percona MySQL 5.5
9+

recipes/default.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
%w{mosh nano vim htop zip unzip ant subversion mc curl mod_ssl gawk}.each do |a_package|
2+
package a_package
3+
end
4+
5+
6+
service 'apache2' do
7+
service_name node['apache']['package']
8+
case node['platform_family']
9+
when 'rhel'
10+
reload_command '/sbin/service httpd restart'
11+
when 'debian'
12+
provider Chef::Provider::Service::Debian
13+
when 'arch'
14+
service_name 'httpd'
15+
end
16+
supports [:start, :restart, :reload, :status]
17+
action [:enable, :start]
18+
only_if "#{node['apache']['binary']} -t", :environment => { 'APACHE_LOG_DIR' => node['apache']['log_dir'] }, :timeout => 2
19+
end

0 commit comments

Comments
 (0)