Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
Oliver Davies | 7df8b8a11a |
15
README.md
15
README.md
|
@ -2,20 +2,19 @@
|
|||
|
||||
A demo [Drupal] application for demonstrating PHP application deployment with [Ansible][], [Ansible Vault][] and [Ansistrano][].
|
||||
|
||||
[Ansible]: https://www.ansible.com
|
||||
[Ansible Vault]: https://docs.ansible.com/ansible/ansible-vault.html
|
||||
[Ansistrano]: https://ansistrano.com
|
||||
[Drupal]: https://drupal.org
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [Ansible][]
|
||||
- [Vagrant][]
|
||||
- [VirtualBox][]
|
||||
|
||||
[Vagrant]: https://www.vagrantup.com
|
||||
[VirtualBox]: https://www.virtualbox.or
|
||||
|
||||
## Installation
|
||||
|
||||
See [installation.md](docs/installation.md)
|
||||
|
||||
[Ansible]: https://www.ansible.com
|
||||
[Ansible Vault]: https://docs.ansible.com/ansible/ansible-vault.html
|
||||
[Ansistrano]: https://ansistrano.com
|
||||
[Drupal]: https://drupal.org
|
||||
[Vagrant]: https://www.vagrantup.com
|
||||
[VirtualBox]: https://www.virtualbox.org
|
||||
|
|
4
Vagrantfile
vendored
4
Vagrantfile
vendored
|
@ -18,8 +18,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
ansible.compatibility_mode = "2.0"
|
||||
ansible.playbook = "tools/ansible/provision.yml"
|
||||
ansible.inventory_path = "tools/ansible/hosts.yml"
|
||||
ansible.playbook = "ansible/provision.yml"
|
||||
ansible.inventory_path = "ansible/hosts.yml"
|
||||
ansible.become = true
|
||||
ansible.ask_vault_pass = true
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[defaults]
|
||||
inventory = ./tools/ansible/hosts.yml
|
||||
inventory = ./ansible/hosts.yml
|
||||
nocows = True
|
||||
private_key_file = .vagrant/machines/dransible/virtualbox/private_key
|
||||
remote_user = vagrant
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
release_drush_path: "{{ ansistrano_release_path.stdout }}/vendor/bin/drush"
|
||||
|
||||
ansistrano_deploy_via: "rsync"
|
||||
ansistrano_deploy_from: "{{ playbook_dir }}/../../"
|
||||
ansistrano_deploy_from: "{{ playbook_dir }}/../"
|
||||
ansistrano_deploy_to: "{{ project_deploy_dir }}"
|
||||
ansistrano_keep_releases: 5
|
||||
ansistrano_after_symlink_shared_tasks_file: "{{ playbook_dir }}/deploy/after-symlink-shared.yml"
|
10
ansible/vars/vault.yml
Normal file
10
ansible/vars/vault.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
$ANSIBLE_VAULT;1.1;AES256
|
||||
36623031633937333366366139373538383730336439393237613762653632353766396437343461
|
||||
3637316538346432646532643066363361366262383037310a376330623637373335333236343536
|
||||
37316466613531363830333734323933666431643131326331393030343937353661623234356432
|
||||
3437376566623863620a313966333234363166326438373731313433633430623035393763376434
|
||||
37383934626562653534363634373132386239343465303535396666373563333566336663336538
|
||||
35323536396433376236383963626534636266343031363035666431393433323832343965316264
|
||||
65613734383066366565613433376565623239363462383664663063366230613330333032306434
|
||||
36663163353431343335653933616236363836363634333430393237363737313432346136623464
|
||||
37323165363361333133393238353638353332613136353031313630663834326439
|
|
@ -1,17 +1,15 @@
|
|||
# Installation
|
||||
|
||||
1. Run `vagrant up` or `vagrant up --provision` if needed, to start Vagrant and provision the virtual machine using the `tools/ansible/provision.yml` playbook. This will set up a LAMP stack with Apache, MySQL, PHP and Composer.
|
||||
1. Run `vagrant up` or `vagrant up --provision` if needed, to start Vagrant and provision the virtual machine using the `ansible/provision.yml` playbook. This will set up a LAMP stack with Apache, MySQL, PHP and Composer.
|
||||
|
||||
If you try loading the site at this point you will see a `The requested URL was not found on this server` message as the site has not yet been deployed.
|
||||
|
||||
![A browser showing a 'Not Found' error](images/before-deploy.png)
|
||||
|
||||
1. Run the deploy playbook to deploy the application code to the virtual machine. The Vault password, which is `dransible`, is stored in `tools/ansible/vault-password.txt` as this is an example project.
|
||||
1. Run the deploy playbook to deploy the application code to the virtual machine. You will be prompted for the Vault password, which is `dransible`.
|
||||
|
||||
```
|
||||
ansible-playbook tools/ansible/deploy.yml \
|
||||
-i tools/ansible/hosts.yml \
|
||||
--vault-password-file=tools/ansible/vault-password.txt
|
||||
ansible-playbook ansible/deploy.yml -i ansible/hosts.yml --ask-vault-pass
|
||||
```
|
||||
|
||||
1. Load `http://dransible` in a browser, and you should see a Drupal 8 website.
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
$ANSIBLE_VAULT;1.1;AES256
|
||||
61653737643939333936636566323038316561323033633831656536643733343639356232356538
|
||||
3238306433353165626531646366646132626233646561390a386534373066346234373237373865
|
||||
64363663323662666261616136663239366634643135386433613639313532653262373932386166
|
||||
3736626562653963390a666566643537356436303166356130616530306562303565323637343631
|
||||
31333837303166623130353530636366663464346431643837303637343863353764373236303861
|
||||
65623364383839623063393466303637653865393031626234366361333261633238383261646233
|
||||
31313131393933636236326463313830346534613862333733306265633962663964386638623435
|
||||
64323437373262653862383063343436633237353865386539653263623935626431363362363436
|
||||
37306338313134383334316232383238663830346231393638353834663730663663626465353862
|
||||
34366132653430326230613164333533326463346638393866636465343237613263346232663538
|
||||
306164366133323334373862353238343834
|
|
@ -1 +0,0 @@
|
|||
dransible
|
Loading…
Reference in a new issue