[WIP] Development tools for puppet-phabricator

Vagrant based development tools, so that we can rapidly set up
and test the puppet module.

Change-Id: I80fc43516f5378e795a16c5919f4915aa5190334
This commit is contained in:
Michael Krotscheck 2016-04-26 17:21:03 -05:00
parent 51e7b522af
commit a32d4db747
No known key found for this signature in database
GPG Key ID: 20E618D878DE38AB
3 changed files with 72 additions and 0 deletions

21
Vagrantfile vendored Normal file
View File

@ -0,0 +1,21 @@
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "trusty" do |trusty|
trusty.vm.box = "ubuntu/trusty64"
trusty.vm.network 'private_network', ip: '192.168.99.10'
end
config.vm.provision "shell",
path: "vagrant.sh"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
end
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "./"
puppet.manifest_file = "vagrant.pp"
end
end

9
vagrant.pp Normal file
View File

@ -0,0 +1,9 @@
node default {
class { 'phabricator':
httpd_vhost => '192.168.99.10',
mysql_user_password => 'phabricator',
mysql_root_password => 'supersecret',
ssl_cert_file => "/etc/ssl/certs/ssl-cert-snakeoil.pem",
ssl_key_file => "/etc/ssl/private/ssl-cert-snakeoil.key",
}
}

42
vagrant.sh Normal file
View File

@ -0,0 +1,42 @@
#!/usr/bin/env bash
# Install Puppet!
if [ ! -f /etc/apt/sources.list.d/puppetlabs.list ]; then
lsbdistcodename=`lsb_release -c -s`
wget https://apt.puppetlabs.com/puppetlabs-release-${lsbdistcodename}.deb
sudo dpkg -i puppetlabs-release-${lsbdistcodename}.deb
sudo apt-get update
sudo apt-get dist-upgrade -y
fi
apt-get install git -y
if [ ! -d /etc/puppet/modules/httpd ]; then
git clone git://git.openstack.org/openstack-infra/puppet-httpd /etc/puppet/modules/httpd
fi
if [ ! -d /etc/puppet/modules/firewall ]; then
puppet module install puppetlabs-firewall --version 1.1.3
fi
if [ ! -d /etc/puppet/modules/mysql ]; then
puppet module install puppetlabs-mysql --version 3.6.2
fi
#if [ ! -d /etc/puppet/modules/apache ]; then
# puppet module install puppetlabs-apache --version 0.0.4
#fi
#if [ ! -d /etc/puppet/modules/rabbitmq ]; then
# puppet module install puppetlabs-rabbitmq --version 5.0.0
#fi
if [ ! -d /etc/puppet/modules/inifile ]; then
puppet module install puppetlabs-inifile --version 1.1.3
fi
if [ ! -d /etc/puppet/modules/vcsrepo ]; then
puppet module install openstackci-vcsrepo --version 0.0.8
fi
#if [ ! -d /etc/puppet/modules/python ]; then
# puppet module install stankevich-python --version 1.6.6
#fi
# Symlink the module
if [ ! -d /etc/puppet/modules/phabricator ]; then
sudo ln -s /vagrant /etc/puppet/modules/phabricator
fi