Skip to content

Commit 0749b9a

Browse files
committed
initial release of dkdeploy-php v7.0.0
0 parents  commit 0749b9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1295
-0
lines changed

.gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
*.gem
2+
*.rbc
3+
.bundle
4+
.config
5+
.yardoc
6+
InstalledFiles
7+
_yardoc
8+
coverage
9+
doc/
10+
lib/bundler/man
11+
pkg
12+
rdoc
13+
spec/reports
14+
test/tmp
15+
test/version_tmp
16+
tmp
17+
.rakeTasks
18+
.vagrant
19+
Gemfile.lock

.rubocop.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
AllCops:
2+
Exclude:
3+
- 'tmp/**/*'
4+
- 'spec/fixtures/application/htdocs/stylesheets/**/config.rb'
5+
- 'Vagrantfile'
6+
- 'config/**/*'
7+
GlobalVars:
8+
AllowedVariables: []
9+
MethodLength:
10+
Max: 25
11+
LineLength:
12+
Max: 200
13+
SpecialGlobalVars:
14+
Enabled: false
15+
BracesAroundHashParameters:
16+
Enabled: false
17+
CyclomaticComplexity:
18+
Max: 10
19+
Metrics/AbcSize:
20+
Max: 30
21+
Style/SignalException:
22+
EnforcedStyle: only_raise

.travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sudo: false
2+
language: ruby
3+
cache: bundler
4+
rvm:
5+
- 2.1
6+
- 2.2
7+
8+
before_install:
9+
- gem install bundler --version 1.12.5 --no-document
10+
11+
script:
12+
- bundle exec rubocop

Berksfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://supermarket.chef.io'
2+
3+
cookbook 'dkdeploy-php', path: 'config/vm/cookbooks/dkdeploy-php'

