Confluence Vagrant Box
A Vagrant/Puppet configuration for provisioning Confluence. Blatantly ripped from stash-vagrant.
Current state: Only WAC-based installs are supported.
Vision: To be able to get a running version of Confluence for any version or commit hash within seconds.
To have a puppetized installation of arbitrary Confluence versions. The manifest(s) should support:
- setting Confluence up with any of the supported databases via SetupAcceptanceTest, either consumed from the Maven-repository or a Git clone
- setting up Confluence with confluence-plugin-test-resources (pre-compiled home directory with HSQLDB)
- compiling a Confluence version identified by a tag or commit hash and setting it up via SetupAcceptanceTest
- WAC-based install (consumption of the distributed binaries)
- have a production-ready setup (e.g. Nginx upfront, PostgreSQL)
- have a development-ready setup (e.g. sys props set, debug port forwarded)
To have a (Maven) repository where the Vagrant boxes and snapshots can be hosted.
To have a Maven plugin which can automatically restore any version or commit hash for the purpose of running a test suite against it.
- Install VirtualBox for your platform
- Install the latest version of Vagrant for your platform
git clone email@example.com:fakraemer/confluence-vagrant.git
$> cd confluence-vagrant $> vagrant up
Doing this the first time will take a few minutes as the operating system and all the required packages will be downloaded and installed. The Puppet recipe also downloads Confluenc (from WAC) and sets up a default Confluence home directory (confluence-home). The version currently can not be <= 4.0.
Subsequent runs will be much quicker!
To start the virtual machine with Confluence pre-installed and configured to run on http://localhost:8090 use:
$> vagrant up
To suspend the virtual machine use:
$> vagrant suspend
To start from scratch (wiping the image) use
destroy. A subsequent
vagrant up will re-download the packages and Stash but it won't have to download the operation system again:
$> vagrant destroy
If you need to SSH into the box use:
$> vagrant ssh
See http://docs.vagrantup.com/v2/ for more information.
You can login in using the username
admin with the password
run_expect step: The installer is runs the templates/confluence-install.erb through expect (after being piped through the templating engine). It is likely that this can break between versions, and you'd either have to generify the regex being used there or provide an expect script for each version. The script is generated via autoexpect. You can generate it on the running box by e.g.:
$> vagrant ssh $> autoexpect -f /source/confluence-vagrant/templates/install.exp sudo ./atlassian-confluence-4.0-x64.bin
testing manifest modifications: The quickest way to develop on the manifest is to apply it directly via puppet instead.
$> vagrant ssh $> sudo puppet apply --modulepath=/source/confluence-vagrant/modules --templatedir /source/confluence-vagrant/templates /source/confluence-vagrant/manifests/default.pp
Depending on the step to test, you will need to remove the necessary files so that it gets rerun.
$> sudo pkill -f confluence; sudo rm -rf /opt/atlassian/confluence;sudo rm -rf /var/atlassian/application-data/confluence
puppet apply --debug --verbose --modulepath /source/confluence-vagrant/modules /source/confluence-vagrant/modules/atl/tests/confluence.pp