bonethug 0.0.83 → 0.0.84

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,25 +2,56 @@ Bonethug
2
2
  ========
3
3
 
4
4
 
5
+ What is Bonethug?
6
+ -----------------
5
7
 
6
- (Project) Bones in the basement and a thug to do the things you don't want to
7
- dirty your hands with.
8
-
9
-
8
+ Bone thung arose because I got sick of doing the same things over and over again and I needed some ways to enforce consistency in terms of deployment, backup and configurartion between various web PHP, Ruby, HTML and Javascript projects.
10
9
 
11
10
  Bonethug could loosely be considered a "web project meta framework". It uses a
12
- single configuration file (although it merges in the database.yml file for rails
13
- projects) for all project types and includes adapters to interface with project
14
- specific configs. This keeps you configuration in one place and has the benefit
11
+ single yml configuration file and includes adapters to interface with project
12
+ specific configs. This keeps your configuration in one place and has the benefit
15
13
  of being able to drive the automation of a number of other repeatitious taks
16
- like deployment, task scheduling, backups and asset / db synchronisation.
14
+ like deployment, task scheduling, asset optimisation, backups and asset / db synchronisation.
17
15
 
16
+ The goal of the project is to be able to handle the complete project life cycle
17
+ using only bonethug, git and package managers - no manual ssh, ftp, mysqldump etc.
18
18
 
19
19
 
20
- The goal of the project is to be able to handle the complete project life cycle
21
- using only bonethug, git and package managers - no ssh, ftp, mysqldump etc.
20
+ What does bonethug support?
21
+ ---------------------------
22
+
23
+ Currently we support Silverstripe 3, Drupal 7, Rails 4, Generic PHP, Static HTML and EDMs.
24
+
25
+ We are aiming to provide more complete support for Drupal 6, Wordpress, Rails 3 and Express / NodeJS. There will of course be other skeletons added down the line, but I dont really know what they might be at this point.
26
+
27
+
28
+ Why not use Yeoman / Grunt or something similar?
29
+ ------------------------------------------------
30
+
31
+ If you need a single language solution this is not it. Yeoman and Grunt are great if you want to work with only javascript and do 60% of the job. The goal with this project is to offer an end to end solution for automating most of the tasks you would do in a project life cylce using open source software.
32
+
33
+ Requirements
34
+ ------------
35
+
36
+ This works 100% on Ubuntu 14.04 and possibly other debian based linux distributions. Most of the functionality will work well on other Unix like OSes as long as you have pre-installed apache, mysql, ruby, nodejs and if required php (and their executables are availble in your PATH). Most of the functionality will work on windows, but in particular deploy will not work.
37
+
38
+ # OS
39
+
40
+ ## Development
41
+
42
+ - OSX (with manual dependency install)
43
+ - Windows (partial with manual dependency install)
44
+ - Ubuntu 14.04 (100%) and possibly other debian based Linux distributions
45
+
46
+ ## Deployment
47
+
48
+ - Ubuntu 14.04
49
+ - Partial support for Ubuntu 12.04+
22
50
 
51
+ # Software - if you are on ubuntu you can run the setup script and ur good to go
23
52
 
53
+ - Ruby / Bundler
54
+ - Node JS / NPM
24
55
 
25
56
  Installation
26
57
  ------------
@@ -283,7 +314,11 @@ What isn't implemented yet?
283
314
  - sync of just files between envs
284
315
  - remove a deployment from a target
285
316
  - support for more project types
286
- - support for other OSes
317
+ - support for more deployment OSes
318
+ - update dependencies
319
+ - setup env support for OSes other than ubuntu
320
+ - watch on windows
321
+ - deploy on windows (mina fork and rewrite)
287
322
  - support for nginx
288
323
 
289
324
 
@@ -261,7 +261,8 @@ module Bonethug
261
261
  if mode == :update
262
262
  system 'bundle update bonethug'
263
263
  else
264
- system 'bundle install bonethug'
264
+ system 'bundle init'
265
+ system 'bundle install'
265
266
  end
266
267
 
267
268
  # kill this process and run the next step as a new process
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Bonethug
3
- VERSION = "0.0.83"
4
- BUILD_DATE = "2014-06-14 11:26:12 +1200"
3
+ VERSION = "0.0.84"
4
+ BUILD_DATE = "2014-06-29 12:05:57 +1200"
5
5
  end
6
6
 
@@ -11,6 +11,7 @@ sudo apt-get install software-properties-common python-software-properties
11
11
  # sudo add-apt-repository ppa:richarvey/nodejs
12
12
  sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
13
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
14
15
  sudo add-apt-repository ppa:ondrej/apache2
15
16
  sudo add-apt-repository ppa:ondrej/php5
16
17
  sudo add-apt-repository ppa:ondrej/mysql-5.6
@@ -21,7 +22,7 @@ sudo apt-get update && sudo apt-get upgrade
21
22
  # install
22
23
 
23
24
  # dev headers
24
- sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev libapr1-dev libaprutil1-dev
25
+ sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev libapr1-dev libaprutil1-dev ruby2.1-dev
25
26
  sudo apt-get install libmysqlclient-dev libmagickwand-dev libsqlite3-dev libxml2-dev libxslt1-dev
26
27
 
27
28
  # regular packages
@@ -32,7 +33,7 @@ sudo apt-get install imagemagick
32
33
  sudo apt-get install phpmyadmin
33
34
  sudo apt-get install sshpass
