6f8f6121b8380a7d04ed80151d2c8c13b911bc76
[releng/builder.git] / packer / provision / java-builder.sh
1 #!/bin/bash
2
3 # vim: sw=4 ts=4 sts=4 et tw=72 :
4
5 # Force any errors to cause the script and job to end in failure
6 set -xeu -o pipefail
7
8 # The following packages are not needed by all projects, but they are
9 # needed by enough to make them useful everywhere
10 yum install -y @development perl-{Digest-SHA,ExtUtils-MakeMaker} \
11     ant {boost,gtest,json-c,libcurl,libxml2,libvirt,openssl}-devel \
12     {readline,unixODBC}-devel yum-utils fedora-packager \
13     libxslt-devel crudini
14
15 # Needed by autorelease scripts
16 yum install -y xmlstarlet
17
18 # Needed by docs project
19 yum install -y graphviz
20
21 # Needed by deploy test
22 yum install -y sshpass
23
24 #########################
25 # Integration/Packaging #
26 #########################
27
28 # Install software for building RPMs
29 yum install -y fedora-packager
30
31 # Needed for vsemprovider build in vtn project to enable C# compilation.
32 rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
33 # Add the mono tools repository
34 yum-config-manager -y --add-repo http://download.mono-project.com/repo/centos/
35 # Install the mono toolchain and nuget
36 yum -y install mono-complete nuget
37
38 # Needed by TSDR
39 echo "---> Installing the Hbase Server..."
40 mkdir /tmp/Hbase
41 cd /tmp/Hbase
42 wget --no-verbose https://archive.apache.org/dist/hbase/hbase-0.94.27/hbase-0.94.27.tar.gz
43 tar -xvf hbase-0.94.27.tar.gz
44
45 # Needed by TSDR
46 echo "---> Installing the Cassandra Server..."
47 mkdir /tmp/cassandra
48 cd /tmp/cassandra
49 wget --no-verbose https://archive.apache.org/dist/cassandra/2.1.16/apache-cassandra-2.1.16-bin.tar.gz
50 tar -xvf apache-cassandra-2.1.16-bin.tar.gz
51
52 # Generally useful for all projects
53 echo "---> Installing the Elasticsearch node..."
54 mkdir /tmp/elasticsearch
55 cd /tmp/elasticsearch
56 wget --no-verbose https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.5.tar.gz
57 tar -xvzf elasticsearch-1.7.5.tar.gz
58
59 # Installs Hashicorp's Packer binary, required for {verify,merge}-packer jobs
60 mkdir /tmp/packer
61 cd /tmp/packer
62 wget https://releases.hashicorp.com/packer/0.12.2/packer_0.12.2_linux_amd64.zip
63 unzip packer_0.12.2_linux_amd64.zip -d /usr/local/bin/
64 # rename packer to avoid conflict with binary in cracklib
65 mv /usr/local/bin/packer /usr/local/bin/packer.io
66