bonethug 0.0.85 → 0.0.86

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e011de6a4f461c44bb45f6b4d27a950076268383
4
- data.tar.gz: a799228991e1bed3232d9b5b28d99ad5e94ee950
3
+ metadata.gz: 099992fb926a395cbd9ea09349d3eb1e69012143
4
+ data.tar.gz: 47a283b0caefd2db6736f27881b0d0fab770f2eb
5
5
  SHA512:
6
- metadata.gz: f3edc2ce1f25fe7e596e084baccf2892a69c519ff9fddb881c368dbf82fd05a96da1d2b402637095c3395c0a8c22a521f94493d8ac220da237296be3f8d90506
7
- data.tar.gz: f1aa85c544ce095790edd699087ed328b579eee4bbe2879251e59204525bf8ef2ac6b885b4358ad51855d7df1650cc8ccd0e55a5669b2f06795b29483ba56538
6
+ metadata.gz: 76ad25084325958dd0e8158a3ae933d47c1da434f00306b6537422241f1401e4112a67e5e06aedf556e266819485e809f6f55e140a74aabfcaa1060e1beec6c4
7
+ data.tar.gz: 6e1af7ba7d0afbce6315e42c84fea0a61f6120f2cc07518c19ba39dd2e166615118e3eb040746e709c0228737074296f839e994b95fc76651335887705fc050b
data/config/cnf.yml CHANGED
@@ -11,10 +11,19 @@ deploy:
11
11
  keep: 2
12
12
  environments:
13
13
  development:
14
+ os:
15
+ type: ubuntu
16
+ version: 14.04
14
17
  staging:
18
+ os:
19
+ type: ubuntu
20
+ version: 12.04
15
21
  domain: staging.domain.com
16
22
  default_branch: master
17
23
  production:
24
+ os:
25
+ type: ubuntu
26
+ version: 14.04
18
27
  domain: production.domain.com
19
28
  default_branch: stable
20
29
  dbs:
data/config/deploy.rb CHANGED
@@ -152,7 +152,7 @@ end
152
152
 
153
153
  desc "Sets up an environment"
154
154
  task :setup_env => :environment do
