Skip to content

Commit 5ee7bac

Browse files
authored
Merge pull request #20 from heybigname/ubuntu_16.04
Ubuntu 16.04
2 parents 536a412 + 96ee936 commit 5ee7bac

16 files changed

+80
-73
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
.idea
2+
.vagrant
3+
.DS_Store
4+
provision.retry

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Ansible VM 2.1
22
===============
33

4-
This virtual machine configuration is designed to have ONE application per machine. However, it does support multiple domains / sites per configuration. This virtual machine is a particularly good fit if you run Ubuntu 14.04 LTS on your servers.
4+
This virtual machine configuration is designed to have ONE application per machine. However, it does support multiple domains / sites per configuration. This virtual machine is a particularly good fit if you run Ubuntu 16.04 LTS on your servers.
55

6-
- [Ubuntu](http://www.ubuntu.com/) 14.04 Trusty 64bit
7-
- [NGINX](http://nginx.org/) + [PHP5-FPM](http://php-fpm.org/) _(optional)_
8-
- [PHP](http://php.net/) 5.6 _(optional)_
6+
- [Ubuntu](http://www.ubuntu.com/) 16.04 Xenial 64bit
7+
- [NGINX](http://nginx.org/) + [PHP7-FPM](http://php-fpm.org/) _(optional)_
8+
- [PHP](http://php.net/) 7.1 _(optional)_
99
- [Laravel Tools](http://laravel.com/) Laravel / Lumen / Envoy Tools _(optional)_
1010
- [NodeJS](http://nodejs.org/) v0.10.29 _(optional)_
1111
- [MailCatcher](http://mailcatcher.me/) _(optional)_
@@ -41,7 +41,7 @@ dbpasswd: "password"
4141
databases: []
4242
sites: []
4343
php_configs: []
44-
php_modules: ["php5-mysql", "php5-gd", "php-apc", "php5-mcrypt", "php5-curl", "php5-intl", "php5-memcached"]
44+
php_modules: ["php7.1-mysql", "php7.1-gd", "php-apcu", "php7.1-mcrypt", "php7.1-curl", "php7.1-intl", "php-memcached"]
4545
install_db: "no"
4646
install_web: "no"
4747
install_ohmyzsh: "no"
@@ -71,14 +71,13 @@ swap_size_in_mb: "1024"
7171

7272
```ruby
7373
Vagrant.configure("2") do |config|
74-
config.vm.box = "trusty64"
75-
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
74+
config.vm.box = "ubuntu/xenial64"
7675

7776
config.vm.network :private_network, ip: "10.10.10.10"
7877

7978
config.vm.provider :virtualbox do |v|
8079
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
81-
v.customize ["modifyvm", :id, "--memory", 768]
80+
v.customize ["modifyvm", :id, "--memory", 1024]
8281
v.customize ["modifyvm", :id, "--name", "CHANGE ME BEFORE USE"]
8382
end
8483

@@ -131,8 +130,7 @@ end
131130

132131
```ruby
133132
Vagrant.configure("2") do |config|
134-
config.vm.box = "trusty64"
135-
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
133+
config.vm.box = "ubuntu/xenial64"
136134

137135
config.vm.network :private_network, ip: "10.10.10.10"
138136

Vagrantfile

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
# vagrant init ubuntu/trusty64
1+
# vagrant init ubuntu/xenial64
22

33
Vagrant.configure("2") do |config|
4-
config.vm.box = "trusty64"
5-
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
4+
config.vm.box = "ubuntu/xenial64"
65

76
config.vm.network :private_network, ip: "10.10.10.10"
87

98
config.vm.provider :virtualbox do |v|
109
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
11-
v.customize ["modifyvm", :id, "--memory", 768]
10+
v.customize ["modifyvm", :id, "--memory", 1024]
1211
v.customize ["modifyvm", :id, "--name", "CHANGE ME BEFORE USE"]
1312
end
1413

14+
config.vm.provision "shell" do |s|
15+
s.inline = "sudo apt-get update && sudo apt-get install -y python"
16+
end
17+
1518
config.vm.provision "ansible" do |ansible|
1619
ansible.playbook = "ansible/provision.yml"
1720
ansible.extra_vars = {
@@ -22,22 +25,23 @@ Vagrant.configure("2") do |config|
2225
sites: [
2326
{
2427
hostname: "app.local",
25-
document_root: "/vagrant/site/public"
26-
}, {
27-
hostname: "app2.local",
28-
document_root: "/vagrant/site2/public2"
28+
document_root: "/vagrant/app/public"
29+
},
30+
{
31+
hostname: "app-api.local",
32+
document_root: "/vagrant/app-api/public"
2933
}
3034
],
3135
php_configs: [
3236
{ option: "upload_max_filesize", value: "100M" },
3337
{ option: "post_max_size", value: "100M" }
3438
],
35-
install_gems: ["compass", "zurb-foundation"],
39+
install_gems: [],
3640
install_db: "yes",
3741
install_ohmyzsh: "yes",
3842
install_web: "yes",
39-
install_mailcatcher: "yes",
40-
install_hhvm: "yes",
43+
install_mailcatcher: "no",
44+
install_hhvm: "no",
4145
install_beanstalkd: "no",
4246
install_redis: "no",
4347
install_javascript_build_system: "no",

files/hosts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
127.0.0.1 localhost
2-
127.0.1.1 trusty64
2+
127.0.0.1 xenial64
3+
127.0.0.1 ubuntu-xenial
4+
127.0.0.1 {{ hostname }}
35

46
{% for host in sites %}
5-
127.0.0.1 {{ host.hostname }}
7+
127.0.0.1 {{ host.hostname }}
68
{% endfor %}
79

810
# The following lines are desirable for IPv6 capable hosts

files/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
user vagrant;
1+
user ubuntu;
22
worker_processes 4;
33
pid /run/nginx.pid;
44

files/nginx_site.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ server {
3131

3232
location ~* \.php$ {
3333
root {{ item.document_root }};
34-
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
34+
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
3535
fastcgi_index index.php;
3636
fastcgi_split_path_info ^(.+\.php)(.*)$;
3737
include /etc/nginx/fastcgi_params;

files/php-fpm.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
; Relative path can also be used. They will be prefixed by:
1313
; - the global prefix if it's been set (-p argument)
1414
; - /usr otherwise
15-
include=/etc/php/5.6/fpm/pool.d/*.conf
15+
include=/etc/php/7.1/fpm/pool.d/*.conf
1616

1717
;;;;;;;;;;;;;;;;;;
1818
; Global Options ;
@@ -22,14 +22,14 @@ include=/etc/php/5.6/fpm/pool.d/*.conf
2222
; Pid file
2323
; Note: the default prefix is /var
2424
; Default Value: none
25-
pid = /run/php/php5.6-fpm.pid
25+
pid = /run/php/php7.1-fpm.pid
2626

2727
; Error log file
2828
; If it's set to "syslog", log is sent to syslogd instead of being written
2929
; in a local file.
3030
; Note: the default prefix is /var
3131
; Default Value: log/php-fpm.log
32-
error_log = /var/log/php5.6-fpm.log
32+
error_log = /var/log/php7.1-fpm.log
3333

3434
; syslog_facility is used to specify what type of program is logging the
3535
; message. This lets syslogd specify that messages from different facilities

files/php-fpm_pool_www.conf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
; Unix user/group of processes
2121
; Note: The user is mandatory. If the group is not set, the default user's group
2222
; will be used.
23-
user = vagrant
24-
group = vagrant
23+
user = ubuntu
24+
group = ubuntu
2525

2626
; The address on which to accept FastCGI requests.
2727
; Valid syntaxes are:
@@ -35,7 +35,7 @@ group = vagrant
3535
; (IPv6 and IPv4-mapped) on a specific port;
3636
; '/path/to/unix/socket' - to listen on a unix socket.
3737
; Note: This value is mandatory.
38-
listen = /run/php/php5.6-fpm.sock
38+
listen = /run/php/php7.1-fpm.sock
3939

4040
; Set listen(2) backlog.
4141
; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
@@ -46,8 +46,8 @@ listen = /run/php/php5.6-fpm.sock
4646
; BSD-derived systems allow connections regardless of permissions.
4747
; Default Values: user and group are set as the running user
4848
; mode is set to 0660
49-
listen.owner = vagrant
50-
listen.group = vagrant
49+
listen.owner = ubuntu
50+
listen.group = ubuntu
5151
listen.mode = 0660
5252
; When POSIX Access Control Lists are supported you can set them using
5353
; these options, value is a comma separated list of user/group names.
@@ -225,7 +225,7 @@ pm.max_spare_servers = 3
225225
; last request memory: 0
226226
;
227227
; Note: There is a real-time FPM status monitoring sample web page available
228-
; It's available in: /usr/share/php/5.6/fpm/status.html
228+
; It's available in: /usr/share/php/7.1/fpm/status.html
229229
;
230230
; Note: The value must start with a leading slash (/). The value can be
231231
; anything, but it may not be a good idea to use the .php extension or it

provision.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
databases: []
99
sites: []
1010
php_modules:
11-
- php5.6-mysql
12-
- php5.6-gd
13-
- php-apc
14-
- php5.6-mcrypt
15-
- php5.6-curl
16-
- php5.6-intl
17-
- php5-memcached
18-
- php5.6-mbstring
19-
- php5.6-dom
11+
- php7.1-mysql
12+
- php7.1-gd
13+
- php-apcu
14+
- php7.1-mcrypt
15+
- php7.1-curl
16+
- php7.1-intl
17+
- php-memcached
18+
- php7.1-mbstring
19+
- php7.1-xml
2020
install_db: "no"
2121
install_web: "no"
2222
install_ohmyzsh: "no"
@@ -77,7 +77,7 @@
7777
handlers:
7878
- name: restart nginx
7979
service: name=nginx state=restarted
80-
- name: restart php5.6-fpm
81-
service: name=php5.6-fpm state=restarted
80+
- name: restart php7.1-fpm
81+
service: name=php7.1-fpm state=restarted
8282
- name: restart mysql
8383
service: name=mysql state=restarted

tasks/mailcatcher.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
- name: MailCatcher | libsqlite3-dev
1111
apt: pkg=libsqlite3-dev state=latest
1212

13-
- name: MailCatcher | Install Ruby 1.9.1
14-
apt: pkg=ruby1.9.1-dev state=installed
13+
- name: MailCatcher | Install Ruby 2.3
14+
apt: pkg=ruby2.3 state=installed
1515

1616
- name: MailCatcher | Install MailCatcher
1717
action: command gem install mailcatcher creates=/usr/local/bin/mailcatcher

0 commit comments

Comments
 (0)