Giter Club home page Giter Club logo

drupal-ansible's Introduction

drupal-ansible

An Ansible playbook for a Drupal installation on Ubuntu.

Virtualenv

Some folks like other variants like pyenv, I'm old-school.

virtualenv . --no-site-packages --distribute
source bin/activate
pip install -r requirements.txt

After creating instance, test authentication

Substitue your instance's public DNS name of course:

ssh -v -i ~/path/to/yourkey.pem [email protected]

Inventory (host) file

If you've got (say) your dev hosts in hosts/dev, you can specify variable to apply:

[gluster-brick-1]
ec2-107-20-89-160.compute-1.amazonaws.com ansible_ssh_user=ec2-user

Then you can connect and run a command like 'hostname':

ansible -a hostname -i hosts/dev gluster-brick-1 --private-key=~/path/to/instance-key.pem 

You'll need to add all your users private keys to that account, or better, add accounts with private keys for each user. Best to create a playbook for this.

Tasks

Add new task:

$ mkdir -p roles/TASK_NAME/{tasks,handlers,templates,files,vars}
$ touch roles/TASK_NAME/tasks/main.yml

Run Playbook

To run:

  • creates initial machine (and database)

      $ ansible-playbook -i hosts/seed playbooks/drupal-bootstrap.yml -K
    
  • creates subsequent machines (when database already exists)

      $ ansible-playbook i hosts/production playbooks/drupal-bootstrap.yml --skip-tags "init" -K
    
  • creates read-only consumer boxes.

      $ ansible-playbook i hosts/production playbooks/drupal-bootstrap.yml --skip-tags "init" -K
      $ ansible-playbook -i hosts/production playbooks/drupal-readonly.yml -K
    

Chris does things more complicated, specifying his key:

$ ansible-playbook -v -i hosts/dev playbooks/create-gluster.yml --private-key=~/AeroFS/AWS-keys/chriskoansys.pem

Using Vagrant

  • Install Vagrant (v1.4.3 at current)
  • Install Vagrant-HostsUpdater plugin: vagrant plugin install vagrant-hostsupdater
  • Startup Vagrant: vagrant up

Then run ansible to bootstrap drupal:

ansible-playbook -i hosts/vagrant -v playbooks/drupal-boostrap.yml -K

drupal-ansible's People

Watchers

James Cloos avatar DF8669 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.