155
- Bonethug::Installer.get_setup_env_cmds.each do |cmd|
155
+ Bonethug::Installer.get_setup_env_cmds(env).each do |cmd|
156
156
  queue! %[#{cmd}]
157
157
  end
158
158
  end
data/lib/bonethug/cli.rb CHANGED
@@ -158,6 +158,14 @@ module Bonethug
158
158
  vh_cnf = conf.get 'vhost'
159
159
  vh_cnf = conf.get 'apache' unless vh_cnf
160
160
  vh_cnf = vh_cnf.get env
161
+
162
+ # exit if we have no env
163
+ unless vh_cnf
164
+ puts "unable to find vhost conf for " + env
165
+ exit
166
+ end
167
+
168
+ # get the conf path
161
169
  conf_path = vh_cnf.get('conf_path') || '/etc/apache2/sites-available'
162
170
 
163
171
  # load the appropriate config for the web server
@@ -171,20 +171,30 @@ module Bonethug
171
171
  # Reads system setup scripts
172
172
  # --------------------------
173
173
 
174
- def self.get_setup_script
175
- @@bonthug_gem_dir + '/scripts/ubuntu_setup.sh'
174
+ def self.get_setup_script(env)
175
+ exec_path = File.expand_path(path)
176
+ conf = Bonethug::Conf.new.add(exec_path + '/config/cnf.yml')
177
+ deploy = conf.node_merge 'deploy.common','deploy.environments.' + env
178
+ os_type = 'ubuntu'
179
+ os_version = ''
180
+ if os = deploy.get('os')
181
+ os_type = os.get('type') if os.get('type')
182
+ os_version = os.get('version') if os.get('version')
183
+ end
184
+ os_str = os_type + (os and os_version.to_s.length ? '-' + os_version.to_s : '')
185
+ @@bonthug_gem_dir + '/scripts/' + os_str
176
186
  end
177
187
 
178
- def self.get_setup_script_content
179
- File.read self.get_setup_script
188
+ def self.get_setup_script_content(env)
189
+ File.read self.get_setup_script(env)
180
190
  end
181
191
 
182
192
  def self.get_setup_env_cmds
183
- self.parse_sh self.get_setup_script_content
193
+ self.parse_sh self.get_setup_script_content(env)
184
194
  end
185
195
 
186
196
  def self.parse_sh(content)
187
- content.split("\n").select { |line| !(line =~ /^[\s\t]+$/ || line =~ /^[\s\t]*#/ || line.strip.length == 0) }
197
+ content.split("\n").select { |line| !(line =~ /^[\s\t]+$/ || line =~ /^[\s\t]*#/ || line.strip.length == 0) }
188
198
  end
189
199
 
190
200
  # ---------
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Bonethug
3
- VERSION = "0.0.85"
4
- BUILD_DATE = "2014-06-29 12:44:05 +1200"
3
+ VERSION = "0.0.86"
4
+ BUILD_DATE = "2014-07-21 10:44:28 +1200"
5
5
  end
6
6
 
data/scripts/npm-bower ADDED
@@ -0,0 +1,8 @@
1
+ # install npm
2
+ sudo apt-get update && sudo apt-get upgrade
3
+ sudo apt-get install g++ curl libssl-dev apache2-utils git-core
4
+ cd ~ && git clone git://github.com/ry/node.git
5
+ cd ~/node && ./configure && make && sudo make install
6
+
7
+ # install bower
8
+ sudo npm install bower -g
@@ -0,0 +1,259 @@
1
+ # /bin/bash
2
+
3
+ # -----------------------------------------------------
4
+ # install native stuff
5
+ # -----------------------------------------------------
6
+
7
+ # install the repo adding scripts
8
+ sudo apt-get install software-properties-common python-software-properties
9
+
10
+ # add repos
11
+ # sudo add-apt-repository ppa:richarvey/nodejs
12
+ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
13
+ sudo add-apt-repository "deb-src http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
14
+ sudo apt-add-repository ppa:brightbox/ruby-ng
15
+ sudo add-apt-repository ppa:ondrej/apache2
16
+ sudo add-apt-repository ppa:ondrej/php5
17
+ sudo add-apt-repository ppa:ondrej/mysql-5.6
18
+
19
+ # update
20
+ sudo apt-get update && sudo apt-get upgrade
21
+
22
+ # install
23
+
24
+ # dev headers
25
+ sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev libapr1-dev libaprutil1-dev ruby2.1-dev
26
+ sudo apt-get install libmysqlclient-dev libmagickwand-dev libsqlite3-dev libxml2-dev libxslt1-dev
27
+
28
+ # regular packages
29
+ sudo apt-get install apache2-mpm-worker
30
+ sudo apt-get install libapache2-mod-qos libapache2-mod-spamhaus libapache2-mod-fastcgi libapache2-mod-evasive
31
+ sudo apt-get install curl php5-fpm php5 php5-cli php5-curl php5-gd php5-imagick php-apc php5-mysql
32
+ sudo apt-get install mysql-server mysql-client sqlite3
33
+ sudo apt-get install imagemagick
34
+ sudo apt-get install phpmyadmin
35
+ sudo apt-get install sshpass
36
+ sudo apt-get install libxml2 g++
37
+ sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm
38
+
39
+
40
+ # -----------------------------------------------------
41
+ # Configure stuff
42
+ # -----------------------------------------------------
43
+
44
+ # unix socket
45
+ # echo "
46
+ # <IfModule mod_fastcgi.c>
47
+ # AddHandler php5-fcgi .php
48
+ # Action php5-fcgi /php5-fcgi
49
+ # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
50
+ # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
51
+ # </IfModule>
52
+ # " > /etc/apache2/conf.d/php-fpm.conf
53
+ # sed -i -e "s/listen = 127.0.0.1:9000/listen = \/var\/run\/php5-fpm.sock/g" /etc/php5/fpm/pool.d/www.conf
54
+
55
+ ## TCP
56
+ # echo "
57
+ # <IfModule mod_fastcgi.c>
58
+ # AddHandler php5-fcgi .php
59
+ # Action php5-fcgi /php5-fcgi
60
+ # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
61
+ # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization
62
+ # </IfModule>
63
+ # " > /etc/apache2/conf.d/php-fpm.conf
64
+ # sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
65
+
66
+ # php
67
+ sudo sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
68
+
69
+ # secure mysql install
70
+ sudo mysql_secure_installation
71
+
72
+ # node
73
+ sudo ln -s /usr/bin/node /usr/bin/nodejs
74
+
75
+ # ruby
76
+ update-alternatives --set gem /usr/bin/gem2.1
77
+ update-alternatives --set ruby /usr/bin/ruby2.1
78
+ # /bin/bash
79
+
80
+ # -----------------------------------------------------
81
+ # install native stuff
82
+ # -----------------------------------------------------
83
+
84
+ # install the repo adding scripts
85
+ sudo apt-get install software-properties-common python-software-properties
86
+
87
+ # add repos
88
+ # sudo add-apt-repository ppa:richarvey/nodejs
89
+ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
90
+ sudo add-apt-repository "deb-src http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
91
+ sudo apt-add-repository ppa:brightbox/ruby-ng
92
+ sudo add-apt-repository ppa:ondrej/apache2
93
+ sudo add-apt-repository ppa:ondrej/php5
94
+ sudo add-apt-repository ppa:ondrej/mysql-5.6
95
+
96
+ # update
97
+ sudo apt-get update && sudo apt-get upgrade
98
+
99
+ # install
100
+
101
+ # dev headers
102
+ sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev libapr1-dev libaprutil1-dev ruby2.1-dev
103
+ sudo apt-get install libmysqlclient-dev libmagickwand-dev libsqlite3-dev libxml2-dev libxslt1-dev
104
+
105
+ # regular packages
106
+ sudo apt-get install apache2-mpm-worker
107
+ sudo apt-get install libapache2-mod-qos libapache2-mod-spamhaus libapache2-mod-fastcgi libapache2-mod-evasive
108
+ sudo apt-get install curl php5-fpm php5 php5-cli php5-curl php5-gd php5-imagick php-apc php5-mysql
109
+ sudo apt-get install mysql-server mysql-client sqlite3
110
+ sudo apt-get install imagemagick
111
+ sudo apt-get install phpmyadmin
112
+ sudo apt-get install sshpass
113
+ sudo apt-get install libxml2 g++
114
+ sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm at
115
+
116
+
117
+ # -----------------------------------------------------
118
+ # Configure stuff
119
+ # -----------------------------------------------------
120
+
121
+ # unix socket
122
+ # echo "
123
+ # <IfModule mod_fastcgi.c>
124
+ # AddHandler php5-fcgi .php
125
+ # Action php5-fcgi /php5-fcgi
126
+ # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
127
+ # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
128
+ # </IfModule>
129
+ # " > /etc/apache2/conf.d/php-fpm.conf
130
+ # sed -i -e "s/listen = 127.0.0.1:9000/listen = \/var\/run\/php5-fpm.sock/g" /etc/php5/fpm/pool.d/www.conf
131
+
132
+ ## TCP
133
+ # echo "
134
+ # <IfModule mod_fastcgi.c>
135
+ # AddHandler php5-fcgi .php
136
+ # Action php5-fcgi /php5-fcgi
137
+ # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
138
+ # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization
139
+ # </IfModule>
140
+ # " > /etc/apache2/conf.d/php-fpm.conf
141
+ # sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
142
+
143
+ # php
144
+ sudo sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
145
+
146
+ # secure mysql install
147
+ sudo mysql_secure_installation
148
+
149
+ # node
150
+ sudo ln -s /usr/bin/node /usr/bin/nodejs
151
+
152
+ # ruby
153
+ update-alternatives --set gem /usr/bin/gem2.1
154
+ update-alternatives --set ruby /usr/bin/ruby2.1
155
+
156
+ # Apache
157
+ # ------
158
+
159
+ # config modules
160
+
161
+ # php fpm
162
+ sudo echo -e "<IfModule mod_fastcgi.c>\n AddHandler php5-fcgi .php\n Action php5-fcgi /php5-fcgi\n Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi\n FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization\n <Directory />\nRequire all granted\n </Directory>\n </IfModule>" > /etc/apache2/conf-available/php-fpm.conf
163
+ sudo a2enconf php-fpm.conf
164
+
165
+ # DDoS Protection
166
+ sudo mkdir -p /var/log/apache2/evasive
167
+ sudo chown -R www-data:root /var/log/apache2/evasive
168
+ sudo echo -e "<IfModule mod_spamhaus.c>\n DOSHashTableSize 2048\n DOSPageCount 20 # maximum number of requests for the same page\n DOSSiteCount 300 # total number of requests for any object by the same client IP on the same listener\n DOSPageInterval 1.0 # interval for the page count threshold\n DOSSiteInterval 1.0 # interval for the site count threshold\n DOSBlockingPeriod 10.0 # time that a client IP will be blocked for\n DOSLogDir “/var/log/apache2/evasive”\n DOSEmailNotify root@localhost\n</IfModule>" > /etc/apache2/conf-available/mod-evasive.conf
169
+ sudo a2enconf mod-evasive.conf
170
+
171
+ # DNS Injection
172
+ sudo touch /etc/spamhaus.wl
173
+ sudo echo -e "<IfModule mod_spamhaus.c>\n MS_METHODS POST,PUT,OPTIONS,CONNECT\n MS_WhiteList /etc/spamhaus.wl\n MS_CacheSize 256\n</IfModule>" > /etc/apache2/conf-available/spamhaus.conf
174
+ sudo a2enconf spamhauf.conf
175
+
176
+ # enable modules
177
+ sudo a2enmod actions fastcgi alias rewrite headers qos spamhaus evasive cache cache_disk
178
+
179
+ # phpmyadmin apache 2.4
180
+ sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
181
+ sudo a2enconf phpmyadmin.conf
182
+
183
+ # -----------------------------------------------------
184
+ # Install Gems
185
+ # -----------------------------------------------------
186
+
187
+ # install some gems - yes gem1.9.3 - wtf - use rbenv
188
+ # sudo gem1.9.3 install mina bundler whenever astrails-safe
189
+
190
+ # install passenger
191
+ sudo gem install passenger
192
+ sudo passenger-install-apache2-module
193
+ sudo touch /etc/apache2/mods-available/passenger.load
194
+ sudo touch /etc/apache2/mods-available/passenger.confc
195
+
196
+ # -----------------------------------------------------
197
+ # Node.js related
198
+ # -----------------------------------------------------
199
+
200
+ sudo npm install bower -g
201
+
202
+ # -----------------------------------------------------
203
+ # Restart stuff
204
+ # -----------------------------------------------------
205
+
206
+ sudo service apache2 restart
207
+ sudo service php5-fpm restart
208
+ # Apache
209
+ # ------
210
+
211
+ # config modules
212
+
213
+ # php fpm
214
+ sudo echo -e "<IfModule mod_fastcgi.c>\n AddHandler php5-fcgi .php\n Action php5-fcgi /php5-fcgi\n Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi\n FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization\n <Directory />\nRequire all granted\n </Directory>\n </IfModule>" > /etc/apache2/conf-available/php-fpm.conf
215
+ sudo a2enconf php-fpm.conf
216
+
217
+ # DDoS Protection
218
+ sudo mkdir -p /var/log/apache2/evasive
219
+ sudo chown -R www-data:root /var/log/apache2/evasive
220
+ sudo echo -e "<IfModule mod_spamhaus.c>\n DOSHashTableSize 2048\n DOSPageCount 20 # maximum number of requests for the same page\n DOSSiteCount 300 # total number of requests for any object by the same client IP on the same listener\n DOSPageInterval 1.0 # interval for the page count threshold\n DOSSiteInterval 1.0 # interval for the site count threshold\n DOSBlockingPeriod 10.0 # time that a client IP will be blocked for\n DOSLogDir “/var/log/apache2/evasive”\n DOSEmailNotify root@localhost\n</IfModule>" > /etc/apache2/conf-available/mod-evasive.conf
221
+ sudo a2enconf mod-evasive.conf
222
+
223
+ # DNS Injection
224
+ sudo touch /etc/spamhaus.wl
225
+ sudo echo -e "<IfModule mod_spamhaus.c>\n MS_METHODS POST,PUT,OPTIONS,CONNECT\n MS_WhiteList /etc/spamhaus.wl\n MS_CacheSize 256\n</IfModule>" > /etc/apache2/conf-available/spamhaus.conf
226
+ sudo a2enconf spamhauf.conf
227
+
228
+ # enable modules
229
+ sudo a2enmod actions fastcgi alias rewrite headers qos spamhaus evasive cache cache_disk
230
+
231
+ # phpmyadmin apache 2.4
232
+ sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
233
+ sudo a2enconf phpmyadmin.conf
234
+
235
+ # -----------------------------------------------------
236
+ # Install Gems
237
+ # -----------------------------------------------------
238
+
239
+ # install some gems - yes gem1.9.3 - wtf - use rbenv
240
+ # sudo gem1.9.3 install mina bundler whenever astrails-safe
241
+
242
+ # install passenger
243
+ sudo gem install passenger
244
+ sudo passenger-install-apache2-module
245
+ sudo touch /etc/apache2/mods-available/passenger.load
246
+ sudo touch /etc/apache2/mods-available/passenger.confc
247
+
248
+ # -----------------------------------------------------
249
+ # Node.js related
250
+ # -----------------------------------------------------
251
+
252
+ sudo npm install bower -g
253
+
254
+ # -----------------------------------------------------
255
+ # Restart stuff
256
+ # -----------------------------------------------------
257
+
258
+ sudo service apache2 restart
259
+ sudo service php5-fpm restart
@@ -0,0 +1,259 @@
1
+ # /bin/bash
2
+
3
+ # -----------------------------------------------------
4
+ # install native stuff
5
+ # -----------------------------------------------------
6
+
7
+ # install the repo adding scripts
8
+ sudo apt-get install software-properties-common python-software-properties
9
+
10
+ # add repos
11
+ # sudo add-apt-repository ppa:richarvey/nodejs
12
+ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
13
+ sudo add-apt-repository "deb-src http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
14
+ sudo apt-add-repository ppa:brightbox/ruby-ng
15
+ sudo add-apt-repository ppa:ondrej/apache2
16
+ sudo add-apt-repository ppa:ondrej/php5
17
+ sudo add-apt-repository ppa:ondrej/mysql-5.6
18
+
19
+ # update
20
+ sudo apt-get update && sudo apt-get upgrade
21
+
22
+ # install
23
+
24
+ # dev headers
25
+ sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev libapr1-dev libaprutil1-dev ruby2.1-dev
26
+ sudo apt-get install libmysqlclient-dev libmagickwand-dev libsqlite3-dev libxml2-dev libxslt1-dev
27
+
28
+ # regular packages
29
+ sudo apt-get install apache2-mpm-workery
30
+ sudo apt-get install libapache2-mod-qos libapache2-mod-spamhaus libapache2-mod-fastcgi libapache2-mod-evasive
31
+ sudo apt-get install curl php5-fpm php5 php5-cli php5-curl php5-gd php5-imagick php-apc php5-mysql
32
+ sudo apt-get install mysql-server mysql-client sqlite3
33
+ sudo apt-get install imagemagick
34
+ sudo apt-get install phpmyadmin
35
+ sudo apt-get install sshpass
36
+ sudo apt-get install libxml2 g++
37
+ sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm at
38
+
39
+
40
+ # -----------------------------------------------------
41
+ # Configure stuff
42
+ # -----------------------------------------------------
43
+
44
+ # unix socket
45
+ # echo "
46
+ # <IfModule mod_fastcgi.c>
47
+ # AddHandler php5-fcgi .php
48
+ # Action php5-fcgi /php5-fcgi
49
+ # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
50
+ # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
51
+ # </IfModule>
52
+ # " > /etc/apache2/conf.d/php-fpm.conf
53
+ # sed -i -e "s/listen = 127.0.0.1:9000/listen = \/var\/run\/php5-fpm.sock/g" /etc/php5/fpm/pool.d/www.conf
54
+
55
+ ## TCP
56
+ # echo "
57
+ # <IfModule mod_fastcgi.c>
58
+ # AddHandler php5-fcgi .php
59
+ # Action php5-fcgi /php5-fcgi
60
+ # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
61
+ # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization
62
+ # </IfModule>
63
+ # " > /etc/apache2/conf.d/php-fpm.conf
64
+ # sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
65
+
66
+ # php
67
+ sudo sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
68
+
69
+ # secure mysql install
70
+ sudo mysql_secure_installation
71
+
72
+ # node
73
+ sudo ln -s /usr/bin/node /usr/bin/nodejs
74
+
75
+ # ruby
76
+ update-alternatives --set gem /usr/bin/gem2.1
77
+ update-alternatives --set ruby /usr/bin/ruby2.1
78
+ # /bin/bash
79
+
80
+ # -----------------------------------------------------
81
+ # install native stuff
82
+ # -----------------------------------------------------
83
+
84
+ # install the repo adding scripts
85
+ sudo apt-get install software-properties-common python-software-properties
86
+
87
+ # add repos
88
+ # sudo add-apt-repository ppa:richarvey/nodejs
89
+ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
90
+ sudo add-apt-repository "deb-src http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
91
+ sudo apt-add-repository ppa:brightbox/ruby-ng
92
+ sudo add-apt-repository ppa:ondrej/apache2
93
+ sudo add-apt-repository ppa:ondrej/php5
94
+ sudo add-apt-repository ppa:ondrej/mysql-5.6
95
+
96
+ # update
97
+ sudo apt-get update && sudo apt-get upgrade
98
+
99
+ # install
100
+
101
+ # dev headers
102
+ sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev libapr1-dev libaprutil1-dev ruby2.1-dev
103
+ sudo apt-get install libmysqlclient-dev libmagickwand-dev libsqlite3-dev libxml2-dev libxslt1-dev
104
+
105
+ # regular packages
106
+ sudo apt-get install apache2-mpm-worker
107
+ sudo apt-get install libapache2-mod-qos libapache2-mod-spamhaus libapache2-mod-fastcgi libapache2-mod-evasive
108
+ sudo apt-get install curl php5-fpm php5 php5-cli php5-curl php5-gd php5-imagick php-apc php5-mysql
109
+ sudo apt-get install mysql-server mysql-client sqlite3
110
+ sudo apt-get install imagemagick
111
+ sudo apt-get install phpmyadmin
112
+ sudo apt-get install sshpass
113
+ sudo apt-get install libxml2 g++
114
+ sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm at
115
+
116
+
117
+ # -----------------------------------------------------
118
+ # Configure stuff
119
+ # -----------------------------------------------------
120
+
121
+ # unix socket
122
+ # echo "
123
+ # <IfModule mod_fastcgi.c>
124
+ # AddHandler php5-fcgi .php
125
+ # Action php5-fcgi /php5-fcgi
126
+ # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
127
+ # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
128
+ # </IfModule>
129
+ # " > /etc/apache2/conf.d/php-fpm.conf
130
+ # sed -i -e "s/listen = 127.0.0.1:9000/listen = \/var\/run\/php5-fpm.sock/g" /etc/php5/fpm/pool.d/www.conf
131
+
132
+ ## TCP
133
+ # echo "
134
+ # <IfModule mod_fastcgi.c>
135
+ # AddHandler php5-fcgi .php
136
+ # Action php5-fcgi /php5-fcgi
137
+ # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
138
+ # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization
139
+ # </IfModule>
140
+ # " > /etc/apache2/conf.d/php-fpm.conf
141
+ # sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
142
+
143
+ # php
144
+ sudo sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
145
+
146
+ # secure mysql install
147
+ sudo mysql_secure_installation
148
+
149
+ # node
150
+ sudo ln -s /usr/bin/node /usr/bin/nodejs
151
+
152
+ # ruby
153
+ update-alternatives --set gem /usr/bin/gem2.1
154
+ update-alternatives --set ruby /usr/bin/ruby2.1
155
+
156
+ # Apache
157
+ # ------
158
+
159
+ # config modules
160
+
161
+ # php fpm
162
+ sudo echo -e "<IfModule mod_fastcgi.c>\n AddHandler php5-fcgi .php\n Action php5-fcgi /php5-fcgi\n Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi\n FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization\n <Directory />\nRequire all granted\n </Directory>\n </IfModule>" > /etc/apache2/conf-available/php-fpm.conf
163
+ sudo a2enconf php-fpm.conf
164
+
165
+ # DDoS Protection
166
+ sudo mkdir -p /var/log/apache2/evasive
167
+ sudo chown -R www-data:root /var/log/apache2/evasive
168
+ sudo echo -e "<IfModule mod_spamhaus.c>\n DOSHashTableSize 2048\n DOSPageCount 20 # maximum number of requests for the same page\n DOSSiteCount 300 # total number of requests for any object by the same client IP on the same listener\n DOSPageInterval 1.0 # interval for the page count threshold\n DOSSiteInterval 1.0 # interval for the site count threshold\n DOSBlockingPeriod 10.0 # time that a client IP will be blocked for\n DOSLogDir “/var/log/apache2/evasive”\n DOSEmailNotify root@localhost\n</IfModule>" > /etc/apache2/conf-available/mod-evasive.conf
169
+ sudo a2enconf mod-evasive.conf
170
+
171
+ # DNS Injection
172
+ sudo touch /etc/spamhaus.wl
173
+ sudo echo -e "<IfModule mod_spamhaus.c>\n MS_METHODS POST,PUT,OPTIONS,CONNECT\n MS_WhiteList /etc/spamhaus.wl\n MS_CacheSize 256\n</IfModule>" > /etc/apache2/conf-available/spamhaus.conf
174
+ sudo a2enconf spamhauf.conf
175
+
176
+ # enable modules
177
+ sudo a2enmod actions fastcgi alias rewrite headers qos spamhaus evasive cache cache_disk
178
+
179
+ # phpmyadmin apache 2.4
180
+ sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
181
+ sudo a2enconf phpmyadmin.conf
182
+
183
+ # -----------------------------------------------------
184
+ # Install Gems
185
+ # -----------------------------------------------------
186
+
187
+ # install some gems - yes gem1.9.3 - wtf - use rbenv
188
+ # sudo gem1.9.3 install mina bundler whenever astrails-safe
189
+
190
+ # install passenger
191
+ sudo gem install passenger
192
+ sudo passenger-install-apache2-module
193
+ sudo touch /etc/apache2/mods-available/passenger.load
194
+ sudo touch /etc/apache2/mods-available/passenger.confc
195
+
196
+ # -----------------------------------------------------
197
+ # Node.js related
198
+ # -----------------------------------------------------
199
+
200
+ sudo npm install bower -g
201
+
202
+ # -----------------------------------------------------
203
+ # Restart stuff
204
+ # -----------------------------------------------------
205
+
206
+ sudo service apache2 restart
207
+ sudo service php5-fpm restart
208
+ # Apache
209
+ # ------
210
+
211
+ # config modules
212
+
213
+ # php fpm
214
+ sudo echo -e "<IfModule mod_fastcgi.c>\n AddHandler php5-fcgi .php\n Action php5-fcgi /php5-fcgi\n Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi\n FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization\n <Directory />\nRequire all granted\n </Directory>\n </IfModule>" > /etc/apache2/conf-available/php-fpm.conf
215
+ sudo a2enconf php-fpm.conf
216
+
217
+ # DDoS Protection
218
+ sudo mkdir -p /var/log/apache2/evasive
219
+ sudo chown -R www-data:root /var/log/apache2/evasive
220
+ sudo echo -e "<IfModule mod_spamhaus.c>\n DOSHashTableSize 2048\n DOSPageCount 20 # maximum number of requests for the same page\n DOSSiteCount 300 # total number of requests for any object by the same client IP on the same listener\n DOSPageInterval 1.0 # interval for the page count threshold\n DOSSiteInterval 1.0 # interval for the site count threshold\n DOSBlockingPeriod 10.0 # time that a client IP will be blocked for\n DOSLogDir “/var/log/apache2/evasive”\n DOSEmailNotify root@localhost\n</IfModule>" > /etc/apache2/conf-available/mod-evasive.conf
221
+ sudo a2enconf mod-evasive.conf
222
+
223
+ # DNS Injection
224
+ sudo touch /etc/spamhaus.wl
225
+ sudo echo -e "<IfModule mod_spamhaus.c>\n MS_METHODS POST,PUT,OPTIONS,CONNECT\n MS_WhiteList /etc/spamhaus.wl\n MS_CacheSize 256\n</IfModule>" > /etc/apache2/conf-available/spamhaus.conf
226
+ sudo a2enconf spamhauf.conf
227
+
228
+ # enable modules
229
+ sudo a2enmod actions fastcgi alias rewrite headers qos spamhaus evasive cache cache_disk
230
+
231
+ # phpmyadmin apache 2.4
232
+ sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
233
+ sudo a2enconf phpmyadmin.conf
234
+
235
+ # -----------------------------------------------------
236
+ # Install Gems
237
+ # -----------------------------------------------------
238
+
239
+ # install some gems - yes gem1.9.3 - wtf - use rbenv
240
+ # sudo gem1.9.3 install mina bundler whenever astrails-safe
241
+
242
+ # install passenger
243
+ sudo gem install passenger
244
+ sudo passenger-install-apache2-module
245
+ sudo touch /etc/apache2/mods-available/passenger.load
246
+ sudo touch /etc/apache2/mods-available/passenger.confc
247
+
248
+ # -----------------------------------------------------
249
+ # Node.js related
250
+ # -----------------------------------------------------
251
+
252
+ sudo npm install bower -g
253
+
254
+ # -----------------------------------------------------
255
+ # Restart stuff
256
+ # -----------------------------------------------------
257
+
258
+ sudo service apache2 restart
259
+ sudo service php5-fpm restart
@@ -33,7 +33,7 @@ sudo apt-get install imagemagick
33
33
  sudo apt-get install phpmyadmin
34
34
  sudo apt-get install sshpass
35
35
  sudo apt-get install libxml2 g++
36
- sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm
36
+ sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm at
37
37
 
38
38
 
39
39
  # -----------------------------------------------------
@@ -92,6 +92,13 @@ sudo passenger-install-apache2-module
92
92
  sudo touch /etc/apache2/mods-available/passenger.load
93
93
  sudo touch /etc/apache2/mods-available/passenger.confc
94
94
 
95
+ # -----------------------------------------------------
96
+ # PHP Tools
97
+ # -----------------------------------------------------
98
+
99
+ curl -sS https://getcomposer.org/installer | php
100
+ mv composer.phar /usr/local/bin/composer
101
+
95
102
  # -----------------------------------------------------
96
103
  # Node.js related
97
104
  # -----------------------------------------------------
@@ -31,7 +31,7 @@ sudo apt-get install imagemagick
31
31
  sudo apt-get install phpmyadmin
32
32
  sudo apt-get install sshpass
33
33
  sudo apt-get install libxml2 g++
34
- sudo apt-get install git ruby1.9.3 nodejs npm
34
+ sudo apt-get install git ruby1.9.3 nodejs npm at
35
35
 
36
36
 
37
37
  # -----------------------------------------------------
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "bonethug/drupal6-skel",
3
+ "version": "0.0.1",
4
+ "authors": [
5
+ "azt3k <breaks.nz@gmail.com>"
6
+ ],
7
+ "license": "MIT",
8
+ "private": true,
9
+ "dependencies": {
10
+ "jquery" : "~1.11",
11
+ "modernizr" : "~2.6.2",
12
+ "selectivizr" : "~1.0.2",
13
+ "respond" : "~1.3.0"
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "bonethug/drupal7-skel",
3
+ "version": "0.0.1",
4
+ "authors": [
5
+ "azt3k <breaks.nz@gmail.com>"
6
+ ],
7
+ "license": "MIT",
8
+ "private": true,
9
+ "dependencies": {
10
+ "jquery" : "~1.11",
11
+ "modernizr" : "~2.6.2",
12
+ "selectivizr" : "~1.0.2",
13
+ "respond" : "~1.3.0"
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "bonethug/drupal7-skel",
3
+ "version": "0.0.1",
4
+ "authors": [
5
+ "azt3k <breaks.nz@gmail.com>"
6
+ ],
7
+ "license": "MIT",
8
+ "private": true,
9
+ "dependencies": {
10
+ "jquery" : "~1.11",
11
+ "modernizr" : "~2.6.2",
12
+ "selectivizr" : "~1.0.2",
13
+ "respond" : "~1.3.0"
14
+ }
15
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bonethug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.85
4
+ version: 0.0.86
5
5
  platform: ruby
6
6
  authors:
7
7
  - azt3k
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-29 00:00:00.000000000 Z
11
+ date: 2014-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -339,9 +339,11 @@ files:
339
339
  - lib/init.rb
340
340
  - lib/tasks/bonethug.rake
341
341
  - scripts/mail
342
- - scripts/ubuntu-14.04-dev.sh
343
- - scripts/ubuntu_setup.sh
344
- - scripts/ubuntu_setup_2.4.sh
342
+ - scripts/npm-bower
343
+ - scripts/ubuntu-12.04
344
+ - scripts/ubuntu-14.04
345
+ - scripts/ubuntu-14.04-dev
346
+ - scripts/ubuntu.sh
345
347
  - skel/base/.gitignore
346
348
  - skel/base/Gemfile
347
349
  - skel/base/README.md
@@ -363,6 +365,7 @@ files:
363
365
  - skel/project_types/drupal/public/sites/default/settings.php
364
366
  - skel/project_types/drupal/public/sites/default/staging.settings.php
365
367
  - skel/project_types/drupal6/.gitignore
368
+ - skel/project_types/drupal6/bower.json
366
369
  - skel/project_types/drupal6/composer.json
367
370
  - skel/project_types/drupal6/drupal-console
368
371
  - skel/project_types/drupal6/lib/boris.php
@@ -374,6 +377,7 @@ files:
374
377
  - skel/project_types/drupal6/public/sites/default/settings.php
375
378
  - skel/project_types/drupal6/public/sites/default/staging.settings.php
376
379
  - skel/project_types/drupal7/.gitignore
380
+ - skel/project_types/drupal7/bower.json
377
381
  - skel/project_types/drupal7/composer.json
378
382
  - skel/project_types/drupal7/drupal-console
379
383
  - skel/project_types/drupal7/lib/boris.php
@@ -385,6 +389,7 @@ files:
385
389
  - skel/project_types/drupal7/public/sites/default/settings.php
386
390
  - skel/project_types/drupal7/public/sites/default/staging.settings.php
387
391
  - skel/project_types/drupal8/.gitignore
392
+ - skel/project_types/drupal8/bower.json
388
393
  - skel/project_types/drupal8/composer.json
389
394
  - skel/project_types/drupal8/drupal-console
390
395
  - skel/project_types/drupal8/lib/boris.php
@@ -1,130 +0,0 @@
1
- # /bin/bash
2
-
3
- # -----------------------------------------------------
4
- # install native stuff
5
- # -----------------------------------------------------
6
-
7
- # install the repo adding scripts
8
- sudo apt-get install software-properties-common python-software-properties
9
-
10
- # add repos
11
- # sudo add-apt-repository ppa:richarvey/nodejs
12
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
13
- sudo add-apt-repository "deb-src http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
14
- sudo apt-add-repository ppa:brightbox/ruby-ng
15
- sudo add-apt-repository ppa:ondrej/apache2
16
- sudo add-apt-repository ppa:ondrej/php5
17
- sudo add-apt-repository ppa:ondrej/mysql-5.6
18
-
19
- # update
20
- sudo apt-get update && sudo apt-get upgrade
21
-
22
- # install
23
-
24
- # dev headers
25
- sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev libapr1-dev libaprutil1-dev ruby2.1-dev
26
- sudo apt-get install libmysqlclient-dev libmagickwand-dev libsqlite3-dev libxml2-dev libxslt1-dev
27
-
28
- # regular packages
29
- sudo apt-get install apache2-mpm-worker
30
- sudo apt-get install libapache2-mod-qos libapache2-mod-spamhaus libapache2-mod-fastcgi libapache2-mod-evasive
31
- sudo apt-get install curl php5-fpm php5 php5-cli php5-curl php5-gd php5-imagick php-apc php5-mysql
32
- sudo apt-get install mysql-server mysql-client sqlite3
33
- sudo apt-get install imagemagick
34
- sudo apt-get install phpmyadmin
35
- sudo apt-get install sshpass
36
- sudo apt-get install libxml2 g++
37
- sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm
38
-
39
-
40
- # -----------------------------------------------------
41
- # Configure stuff
42
- # -----------------------------------------------------
43
-
44
- # unix socket
45
- # echo "
46
- # <IfModule mod_fastcgi.c>
47
- # AddHandler php5-fcgi .php
48
- # Action php5-fcgi /php5-fcgi
49
- # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
50
- # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
51
- # </IfModule>
52
- # " > /etc/apache2/conf.d/php-fpm.conf
53
- # sed -i -e "s/listen = 127.0.0.1:9000/listen = \/var\/run\/php5-fpm.sock/g" /etc/php5/fpm/pool.d/www.conf
54
-
55
- ## TCP
56
- # echo "
57
- # <IfModule mod_fastcgi.c>
58
- # AddHandler php5-fcgi .php
59
- # Action php5-fcgi /php5-fcgi
60
- # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
61
- # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization
62
- # </IfModule>
63
- # " > /etc/apache2/conf.d/php-fpm.conf
64
- # sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
65
-
66
- # php
67
- sudo sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
68
-
69
- # secure mysql install
70
- sudo mysql_secure_installation
71
-
72
- # node
73
- sudo ln -s /usr/bin/node /usr/bin/nodejs
74
-
75
- # ruby
76
- update-alternatives --set gem /usr/bin/gem2.1
77
- update-alternatives --set ruby /usr/bin/ruby2.1
78
-
79
- # Apache
80
- # ------
81
-
82
- # config modules
83
-
84
- # php fpm
85
- sudo echo -e "<IfModule mod_fastcgi.c>\n AddHandler php5-fcgi .php\n Action php5-fcgi /php5-fcgi\n Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi\n FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization\n <Directory />\nRequire all granted\n </Directory>\n </IfModule>" > /etc/apache2/conf-available/php-fpm.conf
86
- sudo a2enconf php-fpm.conf
87
-
88
- # DDoS Protection
89
- sudo mkdir -p /var/log/apache2/evasive
90
- sudo chown -R www-data:root /var/log/apache2/evasive
91
- sudo echo -e "<IfModule mod_spamhaus.c>\n DOSHashTableSize 2048\n DOSPageCount 20 # maximum number of requests for the same page\n DOSSiteCount 300 # total number of requests for any object by the same client IP on the same listener\n DOSPageInterval 1.0 # interval for the page count threshold\n DOSSiteInterval 1.0 # interval for the site count threshold\n DOSBlockingPeriod 10.0 # time that a client IP will be blocked for\n DOSLogDir “/var/log/apache2/evasive”\n DOSEmailNotify root@localhost\n</IfModule>" > /etc/apache2/conf-available/mod-evasive.conf
92
- sudo a2enconf mod-evasive.conf
93
-
94
- # DNS Injection
95
- sudo touch /etc/spamhaus.wl
96
- sudo echo -e "<IfModule mod_spamhaus.c>\n MS_METHODS POST,PUT,OPTIONS,CONNECT\n MS_WhiteList /etc/spamhaus.wl\n MS_CacheSize 256\n</IfModule>" > /etc/apache2/conf-available/spamhaus.conf
97
- sudo a2enconf spamhauf.conf
98
-
99
- # enable modules
100
- sudo a2enmod actions fastcgi alias rewrite headers qos spamhaus evasive cache cache_disk
101
-
102
- # phpmyadmin apache 2.4
103
- sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
104
- sudo a2enconf phpmyadmin.conf
105
-
106
- # -----------------------------------------------------
107
- # Install Gems
108
- # -----------------------------------------------------
109
-
110
- # install some gems - yes gem1.9.3 - wtf - use rbenv
111
- # sudo gem1.9.3 install mina bundler whenever astrails-safe
112
-
113
- # install passenger
114
- sudo gem install passenger
115
- sudo passenger-install-apache2-module
116
- sudo touch /etc/apache2/mods-available/passenger.load
117
- sudo touch /etc/apache2/mods-available/passenger.confc
118
-
119
- # -----------------------------------------------------
120
- # Node.js related
121
- # -----------------------------------------------------
122
-
123
- sudo npm install bower -g
124
-
125
- # -----------------------------------------------------
126
- # Restart stuff
127
- # -----------------------------------------------------
128
-
129
- sudo service apache2 restart
130
- sudo service php5-fpm restart