Multiplatform development environment with Vagrant and Ansible
Switch branches/tags
Clone or download
Pull request Compare This branch is 503 commits ahead of datasmid:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
files
group_vars
host_vars
inventories
roles
tasks
tools
.gitignore
.travis.yml
INSTALL.md
Makefile
README.md
Vagrantfile
ansible-cygwin-installer.ps1
ansible.cfg
build.yml
deploy.yml
galaxy_import.yml
install.yml
local_slave.yml
provision.yml
requirements.txt
requirements.yml
root_tasks
selenium.yml
slaves.yml
smoketest.yml
travis.ini
trust_me.yml
webtest.yml

README.md

README:

Buildserver

This is a complete development environment provisioned with Ansible+Vagrant.

The build server on Centos is provisioned with Vagrant and Ansible. It uses several roles published on http://galaxy.ansible.com. Java, Ant, Maven, Gradle, Jenkins, Sonar, Nexus, Artifactory with MariaDB as database. It comes fully configured with the example project (game-of-life) of the open source book "Jenkins, the Definitive Guide". Plugins for Jenkins and Sonar are provisioned from specs in roles/jenkins/vars/main.yml and roles/sonar/vars/main.yml.

Tomcat+PostgreSQL are deployed on a separate VM to mimic production.

Windows 7 IE 10 is used for post-deployment testing.

Requirements

On Windows

  1. Chocolatey (on windows only)
  2. VirtualBox
  3. Install Ansible, Vagrant & Cygwin using this Powershell script

On Mac

Install/Upgrade XCode from the AppStore. HomeBrew, Caskroom, VirtualBox, Vagrant, Ansible

It is easiest to install homebrew first, from brew.sh, then:

brew install --upgrade python
brew install --upgrade ansible
brew install caskroom/cask/brew-cask
brew cask install --upgrade virtualbox
brew cask install --upgrade vagrant

Note that it is custom nowadays on mac to change ownership for /usr/local, so you don't need sudo.

On RedHat/Fedora/Centos Linux:

yum install ansible

Download & install VirtualBox

Download & install Vagrant

Quickstart

You need access to the internet (i.e. nslookup mirrorlist.centos.org should work)

Add these hostnames to /etc/hosts or to \WINDOWS\SYSTEM32\drivers\etc\hosts

192.168.10.16 dev
192.168.10.18 target
192.168.10.28 lab
192.168.10.36 nolio
192.168.10.40 windows

Fork & clone this repo:

git clone https://github.com/bbaassssiiee/buildserver
cd buildserver
make install

Bring up 2 virtual machines: 'dev' the CI server, and 'target' the Tomcat server

vagrant up --no-provision

Run the provisioner

ansible-playbook -l dev:target provision.yml

Install Docker on target too

ansible-playbook -l target playbook.yml

Bring up the windows 7 VM, and provision it:

vagrant up --no-provision windows
ansible-playbook -l windows provision.yml

Connect to the buildserver at the host-only address http://192.168.10.16 (you can set that address in the Vagrantfile)

development

Please use the github issue tracker. Feature requests, bug reports, etc, should all be opened as GitHub tickets. Pull-requests should not contain any merges or merge-conflicts. In general for each change fork the repository, make changes, and submit a specific pull-request.