Berksfile.lock

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
DEPENDENCIES
2+
dkdeploy-php
3+
path: config/vm/cookbooks/dkdeploy-php
4+
5+
GRAPH
6+
apache2 (3.2.2)
7+
apt (3.0.0)
8+
build-essential (3.2.0)
9+
seven_zip (>= 0.0.0)
10+
chef-sugar (3.3.0)
11+
chef_handler (1.3.0)
12+
database (5.1.2)
13+
postgresql (>= 1.0.0)
14+
dkdeploy-php (1.0.0)
15+
apache2 (~> 3.2)
16+
apt (~> 3.0)
17+
database (~> 5.1)
18+
mysql (~> 6.1)
19+
mysql2_chef_gem (~> 1.0)
20+
php (~> 1.9)
21+
iis (4.1.7)
22+
windows (>= 1.34.6)
23+
mariadb (0.3.1)
24+
apt (>= 0.0.0)
25+
yum (>= 0.0.0)
26+
yum-epel (>= 0.0.0)
27+
mysql (6.1.3)
28+
smf (>= 0.0.0)
29+
yum-mysql-community (>= 0.0.0)
30+
mysql2_chef_gem (1.1.0)
31+
build-essential (>= 0.0.0)
32+
mariadb (>= 0.0.0)
33+
mysql (>= 6.0)
34+
openssl (4.4.0)
35+
chef-sugar (>= 3.1.1)
36+
php (1.9.0)
37+
build-essential (>= 0.0.0)
38+
iis (>= 0.0.0)
39+
mysql (>= 6.0.0)
40+
windows (>= 1.39.1)
41+
xml (>= 0.0.0)
42+
yum-epel (>= 0.0.0)
43+
postgresql (4.0.6)
44+
apt (>= 1.9.0)
45+
build-essential (>= 0.0.0)
46+
openssl (~> 4.0)
47+
rbac (1.0.3)
48+
seven_zip (2.0.0)
49+
windows (>= 1.2.2)
50+
smf (2.2.8)
51+
rbac (>= 1.0.1)
52+
windows (1.40.0)
53+
chef_handler (>= 0.0.0)
54+
xml (2.0.0)
55+
build-essential (>= 0.0.0)
56+
chef-sugar (>= 0.0.0)
57+
yum (3.10.0)
58+
yum-epel (0.7.0)
59+
yum (>= 3.6.3)
60+
yum-mysql-community (0.2.0)
61+
yum (>= 3.2)

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
This project adheres to [Semantic Versioning](http://semver.org/).
4+
5+
## [7.0.0] - 2016-07-01
6+
### Summary
7+
8+
- first public release
9+
10+
[Unreleased]: https://github.com/dkdeploy/dkdeploy-php/compare/master...develop
11+
[7.0.0]: https://github.com/dkdeploy/dkdeploy-php/releases/tag/v7.0.0

CONTRIBUTORS.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# dkdeploy CONTRIBUTORS
2+
3+
The dkdeploy core maintainers would like to recognize following contributors (in alphabetic order):
4+
5+
- Sascha Egerer
6+
- Christoph Gerold
7+
- Johannes Goslar
8+
- Kieran Hayes
9+
- Wilfried Irßlinger
10+
- Thomas Jahnke
11+
- Gleb Levitin
12+
- Luka Lüdicke
13+
- Nicolai Reuschling
14+
- Lars Tode
15+
- Timo Webler
16+
- Mike Zaschka

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec

LICENSE

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) 2014-2016 dkd Internet Service GmbH, Frankfurt am Main (Germany), https://dkd.de/
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Dkdeploy::Php
2+
3+
[![Build Status](https://api.travis-ci.org/dkdeploy/dkdeploy-php.svg?branch=master)](https://travis-ci.org/repositories/dkdeploy/dkdeploy-php)
4+
[![Gem Version](https://badge.fury.io/rb/dkdeploy-php.svg)](https://badge.fury.io/rb/dkdeploy-php) [![Inline docs](http://inch-ci.org/github/dkdeploy/dkdeploy-php.svg?branch=master)](http://inch-ci.org/github/dkdeploy/dkdeploy-php)
5+
6+
## Description
7+
8+
This Rubygem `dkdeploy-php` ruby gem represents the extension of [Capistrano](http://capistranorb.com/) tasks directed to the advanced deployment process.
9+
10+
## Installation
11+
12+
Add this line to your application's `Gemfile`
13+
14+
gem 'dkdeploy-php', '~> 7.0'
15+
16+
and then execute
17+
18+
bundle install
19+
20+
or install it yourself as
21+
22+
gem install dkdeploy-php
23+
24+
## Usage
25+
26+
Run in your project root
27+
28+
cap install STAGES='dev,integration,testing,production'
29+
30+
This command will create the following Capistrano file structure with all the standard pre-configured constants.
31+
Please be aware of the difference to the [native installation](http://capistranorb.com/documentation/getting-started/preparing-your-application/) of Capistrano.
32+
Certainly you have to adjust `config/deploy.rb` and respective stages and customize them for your needs.
33+
34+
<pre>
35+
├── Capfile
36+
└── config
37+
├── deploy
38+
│ ├── dev.rb
39+
│ ├── integration.rb
40+
│ ├── testing.rb
41+
│ └── production.rb
42+
└── deploy.rb
43+
</pre>
44+
45+
As next you have to append the following line to the `Capfile` in order to make use of dkdeploy extensions in addition to the standard Capistrano tasks:
46+
47+
require 'capistrano/dkdeploy/php'
48+
49+
To convince yourself, that Capistrano tasks list has been extended, please run
50+
51+
cap -T
52+
53+
Please note, that dkdeploy uses the local copy strategy and overwrites the `:scm` constant. If you want to use it,
54+
you should do nothing more. However if you want to change it for example to `:git`, please add the following line to `deploy.rb`
55+
56+
set :scm, :git
57+
58+
For more information about available Capistrano constants please use the [Capistrano documentation](http://capistranorb.com/documentation/getting-started/preparing-your-application/).
59+
The complete list of the dkdeploy-php constants you find in `/lib/capistrano/dkdeploy/php.rb`.
60+
61+
## Testing
62+
63+
### Prerequisite
64+
65+
Vagrant `landrush` plugin is needed. If there are issues, make sure that the following IPv4 address is used for this domain
66+
67+
192.168.156.181 dkdeploy-php.dev
68+
69+
### Running tests
70+
71+
1. Starting the local box (`vagrant up --provision`)
72+
2. Checking coding styles (`rubocop`)
73+
3. Running BDD cucumber tests (`cucumber`)
74+
75+
## Contributing
76+
77+
1. Install [git flow](https://github.com/nvie/gitflow)
78+
2. If project is not checked out already do git clone `git@github.com:dkdeploy/dkdeploy-php.git`
79+
3. Checkout origin develop branch (`git checkout --track -b develop origin/develop`)
80+
4. Git flow initialze `git flow init -d`
81+
5. Installing gems `bundle install`
82+
6. Create new feature branch (`git flow feature start my-new-feature`)
83+
7. Run tests (README.md Testing)
84+
8. Commit your changes (`git commit -am 'Add some feature'`)

Rakefile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
task default: :spec
2+
require 'bundler/gem_tasks'
3+
4+
require 'rspec/core/rake_task'
5+
RSpec::Core::RakeTask.new

Vagrantfile

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
unless Vagrant.has_plugin?('vagrant-berkshelf')
2+
puts "Please install vagrant plugin vagrant-berkshelfs first\n"
3+
puts " vagrant plugin install vagrant-berkshelf\n\n"
4+
puts "Exit vagrant\n\n"
5+
abort
6+
end
7+
8+
unless Vagrant.has_plugin?('vagrant-omnibus')
9+
puts "Please install vagrant plugin vagrant-omnibus first\n"
10+
puts " vagrant plugin install vagrant-omnibus\n\n"
11+
puts "Exit vagrant\n\n"
12+
abort
13+
end
14+
15+
Vagrant.require_version '>= 1.8.1'
16+
chef_version = '12.9.41'
17+
18+
Vagrant.configure('2') do |config|
19+
domain = 'dkdeploy-php.dev'
20+
domain_second = 'second-dkdeploy-php.dev'
21+
ip_address = '192.168.156.181'
22+
23+
config.vm.box = 'ubuntu/trusty64'
24+
config.vm.box_check_update = false
25+
config.berkshelf.enabled = true
26+
config.omnibus.chef_version = chef_version
27+
28+
config.vm.define('dkdeploy-php', primary: true) do |master_config|
29+
master_config.vm.network 'private_network', ip: ip_address
30+
31+
# Chef settings
32+
master_config.vm.provision :chef_solo do |chef|
33+
chef.version = chef_version
34+
chef.install = false # omnibus does it already
35+
chef.log_level = :info
36+
chef.add_recipe 'dkdeploy-php'
37+
chef.json = {}
38+
end
39+
40+
# Memory limit and name of VirtualBox
41+
master_config.vm.provider 'virtualbox' do |virtualbox|
42+
virtualbox.name = domain
43+
virtualbox.gui = ENV['ENABLE_GUI_MODE'] && (ENV['ENABLE_GUI_MODE'] =~ /^(true|yes|y|1)$/i ? true : false)
44+
virtualbox.customize [
45+
'modifyvm', :id,
46+
'--natdnsproxy1', 'off',
47+
'--natdnshostresolver1', 'on',
48+
'--memory', '1024',
49+
'--name', 'dkdeploy-php'
50+
]
51+
end
52+
end
53+
54+
if Vagrant.has_plugin?('landrush')
55+
config.landrush.enabled = true
56+
config.landrush.guest_redirect_dns = false
57+
config.landrush.tld = 'dev'
58+
config.landrush.host domain, ip_address
59+
config.landrush.host domain_second, ip_address
60+
else
61+
config.vm.post_up_message = "Either install Vagrant plugin 'landrush' or add this entry to your host file: #{ip_address} #{domain} #{domain_second}"
62+
end
63+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
default['apache']['mpm'] = 'prefork'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name 'dkdeploy-php'
2+
maintainer 'dkd Internet Service GmbH'
3+
license 'MIT'
4+
description 'Project cookbook'
5+
version '1.0'
6+
7+
depends 'mysql', '~> 6.1'
8+
depends 'mysql2_chef_gem', '~> 1.0'
9+
depends 'database', '~> 5.1'
10+
depends 'apache2', '~> 3.2'
11+
depends 'php', '~> 1.9'
12+
depends 'apt', '~> 3.0'

0 commit comments

Comments
 (0)