Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit 13314be

Browse files
author
Jason Moore
committed
Adding an easy to use install script to the VM repo with formatting/cleanup on README.
1 parent 0b61f1c commit 13314be

File tree

2 files changed

+71
-30
lines changed

2 files changed

+71
-30
lines changed

README.md

Lines changed: 62 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,56 @@
11
# Zivtech LAMP Development VM
22

3-
This repository manages Zivtech's development virtual server. It has a number of
4-
tools that we use to build Drupal sites. [Drush](https://github.com/drush-ops/drush)
5-
is included as well as [Drush Fetcher](https://www.drupal.org/project/fetcher)
6-
which is a tool used to sync copies of Drupal sites between environments.
7-
There are also other useful features such as an Apache Solr server for easy integration with
8-
[search api](https://drupal.org/project/search_api_solr) or
9-
[apachesolr](https://drupal.org/project/apachesolr). By default this tool builds an
10-
Ubuntu 16.04 server. See [#customizing](Customizing This VM below).
3+
This repository manages code powering Zivtech's development virtual machine.
4+
It was designed by the team at [Zivtech](https://www.zivtech.com/) to mimic most production
5+
hosting environments to reduce errors between local development and production deployment.
6+
It has a number of tools that Zivtech uses to build Drupal sites and web applications.
7+
8+
By default this VM builds an Ubuntu 16.04 server.
9+
See [Customizing This VM below](#customizing-this-vm).
1110

1211
## Features
1312

13+
- Apache Solr with integration for [search api](https://drupal.org/project/search_api_solr) or
14+
[apachesolr](https://drupal.org/project/apachesolr).
1415
- Automatically routes *.local.zivtech.com to the vm.
15-
- [Mailhog](https://github.com/mailhog/MailHog) allows viewing of local mail at [http://mailhog.local.zivtech.com:8025](http://mailhog.local.zivtech.com:8025/)
16+
- [Drush](https://github.com/drush-ops/drush) allows for management of sites through command line.
17+
- [Drush Fetcher](https://www.drupal.org/project/fetcher)
18+
which is a tool used to sync copies of Drupal sites between environments.
19+
- [Mailhog](https://github.com/mailhog/MailHog) allows viewing of local mail at
20+
[http://mailhog.local.zivtech.com:8025](http://mailhog.local.zivtech.com:8025/)
1621

1722
## Installation
1823

24+
**_NOTE FOR WINDOWS USERS:_** There are known issues with getting
25+
[librarian-puppet](https://github.com/rodjek/librarian-puppet)
26+
installed and running on Windows, so for Windows users it is recommended that you
27+
**DO NOT** follow the installation instructions below but instead download the
28+
most recent full release via zip file from the
29+
[releases page](https://github.com/zivtech/vagrant-development-vm/releases) instead
30+
of installing that plugin or cloning the repository from source. Then you can cd into
31+
the directory and run `vagrant up` as normal.
32+
1933
### Dependencies
2034
You must have [Vagrant](https://www.vagrantup.com) and [VirtualBox](https://www.virtualbox.org/)
2135
installed first.
2236
If they are already installed, **update Vagrant and Virtualbox** before you continue.
2337

24-
The puppet dependencies are managed via
25-
[librarian-puppet](https://github.com/rodjek/librarian-puppet) which can
26-
automatically be managed for you if you install the
38+
The puppet modules and their dependencies are managed via the
39+
[librarian-puppet](https://github.com/rodjek/librarian-puppet) gem,
40+
which requires additional dependency gems puppet, facter, and hiera.
41+
42+
Automatically manage puppet modules and their dependencies if you install the
2743
[vagrant-librarian-puppet](https://github.com/mhahn/vagrant-librarian-puppet) vagrant plugin.
2844

29-
Complete instructions below:
45+
### Automated Install Instructions
46+
Run the included `install.sh` script from inside your cloned repository.
47+
(sudo access is required to install puppet and dependencies)
48+
49+
````bash
50+
./install.sh
51+
````
52+
53+
### Manual Install Instructions
3054

3155
````bash
3256
sudo gem install puppet facter hiera librarian-puppet --no-document
@@ -35,22 +59,22 @@ cd myvm
3559
librarian-puppet install
3660
vagrant up
3761
````
38-
You should now have a working Virtual Server! Create a new Drupal site by running `drush fetcher-create yoursite`
39-
(add the version of drupal as a second argument if you want Drupal 8!). Run `vagrant ssh` to get
40-
into your VM.
62+
You should now have a working Zivtech Development Virtual Machine!
4163

42-
**_NOTE FOR WINDOWS USERS:_** There are known issues with getting `librarian-puppet`
43-
installed and running on windows and so for Windows users it is recommended that you
44-
**DO NOT** follow the installation instructions below but instead download the
45-
most recent full release via zip file from the
46-
[releases page](https://github.com/zivtech/vagrant-development-vm/releases) instead
47-
of installing that plugin or cloning the repository from source. Then you can cd into
48-
the directory and run vagrant up as normal.
64+
Run `vagrant ssh` to get into your Dev VM.
4965

50-
## Customizing this VM <a name="customizing"></a>
66+
Create a new Drupal site by running `drush fetcher-create yoursite`.
67+
Add the version of drupal as a second argument if you want a site other
68+
than the current version of Drupal.
5169

52-
Once this repository have been downloaded, running "vagrant up" from within this
53-
directory will build the virtual server and provision it. Two different categories
70+
````bash
71+
drush fetcher-create yoursite 7
72+
````
73+
74+
## Customizing this VM
75+
76+
Once you have followed the [Installation](#installation) steps, running `vagrant up` from within this
77+
clone repository will build the virtual server and provision it. Two different categories
5478
of customizations can be performed on the dev vm. First there are vagrant settings
5579
such as Ubuntu version, local IP address, amount of RAM,
5680
hostname, etc. The second are tunables in the virtual server configuration.
@@ -62,9 +86,11 @@ a new file called `config.yaml` where you can define any value listed below
6286
(see [default.config.yaml](https://github.com/zivtech/vagrant-development-vm/blob/master/default.config.yaml)
6387
for formatting options.
6488

65-
- *hostname*: The hostname that gets set inside the VM. Defaults to `vm`.
89+
- *hostname*: The hostname that gets set inside the VM. Defaults to `local.zivtech.com`.
90+
(Apache Virtual Hosts are available at *.local.zivtech.com.)
6691
- *private_ipv4*: The private IP to provision for this host. Defaults to `172.16.0.2`.
67-
- *box*:The base box to use to build the puppet work on top of. Defaults to `zivtech/ubuntu-16.04-server-puppet-4`
92+
- *box*:The base box to use to build the puppet work on top of.
93+
Defaults to `zivtech/ubuntu-16.04-server-puppet-4`
6894
- *memory*: The amount of memory (in megabytes) to provision. Defaults to `2048`.
6995
- *sync_folder*: Set this to false in order to not mount the www folder in this
7096
directory *inside* `/var/www` on the VM. Defaults to true.
@@ -85,16 +111,22 @@ overrides needed by this project or settings listed there for your easy referenc
85111
tuning the VM.
86112

87113
#### Fetcher Server Configuration
88-
If you use a Fetcher Server, set its url as 'info_fetcher.config' 'host' in your hiera/custom.yaml file. See hiera/common.yaml.
114+
If you use a [Fetcher Services](https://www.drupal.org/project/fetcher_services) server,
115+
set it's url as `'info_fetcher.config' 'host'` in your hiera/custom.yaml file.
116+
See [hiera/common.yaml](https://github.com/zivtech/vagrant-development-vm/blob/master/hiera/common.yaml).
89117

90118
## Common Issues
91119

92120
On non-windows host systems, Vagrant tries to mount a shared NFS directory to the host
93121
machine (the physical computer). This has been known to fail in some cases. If you
94-
receive errors about a failed mount remove the virtual machine with "vagrant destroy"
122+
receive errors about a failed mount remove the virtual machine with `vagrant destroy`
95123
then create or edit a `config.yaml` file in the root of this project and add the
96124
following line:
97125

98126
```` yaml
99127
sync_folder: false
100128
````
129+
130+
## Reporting Issues
131+
132+
[Zivtech](https://www.zivtech.com/) uses this project actively to develop websites and web applications. Found an issue? Please search the [issue queue](https://github.com/zivtech/vagrant-development-vm/issues) and report it. [Pull Requests](https://github.com/zivtech/vagrant-development-vm/pulls) are welcome.

install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#! /usr/bin/env bash
2+
3+
echo "Enter your sudo password."
4+
echo "Installing puppet, facter, hiera, and librarian-puppet gems without documentation..."
5+
sudo gem install puppet facter hiera librarian-puppet --no-document
6+
echo "Installing Puppet modules with librarian-puppet..."
7+
librarian-puppet install
8+
echo "Running vagrant up..."
9+
vagrant up

0 commit comments

Comments
 (0)