This repository has been archived by the owner on Apr 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
127 lines (85 loc) · 3.15 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
Project reference setup with ansible & vagrant
-------------------------------------------------------------------------------
Requirements
- Vagrant 1.5.x
- https://github.com/fgrehm/vagrant-cachier
$ vagrant plugin install vagrant-cachier
- Ansible in your host machine. For OS X:
brew install ansible
Introduction
Start by running:
$ ./build.sh new
This will do the following:
- Bring up & provision the virtual machine (if needed)
- Build the drupal site under drupal/current
After finishing provisioning (first time is always slow) and building the site
you need to install the Drupal site in http://x.x.x.x:8080/install.php
(Note: on rare occasion php-fpm/varnish/e.g. requires to be restarted before
starting to work. You can do this by issuing the following command:
$ vagrant ssh -c "sudo service php-fpm restart"
$ vagrant ssh -c "sudo service varnish restart"
All Drupal related configurations are under drupal/conf
Drush is usable without ssh access with the drush.sh script e.g:
$ ./drush.sh cc all
To open up ssh access to the virtual machine:
$ vagrant ssh
-------------------------------------------------------------------------------
Useful things
At the moment IP is configured in
Vagrantfile
variable INSTANCE_IP
Varnish responds in
http://x.x.x.x/
Nginx responds in
http://x.x.x.x:8080/
Solr responds in
http://x.x.x.x:8983/solr
MailCatcher responds in
http://x.x.x.x:1080
-------------------------------------------------------------------------------
Vagrant + Ansible configuration
Vagrant is using Ansible provision stored under the ansible subdirectory.
The inventory file (which stores the hosts and their IP's) is located under
ansible/inventory. Host specific configurations for Vagrant are stored in
ansible/vagrant.yml and the playbooks are under ansible/playbook directory.
Variable overrides are defined in ansible/variables.yml.
You should only bother with the following:
What components do you want to install?
ansible/vagrant.yml
And how are those set up?
ansible/variables.yml
-------------------------------------------------------------------------------
Debugging tools
XDebug tools are installed via the devtools role. Everything should work out
of the box for PHPStorm. PHP script e.g. drush debugging should also work.
Example sublime text project configuration (via Project->Edit Project):
{
"folders":
[
{
"follow_symlinks": true,
"path": "/path/to/ansibleref"
}
],
"settings":
{
"xdebug": {
"path_mapping": {
"/vagrant" : "/path/to/ansibleref"
}
}
}
}
-------------------------------------------------------------------------------
Ansible configuration as a git subtree
The directory ansible/playbook contains the ansible configuration as a git
subtree. These commands are here provided not because you need to run them (you
very rarely have to) but for a reference only.
Adding:
$ git subtree add --prefix ansible/playbook <url> master --squash
Pulling:
$ git subtree pull --prefix ansible/playbook <url> master --squash
Pushing:
$ git subtree push --prefix ansible/playbook <url> master --squash
Committing (as usual):
$ git commit -m "message"