Giter Site home page Giter Site logo

servers's Introduction

Server Configuration

This repository contains an Ansible and Vagrant based setup for running development VMs, mostly for Drupal development. It is very much a work in progress and there is a very good chance that just about everything could be done a bit better. The CI server configuration is very early days, I'm not even using it at the moment.

I've moved the Ansible role defitions to their own repo, you'll need those in order to make the Ansible setup in this repo work

You'll need to be running a fairly recent version of Ansible. I've tested it on 2.1.1 and I know that 2.0 does not work.

Assumptons

  1. This is being run on a mac or linux (specifically I've only tested it on Arch).
  2. There is an NFS export from the host that will be mounted on /var/www in the web VM. See the Vagrantfile for specifics.

NFS Export On Arch Linux

On my Archlinux host I set up the NFSv4 export using the following. It allows me to mount ~/projects as /projects inside the VM.

Create directory structure to export.

mkdir -p /nfs/projects

Add the following to /etc/exports. The anonuid and anongid coorespond to my user and group ids on the host.

/nfs 10.1.0.0/24(rw,fsid=0,no_subtree_check)
/nfs/projects 10.1.0.0/24(rw,no_subtree_check,nohide,all_squash,anonuid=1000,anongid=100)

Enable and start the NFS service

systemctl enable nfs-server
systemctl start nfs-server

Add a bind mount to /etc/fstab. This is required by NFSv4 in order to get the assignment of uid and gid correct, without it you get some weird uid/gid mapping. From what I understand you don't need it for NFSv3.

/home/karl/projects                       /nfs/projects none    bind            0 0

Mount the project directory.

mount /nfs/projects

NFS Export On Mac OSX

TBD

Adding New Sites

There are three vars files that specify the list of Drupal, Wordpress, and static sites that will be configured - provisioning/vars/drupal.yml, provisioning/vars/wordpress.yml, and provisioning/vars/static-sites.yml. Just add the name of the site (hostname and db name) as the key and the path to the docroot as the value and run "vagrant provision".

Notes

If the box gets out of date related to the VirtualBox guests software the vagrant-vbguest can be used to make sure the versions are in sync

vagrant plugin install vagrant-vbguest

The drupal-web role will look for two directories that are not under version control (don't want the contents on github.com, etc.). If they don't exist they will just be ignored.

  • provisioning/roles/drupal-web/files/.acquia
  • provisioning/roles/drupal-web/files/.drush

servers's People

Contributors

karlkedrovsky avatar

Watchers

 avatar  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.