Repository: trafficserver
Updated Branches:
refs/heads/master 099ac19f5 -> f057de3f2
TS-4048: restore the Vagrantfile to life
- removed a lot of broken stuff
- added omnios and forced updates of packagelists
- added OmniOS, speed up vm's with more cores and switch jessie
image to one with guest additions
- we don't need thos puppet-files anymore because we use a shell
provisioner
- added some boxes and fixed omnios
- use prebuilt tcl instead of compiling
- added license information
- added optional dependencies
This closes #490.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f057de3f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f057de3f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f057de3f
Branch: refs/heads/master
Commit: f057de3f2c94f00a8e58c2652ca8fed2221b2809
Parents: 099ac19
Author: Christoph Keller <[email protected]>
Authored: Fri Feb 19 22:40:25 2016 +0100
Committer: James Peach <[email protected]>
Committed: Fri Feb 26 13:11:57 2016 -0800
----------------------------------------------------------------------
Vagrantfile | 136 ++++++++++++---------------------------
contrib/manifests/debian.pp | 47 --------------
contrib/manifests/omnios.sh | 38 -----------
contrib/manifests/redhat.pp | 61 ------------------
contrib/vagrant-setup.sh | 102 +++++++++++++++++++++++++++++
5 files changed, 143 insertions(+), 241 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f057de3f/Vagrantfile
----------------------------------------------------------------------
diff --git a/Vagrantfile b/Vagrantfile
index 594ccf9..43ee237 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -15,123 +15,69 @@
# limitations under the License.
$network = {
- # The VM host is 192.168.100.1
- "raring64" => "192.168.100.11",
- "quantal64" => "192.168.100.12",
- "precise64" => "192.168.100.13",
- "lucid64" => "192.168.100.14",
- "centos63" => "192.168.100.15",
- "freebsd" => "192.168.100.16",
- "omnios" => "192.168.100.17",
-
- "raring32" => "192.168.200.11",
- "quantal32" => "192.168.200.12",
- "precise32" => "192.168.200.13",
- "lucid32" => "192.168.200.14",
-
- "fedora18" => "192.168.200.15",
- "centos59" => "192.168.200.16",
- "centos64" => "192.168.200.17",
- "debian7" => "192.168.200.18",
- "sles11" => "192.168.200.19",
- "oel63" => "192.168.200.20",
-
- "saucy64" => "192.168.100.21",
- "saucy32" => "192.168.100.22",
- "trusty64" => "192.168.100.23",
- "trusty32" => "192.168.100.24",
+ "trusty_64" => "192.168.2.101",
+ "trusty_32" => "192.168.2.102",
+ "jessie_64" => "192.168.2.103",
+ "jessie_32" => "192.168.2.104",
+ "centos7_64" => "192.168.2.105",
+ "centos6_64" => "192.168.2.106",
+ "centos6_32" => "192.168.2.107",
+ "omnios" => "192.168.2.108",
}
$vmspec = {
- "lucid64" => [ # Ubuntu 10.04 LTS (Lucid Lynx)
- "http://files.vagrantup.com/lucid64.box", "debian.pp"
+ "trusty_64" => [
+ "ubuntu/trusty64"
],
- "fedora18" => [
- "http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210.box",
"redhat.pp"
+ "trusty_32" => [
+ "ubuntu/trusty32"
],
- "centos63" => [
- "https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box",
"redhat.pp"
+ "jessie_64" => [
+ "puppetlabs/debian-8.2-64-nocm"
],
- "centos59" => [
- "http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210.box",
"redhat.pp",
+ "jessie_32" => [
+ "puppetlabs/debian-8.2-32-nocm"
],
- "centos64" => [
- "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box",
"redhat.pp",
+ "centos7_64" => [
+ "puppetlabs/centos-7.2-64-nocm"
],
- "debian7" => [
-
"http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210.box",
"debian.pp",
+ "centos6_64" => [
+ "puppetlabs/centos-6.6-64-nocm"
],
- "sles11" => [
- "http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210.box",
"redhat.pp",
+ "centos6_32" => [
+ "puppetlabs/centos-6.6-32-nocm"
],
- "oel63" => [
- "http://ats.boot.org/vagrant/vagrant-oel63-x64.box", "redhat.pp",
+ "omnios" => [
+ "omniti/omnios-r151014"
],
}
Vagrant.configure("2") do |config|
- # Default all VMs to 1GB.
+ # Default all VMs to 1GB and 2 cores
config.vm.provider :virtualbox do |v|
- v.customize ["modifyvm", :id, "--memory", 1024]
- end
-
- # 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.synced_folder ".", "/opt/src/trafficserver.git", :nfs => true
-
- # Always forward SSH keys to VMs.
- config.ssh.forward_agent = true
-
- # Ubuntu 14.04 (Trusty Tahr)
- # Ubuntu 13.04 (Raring Ringtail)
- # Ubuntu 12.10 (Quantal Quetzal)
- # Ubuntu 12.04 LTS (Precise Pangolin)
- ["i386", "amd64"].each { |arch|
- ['saucy', 'raring', 'quantal', 'precise', 'trusty' ].each { |release|
- n = { "i386" => "32", "amd64" => "64" }[arch]
- config.vm.define "#{release}#{n}" do | config |
- config.vm.box = "#{release}#{n}"
- config.vm.box_url =
"http://cloud-images.ubuntu.com/vagrant/#{release}/current/#{release}-server-cloudimg-#{arch}-vagrant-disk1.box"
- config.vm.network :private_network, ip: $network["#{release}#{n}"]
- config.vm.provision :puppet do |puppet|
- puppet.manifests_path = "contrib/manifests"
- puppet.manifest_file = "debian.pp"
- end
- end
- }
- }
-
- config.vm.define :freebsd do | config |
- config.vm.box = "freebsd"
- config.vm.synced_folder ".", "/opt/src/trafficserver.git", :nfs => false
- # Force the FreeBSD VM to use a network driver that actually works.
- config.vm.provider :virtualbox do |v|
- v.customize ["modifyvm", :id, "--nictype1", "82543GC"]
- v.customize ["modifyvm", :id, "--nictype2", "82543GC"]
- end
- config.vm.network :private_network, ip: $network["freebsd"]
- config.vm.box_url =
"https://github.com/downloads/xironix/freebsd-vagrant/freebsd_amd64_zfs.box"
+ v.memory = 1024
+ v.cpus = 2
end
- # Current OmniOS release, see http://omnios.omniti.com/wiki.php/Installation
- config.vm.define :omnios do | config |
- config.vm.box = "omnios"
- config.vm.guest = :solaris
- config.vm.network :private_network, ip: $network["omnios"]
- config.vm.synced_folder ".", "/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
+ config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
$vmspec.each do | name, spec |
config.vm.define name do | config |
- config.vm.box = name
- config.vm.box_url = spec[0]
+ if name == 'omnios'
+ # nfs seems to be the only way to make this work for omnios
+ # this method fails if hostfs is encrypted
+ config.vm.synced_folder ".", "/vagrant", type: "nfs"
+ config.ssh.username = "root"
+ config.ssh.password = "vagrant"
+ else
+ config.vm.synced_folder ".", "/vagrant"
+ end
+ config.vm.box = spec[0]
config.vm.network :private_network, ip: $network[name]
- config.vm.provision :puppet do |puppet|
- puppet.manifests_path = "contrib/manifests"
- puppet.manifest_file = spec[1]
+ config.vm.provision "shell" do |s|
+ s.path = "contrib/vagrant-setup.sh"
+ s.args = name
end
end
end
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f057de3f/contrib/manifests/debian.pp
----------------------------------------------------------------------
diff --git a/contrib/manifests/debian.pp b/contrib/manifests/debian.pp
deleted file mode 100644
index d799ab1..0000000
--- a/contrib/manifests/debian.pp
+++ /dev/null
@@ -1,47 +0,0 @@
-# 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', 'pkg-config',
- 'libssl-dev', 'tcl-dev', 'libexpat1-dev', 'libpcre3-dev', 'libhwloc-dev',
- 'libcurl3-dev', 'libncurses5-dev', 'libaio-dev',
- 'libcap-dev', 'libcap2', 'bison', 'flex', 'make',
- 'libmodule-install-perl', 'libunwind8-dev'
- ]:
- ensure => latest
-}
-
-# Development extras.
-package {[
- 'gdb', 'valgrind', 'git', 'ack-grep', 'curl', 'tmux', 'screen',
- 'ccache', 'python-sphinx', 'doxygen',
-
- # For parsing Doxygen XML output, to add links from API descriptions
- # to the source code for that object
- 'python-lxml'
- ]:
- ensure => latest
-}
-
-# if there is clang-3.4 available, install it:
-if $::lsbdistcodename == 'saucy' {
- package {[
- 'clang-3.4', 'clang-format-3.4'
- ]:
- ensure => latest,
- }
-}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f057de3f/contrib/manifests/omnios.sh
----------------------------------------------------------------------
diff --git a/contrib/manifests/omnios.sh b/contrib/manifests/omnios.sh
deleted file mode 100644
index 75b5a4f..0000000
--- a/contrib/manifests/omnios.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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/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
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f057de3f/contrib/manifests/redhat.pp
----------------------------------------------------------------------
diff --git a/contrib/manifests/redhat.pp b/contrib/manifests/redhat.pp
deleted file mode 100644
index 56c29c4..0000000
--- a/contrib/manifests/redhat.pp
+++ /dev/null
@@ -1,61 +0,0 @@
-# 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.
-
-# These packages really need to be installed before anything happens.
-package {['nfs-utils', 'redhat-lsb']:
- ensure =>latest
-}
-
-$source = $lsbmajdistrelease ? {
- '5' => 'http://mirror.pnl.gov/epel/5/i386/epel-release-5-4.noarch.rpm',
- '6' => 'http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm',
- default => 'http://mirror.pnl.gov/epel/7/i386/epel-release-7-2.noarch.rpm',
-}
-
-package {'epel-release':
- source => $source,
- provider => rpm,
- ensure => present,
-}
-
-# Base ATS build dependencies.
-package {[
- 'gcc', 'gcc-c++', 'automake', 'autoconf', 'libtool', 'pkgconfig',
- 'openssl-devel', 'tcl-devel', 'expat-devel', 'pcre-devel',
- 'ncurses-devel', 'libaio-devel', 'libunwind-devel',
- 'hwloc-devel', 'libcap-devel', 'bison', 'flex', 'make',
- ]:
- ensure => latest
-}
-
-package { $lsbmajdistrelease ? { '5' => 'curl-devel', default =>
'libcurl-devel'}:
- ensure => latest
-}
-
-# RHEL/CentOS 5 doesn't have MakeMaker and I don't know what package to use
instead :(
-if $lsbmajdistrelease != '5' {
- package{'perl-ExtUtils-MakeMaker':
- ensure => latest
- }
-}
-
-# development extras.
-package {[
- 'gdb', 'valgrind', 'git', 'curl', 'screen', 'ccache'
- ]:
- ensure => latest,
- require => Package['epel-release']
-}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f057de3f/contrib/vagrant-setup.sh
----------------------------------------------------------------------
diff --git a/contrib/vagrant-setup.sh b/contrib/vagrant-setup.sh
new file mode 100644
index 0000000..018e53c
--- /dev/null
+++ b/contrib/vagrant-setup.sh
@@ -0,0 +1,102 @@
+#!/bin/bash
+
+# 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.
+
+set -e
+set -o pipefail
+
+case ${1} in
+trusty*|jessie*)
+ sed -i 's/^mesg n$/tty -s \&\& mesg n/g' /root/.profile
+ apt-get update
+ apt-get install -y \
+ autoconf \
+ automake \
+ build-essential \
+ clang \
+ libcap-dev \
+ libcurl4-openssl-dev \
+ libexpat-dev \
+ libhwloc-dev \
+ liblua5.2-dev \
+ libpcre3-dev \
+ libssl-dev \
+ libxml2-dev \
+ m4 \
+ ncurses-dev \
+ tcl-dev
+
+;;
+centos*)
+ yum install -y \
+ autoconf \
+ automake \
+ clang \
+ expat-devel \
+ flex \
+ gcc \
+ gcc-c++ \
+ hwloc-devel \
+ libcap-devel \
+ libcurl-devel d\
+ libtool \
+ libxml2-devel \
+ lua-devel \
+ m4 \
+ ncurses-devel \
+ openssl-devel \
+ pcre-devel \
+ tcl-devel
+;;
+omnios)
+ export PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/gcc-4.8.1/bin
+ echo "export
PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/gcc-4.8.1/bin" >> /root/.profile
+ RC=0
+ if [[ ! $(grep http://pkg.omniti.com/omniti-ms/ /var/pkg/pkg5.image) ]];
then
+ pkg set-publisher -g http://pkg.omniti.com/omniti-ms/ ms.omniti.com
+ fi
+ pkg refresh
+ pkg install \
+ archiver/gnu-tar \
+ developer/build/autoconf \
+ developer/build/automake \
+ developer/build/gnu-make \
+ developer/build/libtool \
+ developer/gcc48 \
+ developer/lexer/flex \
+ developer/library/lint \
+ developer/linker \
+ developer/object-file \
+ developer/parser/bison \
+ library/idnkit \
+ library/idnkit/header-idnkit \
+ omniti/runtime/tcl-8 \
+ omniti/system/hwloc \
+ system/header \
+ system/library/math \
+ || RC=${?}
+ if [[ ${RC} != 0 ]] && [[ ${RC} != 4 ]]; then
+ exit 1
+ fi
+;;
+*)
+ echo "no config for ${1}"
+ exit 1
+;;
+esac
+
+exit 0