Permalink
Browse files

Initial vagrant configuration

  • Loading branch information...
jpeach committed Mar 5, 2013
1 parent 522ec6c commit 79e146a7d1e88be7c8b8f43890fd9abac0d1c827
Showing with 190 additions and 4 deletions.
  1. +76 −0 Vagrantfile
  2. +13 −4 ci/regression
  3. +31 −0 contrib/manifests/debian.pp
  4. +39 −0 contrib/manifests/omnios.sh
  5. +31 −0 contrib/manifests/redhat.pp
View
@@ -0,0 +1,76 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Vagrant::Config.run do |config|
+
+ # Default all VMs to 1GB.
+ config.vm.customize ["modifyvm", :id, "--memory", 1024]
+
+ # Mount the Traffic Server source code in a fixed location everywhere. Use NFS
+ # because it's faster and vboxfs doesn't support links.
+ config.vm.share_folder "src", "/opt/src/trafficserver.git", ".", :nfs => true
+
+ # Ubuntu 12.04 LTS (Precise Pangolin)
+ config.vm.define :precise64 do | config |
+ config.vm.box = "precise64"
+ config.vm.box_url = "http://files.vagrantup.com/precise64.box"
+ config.vm.network :hostonly, "192.168.100.3"
+ config.vm.provision :puppet do |puppet|
+ puppet.manifests_path = "contrib/manifests"
+ puppet.manifest_file = "debian.pp"
+ end
+ end
+
+ # Ubuntu 10.04 LTS (Lucid Lynx)
+ config.vm.define :lucid64 do | config |
+ config.vm.box = "lucid64"
+ config.vm.network :hostonly, "192.168.100.2"
+ config.vm.box_url = "http://files.vagrantup.com/lucid64.box"
+ end
+
+ config.vm.define :freebsd do | config |
+ config.vm.box = "freebsd"
+ config.vm.share_folder "src", "/opt/src", "src", :nfs => false
+ # Force the FreeBSD VM to use a network driver that actually works.
+ config.vm.customize ["modifyvm", :id, "--nictype1", "82543GC"]
+ config.vm.customize ["modifyvm", :id, "--nictype2", "82543GC"]
+ config.vm.network :hostonly, "192.168.100.6"
+ config.vm.box_url = "https://github.com/downloads/xironix/freebsd-vagrant/freebsd_amd64_zfs.box"
+ end
+
+ config.vm.define :centos63 do |config|
+ config.vm.box = "centos63"
+ config.vm.network :hostonly, "192.168.100.8"
+ config.vm.box_url = "https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box"
+ config.vm.provision :puppet do |puppet|
+ puppet.manifests_path = "contrib/manifests"
+ puppet.manifest_file = "redhat.pp"
+ end
+ end
+
+ # Current OmniOS release, see http://omnios.omniti.com/wiki.php/Installation
+ config.vm.define :omnios do | config |
+ config.vm.box = "omnios"
+ config.vm.network :hostonly, "192.168.100.9"
+ config.vm.share_folder "src", "/opt/src/trafficserver.git", ".", :nfs => false
+ config.vm.box_url = "http://omnios.omniti.com/media/omnios-latest.box"
+ config.vm.provision :shell, :path => "contrib/manifests/omnios.sh"
+ end
+
+end
+
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
View
@@ -44,14 +44,16 @@ mkdir -p $DSTROOT
prog() {
case $1 in
cc)
- case $(uname) in
- Darwin) echo clang ;;
+ case $(uname -v) in
+ Darwin*) echo clang ;;
+ omnios*) echo /opt/gcc-4.6.3/bin/gcc ;;
*) echo cc ;;
esac
;;
cxx)
- case $(uname) in
- Darwin) echo clang++ ;;
+ case $(uname -v) in
+ Darwin*) echo clang++ ;;
+ omnios*) echo /opt/gcc-4.6.3/bin/g++ ;;
*) echo c++ ;;
esac
;;
@@ -64,6 +66,12 @@ prog() {
esac
}
+extras() {
+ case $(uname -v) in
+ omnios*) echo --with-tcl=/opt/omni/lib/amd64 ;;
+ esac
+}
+
autogen() {
[[ -e "$SRCROOT/configure" ]] || ( cd $SRCROOT && autoreconf -fi )
}
@@ -78,6 +86,7 @@ configure() {
--enable-debug \
--enable-wccp \
--enable-experimental-plugins \
+ $(extras) \
CC=$CC \
CXX=$CXX
)
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Base ATS build dependencies.
+package {[
+ 'gcc', 'g++', 'automake', 'autoconf', 'libtool',
+ 'libssl-dev', 'tcl-dev', 'libexpat1-dev', 'libpcre3-dev',
+ 'libcap-dev', 'libcap2', 'bison', 'flex', 'make',
+ ]:
+ ensure => latest
+}
+
+# Development extras.
+package {[
+ 'gdb', ,valgrind', 'git', 'ack-grep', 'curl', 'tmux', 'screen'
+ ]:
+ ensure => latest
+}
@@ -0,0 +1,39 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+pkg set-publisher -g http://pkg.omniti.com/omniti-ms/ ms.omniti.com
+
+pkg refresh
+
+# Base ATS build dependencies.
+pkg install \
+ developer/sunstudio12.1 \
+ developer/gcc46 \
+ developer/object-file \
+ developer/linker \
+ developer/library/lint \
+ system/header \
+ system/library/math/header-math \
+ developer/lexer/flex \
+ developer/parser/bison \
+ developer/build/libtool \
+ developer/versioning/git \
+ omniti/runtime/tcl-8 \
+ developer/build/automake-111 \
+ developer/build/autoconf \
+ developer/build/gnu-make || true
+
+pkg update || true
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Base ATS build dependencies.
+package {[
+ 'gcc', 'automake', 'autoconf', 'libtool',
+ 'openssl-devel', 'tcl-devel', 'expat-devel', 'pcre-devel',
+ 'libcap-devel', 'bison', 'flex', 'make',
+ ]:
+ ensure => latest
+}
+
+# development extras.
+package {[
+ 'gdb', 'valgrind', 'git', 'curl', 'screen'
+ ]:
+ ensure => latest
+}

0 comments on commit 79e146a

Please sign in to comment.