34
35
  sudo apt-get install libxml2 g++
35
- sudo apt-get install git ruby1.9.3 wkhtmltopdf nodejs npm
36
+ sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm
36
37
 
37
38
 
38
39
  # -----------------------------------------------------
@@ -62,12 +63,12 @@ sudo apt-get install git ruby1.9.3 wkhtmltopdf nodejs npm
62
63
  # sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
63
64
 
64
65
  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
65
- # 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 </IfModule>" > /etc/apache2/conf.d/php-fpm.conf
66
-
67
- #apache2.4
68
66
  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
69
67
  sudo a2enconf php-fpm.conf
70
68
 
69
+ # node
70
+ sudo ln -s /usr/bin/node /usr/bin/nodejs
71
+
71
72
  # Apache
72
73
  # ------
73
74
 
@@ -86,7 +87,6 @@ sudo a2enconf phpmyadmin.conf
86
87
  # sudo gem1.9.3 install mina bundler whenever astrails-safe
87
88
 
88
89
  # install passenger
89
- # sudo gem1.9.3 install passenger
90
90
  sudo gem install passenger
91
91
  sudo passenger-install-apache2-module
92
92
  sudo touch /etc/apache2/mods-available/passenger.load
@@ -63,10 +63,6 @@ sudo apt-get install git ruby1.9.3 nodejs npm
63
63
  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
64
64
  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 -appConnTimeout 900 -idle-timeout 900 -pass-header Authorization\n </IfModule>" > /etc/apache2/conf.d/php-fpm.conf
65
65
 
66
- #apache2.4
67
- 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 -appConnTimeout 900 -idle-timeout 900 -pass-header Authorization\n <Directory />\nRequire all granted\n </Directory>\n </IfModule>" > /etc/apache2/conf-available/php-fpm.conf
68
- sudo a2enconf php-fpm.conf
69
-
70
66
  # Apache
71
67
  # ------
72
68
 
@@ -11,6 +11,7 @@ sudo apt-get install software-properties-common python-software-properties
11
11
  # sudo add-apt-repository ppa:richarvey/nodejs
12
12
  sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
13
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
14
15
  sudo add-apt-repository ppa:ondrej/apache2
15
16
  sudo add-apt-repository ppa:ondrej/php5
16
17
  sudo add-apt-repository ppa:ondrej/mysql-5.6
@@ -21,18 +22,19 @@ sudo apt-get update && sudo apt-get upgrade
21
22
  # install
22
23
 
23
24
  # dev headers
24
- sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev libapr1-dev libaprutil1-dev
25
+ sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev libapr1-dev libaprutil1-dev ruby2.1-dev
25
26
  sudo apt-get install libmysqlclient-dev libmagickwand-dev libsqlite3-dev libxml2-dev libxslt1-dev
26
27
 
27
28
  # regular packages
28
29
  sudo apt-get install apache2-mpm-worker
29
- sudo apt-get install curl libapache2-mod-fastcgi php5-fpm php5 php5-cli php5-curl php5-gd php5-imagick php-apc php5-mysql
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
30
32
  sudo apt-get install mysql-server mysql-client sqlite3
31
33
  sudo apt-get install imagemagick
32
34
  sudo apt-get install phpmyadmin
33
35
  sudo apt-get install sshpass
34
36
  sudo apt-get install libxml2 g++
35
- sudo apt-get install git ruby1.9.3 wkhtmltopdf nodejs npm
37
+ sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm
36
38
 
37
39
 
38
40
  # -----------------------------------------------------
@@ -61,21 +63,41 @@ sudo apt-get install git ruby1.9.3 wkhtmltopdf nodejs npm
61
63
  # " > /etc/apache2/conf.d/php-fpm.conf
62
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
63
65
 
66
+ # php
64
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
65
- # 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 </IfModule>" > /etc/apache2/conf.d/php-fpm.conf
66
68
 
67
- #apache2.4
68
- 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
69
- sudo a2enconf php-fpm.conf
69
+ # secure mysql install
70
+ sudo mysql_secure_installation
71
+
72
+ # node
73
+ sudo ln -s /usr/bin/node /usr/bin/nodejs
70
74
 
71
- # symlink node to nodejs
72
- sudo ln -s /usr/bin/nodejs /usr/bin/node
75
+ # ruby
76
+ update-alternatives --set gem /usr/bin/gem2.1
77
+ update-alternatives --set ruby /usr/bin/ruby2.1
73
78
 
74
79
  # Apache
75
80
  # ------
76
81
 
77
- # modules
78
- sudo a2enmod actions fastcgi alias rewrite headers
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
79
101
 
80
102
  # phpmyadmin apache 2.4
81
103
  sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
@@ -89,11 +111,10 @@ sudo a2enconf phpmyadmin.conf
89
111
  # sudo gem1.9.3 install mina bundler whenever astrails-safe
90
112
 
91
113
  # install passenger
92
- # sudo gem1.9.3 install passenger
93
114
  sudo gem install passenger
94
115
  sudo passenger-install-apache2-module
95
116
  sudo touch /etc/apache2/mods-available/passenger.load
96
- sudo touch /etc/apache2/mods-available/passenger.conf
117
+ sudo touch /etc/apache2/mods-available/passenger.confc
97
118
 
98
119
  # -----------------------------------------------------
99
120
  # Node.js related
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bonethug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.83
4
+ version: 0.0.84
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-13 00:00:00.000000000 Z
12
+ date: 2014-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler