Skip to content

Commit

Permalink
Merge pull request #11 from ytake/feature/multiple-php-version
Browse files Browse the repository at this point in the history
Added php7.0, 7.1, 7.2 / Apache Spark, Cassandra, Kafka
  • Loading branch information
ytake authored Dec 27, 2017
2 parents c03b990 + 904e84d commit ac7a095
Show file tree
Hide file tree
Showing 22 changed files with 622 additions and 77 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/vendor
vagrant.yaml
vagrant.json
composer.lock
120 changes: 107 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Gardening

pre-packaged Vagrant box that provides you a wonderful development environment
without requiring you to install PHP(7.0), HHVM(3.15), a web server(Nginx or Apache),
without requiring you to install PHP(7.0 ~ 7.2), a web server(Nginx or Apache),
and any other server software on your local machine.

php7 box:
```json
"require-dev": {
"ytake/gardening": "~0.0"
"ytake/gardening": "~1.0"
}
```

Expand All @@ -24,18 +24,23 @@ https://atlas.hashicorp.com/ytake
- Nginx (1.12)
- MySQL (5.7)
- Sqlite3
- PostgreSQL (9.5)
- PostgreSQL (10.1)
- Composer (1.5)
- Node.js (Gulp, webpack)
- Redis(4.0)
- Memcached
- Elasticsearch(5.6)
- Kibana(5.6)
- Elasticsearch(6.1)
- Kibana(6.1)
- MongoDB
- Java(1.8)
- fluentd
- Couchbase(4.5)

- beanstalkd(1.10)
- RabbitMQ(3.7.2)
- Apache Cassandra(3.11)
- Apache Spark(2.2.1)
- Apache Kafka(1.0.0 / Confluent Platform)

## included php extensions

```
Expand All @@ -61,16 +66,19 @@ filter
ftp
gd
gettext
gmp
hash
iconv
igbinary
imagick
intl
json
ldap
libsodium
libxml
mbstring
mcrypt
memcached
memprof
mongodb
msgpack
mysqli
Expand Down Expand Up @@ -99,9 +107,12 @@ shmop
SimpleXML
soap
sockets
sodium
solr
SPL
sqlite3
sqlsrv
ssh2
standard
Stomp
sysvmsg
Expand All @@ -115,8 +126,10 @@ xdebug
xhprof
xml
xmlreader
xmlrpc
xmlwriter
xsl
yaml
Zend OPcache
zip
zlib
Expand All @@ -133,7 +146,7 @@ included:
- squizlabs/php_codesniffer
- phpmd/phpmd

## MySQL and PostgreSQL
## MySQL and PostgreSQL, RabbitMQ
- user: gardening
- password: 00:secreT,@

Expand All @@ -142,11 +155,28 @@ default:
```
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.remote_port = 9080
xdebug.max_nesting_level = 512
xdebug.idekey = PHPSTORM
```

### php7.0

```
xdebug.remote_port = 9070
```

### php7.1

```
xdebug.remote_port = 9071
```

### php7.2

```
xdebug.remote_port = 9072
```

## Install Gardening Box

### case 1, your "home" directory
Expand Down Expand Up @@ -195,6 +225,15 @@ Apache can be selected if necessary
web_server: httpd
```
### Choose PHP version
default PHP7.2
```yaml
php-alternatives: "7.1"
```
(7.0 or 7.1 or 7.2)
### Configuring Shared Folders
```yaml
Expand All @@ -215,14 +254,14 @@ folders:
### Configuring Sites
```yaml
sites:
- map: gardening.app
- map: gardening.app.vagrant
to: /home/vagrant/yourProject/public
```
many sites:
```yaml
sites:
- map: gardening.app
- map: gardening.app.vagrant
to: /home/vagrant/yourProject/public
- map: gardening.second.app
to: /home/vagrant/yourSecondProject/public
Expand All @@ -231,11 +270,25 @@ sites:
use symfony by setting the type option:
```yaml
sites:
- map: gardening.app
- map: gardening.app.vagrant
to: /home/vagrant/yourProject/public
type: symfony
```
**symfony: symfony2, 3 / symfony4: symfony4**
#### Multiple PHP Versions
```yaml
sites:
- map: gardening.app.vagrant
to: /home/vagrant/yourProject/public
php: "7.1"
- map: gardening.second.app
to: /home/vagrant/yourSecondProject/public
php: "7.2"
```
### Optional
#### Fluentd
Expand Down Expand Up @@ -278,6 +331,8 @@ use Kibana by setting the kibana option to true:
kibana: true
```
*Access to Kibana http://vagrantIpAddress:5601/app/kibana*
#### Couchbase
[Couchbase](https://www.couchbase.com/)
Expand All @@ -287,8 +342,43 @@ use Couchbase by setting the couchbase option to true:
```yaml
couchbase: true
```
*Access to admin console http://vagrantIpAddress:8091*
#### Apache Cassandra
[Cassabdra](http://cassandra.apache.org/)
[Cassabdra(DataStax)](http://docs.datastax.com/en/landing_page/doc/landing_page/current.html)
use Apache Cassandra by setting the cassandra option to true:
```yaml
cassandra: true
```
#### RabbitMQ
[RabbitMQ](https://www.rabbitmq.com/)
use Couchbase by setting the rabbitmq option to true:
```yaml
rabbitmq: true
```
*Access to rabbitmq management web ui http://vagrantIpAddress:15672*
#### Apache Kafka (Confluent Platform)
[Apache Kafka](https://kafka.apache.org/)
[Confluent](https://docs.confluent.io/current/)
use Kafka by setting the confluent option to true:
```yaml
confluent: true
```
### Ports
By default, the following ports are forwarded to your gardening environment:
Expand All @@ -301,10 +391,14 @@ By default, the following ports are forwarded to your gardening environment:
- MongoDB: 47017 → Forwards To 27017
- Elasticsearch: 19200 → Forwards To 9200
- kibana: 56010 → Forwards To 5601
- Cassandra: 19042 → Forwards To 9024
- Kafka: 19092 → Forwards To 9092
Forwarding Additional Ports:
```yaml
ports:
- send: 7777
to: 777
```
## Notice
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ appendScriptPath = confDir + "/append.sh"
aliasesPath = confDir + "/aliases"

require File.expand_path(File.dirname(__FILE__) + '/scripts/builder.rb')
Vagrant.require_version '>= 1.9.0'

Vagrant.configure(2) do |config|

Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"homestead"
],
"require": {
"php": ">=5.5.9",
"symfony/console": "~2.3|~3.0",
"symfony/yaml": "~2.3|~3.0"
"php": "^5.5||^7.0",
"symfony/console": "~2.3|~3.0|~4.0",
"symfony/yaml": "~2.3|~3.0|~4.0"
},
"require-dev":{
"symfony/var-dumper": "~3.0",
"phpunit/phpunit": "~4.0"
"symfony/var-dumper": "^3.0|^4.0",
"phpunit/phpunit": "^6.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit ac7a095

Please sign in to comment.