Webdev:DevBoxVMImages: Difference between revisions

(→‎Building a plain VM: OVA explained)
 
(4 intermediate revisions by 4 users not shown)
Line 4: Line 4:
of our websites. That way, a new contributor can focus on contributing,
of our websites. That way, a new contributor can focus on contributing,
rather than learning how to install and configure a website first.
rather than learning how to install and configure a website first.
A second use case is continuous integration against a VM hosted environment. As
a first stab, we're using a vagrant based VM. We'll refer to this as CI use case below.


== Open questions ==
== Open questions ==
Line 20: Line 23:
** Shared folder from Host to VM
** Shared folder from Host to VM
** Custom box format rather than straight VM appliance or image
** Custom box format rather than straight VM appliance or image
** For CI case, we want vanilla Vagrant behaviors, but libcloud thingie would work too
* [http://libcloud.apache.org/getting-started.html libcloud]+Puppet better than Vagrant+Puppet?
* [http://libcloud.apache.org/getting-started.html libcloud]+Puppet better than Vagrant+Puppet?
** libcloud could [https://bitbucket.org/ianb/libcloud-vbox target VirtualBox] locally and Rackspace / Amazon EC2 remotely
** libcloud could [https://bitbucket.org/ianb/libcloud-vbox target VirtualBox] locally and Rackspace / Amazon EC2 remotely
Line 44: Line 48:
*** eg. <code>~/.gitconfig</code> with contributor's name and email, etc
*** eg. <code>~/.gitconfig</code> with contributor's name and email, etc
** Need instructions advising a <code>git pull</code> after initial boot-up
** Need instructions advising a <code>git pull</code> after initial boot-up
** Vagrant defaults are probably fine for CI use case


=== Blank slate content ===
=== Blank slate content ===
* See also: https://landfill.addons.allizom.org/db/
* Need to import / generate some sample data / content to make the site useful
* Need to import / generate some sample data / content to make the site useful
* Anonymized export from prod?
* Anonymized export from prod?
Line 53: Line 59:
* Synthetic test data
* Synthetic test data
** Need to hand-maintain
** Need to hand-maintain
** CI use case provides test data


=== Local hardware vs Rackspace VM? ===
=== Local hardware vs Rackspace VM? ===
Line 59: Line 66:
* Running a VM on Rackspace costs $$$
* Running a VM on Rackspace costs $$$
** How to get an image loaded into a Rackspace VM?
** How to get an image loaded into a Rackspace VM?
* CI use case requires Jenkins server to be able to run Vagrant
** Finding the right mix of CentOS / Ruby / vagrant gem / VirtualBox is challanging


== Participating sites ==
== Participating sites ==


* AMO?
* AMO?
* SUMO?
* SUMO
** https://github.com/aclark4life/kitsune-vagrant
* Socorro
* Socorro
* Mozillians?
* Mozillians
* MDN?
* MDN?
** Need proper hosting
** Need proper hosting
Line 73: Line 83:
* AUS
* AUS
* Graphserver
* Graphserver
* sasl-browserid


== Maintaining VM images ==
== Maintaining VM images ==
Line 87: Line 98:
* Create a VirtualBox VM.
* Create a VirtualBox VM.
* Install the bare minimum of server packages.
* Install the bare minimum of server packages.
** You might want to export an OVA of this base install for future from-scratch builds.
** You might want to export an OVA (Open Virtualization Format archive) of this base install for future from-scratch builds.
* Create a [https://raw.github.com/mozilla/kuma/HEAD/scripts/rackspace-bootstrap.sh bootstrap script] that gets Puppet installed and prepares a git clone of the project's source
* Create a [https://raw.github.com/mozilla/kuma/HEAD/scripts/rackspace-bootstrap.sh bootstrap script] that gets Puppet installed and prepares a git clone of the project's source
* As root, run <code>puppet apply /vagrant/puppet/manifests/dev-vagrant.pp</code> (or whatever you named it)
* As root, run <code>puppet apply /vagrant/puppet/manifests/dev-vagrant.pp</code> (or whatever you named it)
Line 120: Line 131:


== Hints, tips, HOWTOs ==
== Hints, tips, HOWTOs ==
 
===Guest Machine Loses Internet Access===
TBD: Collect info and gotchas on setting up sites in VMs.
If your host machine changes network address while the guest machine is up, the guest machine will lose 'net access. Restart the guest machine to fix.
Confirmed users
396

edits