Merge "Fix iotdm.yaml for nitrogen and carbon"
[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 # Install python3 and dependencies, needed for Coala linting at least
16 yum install -y python34
17 yum install -y python34-{devel,virtualenv,setuptools,pip}
18
19 # Install python dependencies, useful generally
20 yum install -y python-{devel,virtualenv,setuptools,pip}
21
22 # Use pip to install newer version of git-review
23 pip install git-review --upgrade
24
25 # Needed by autorelease scripts
26 yum install -y xmlstarlet
27
28 # Needed by docs project
29 yum install -y graphviz
30
31 # Needed by deploy test
32 yum install -y sshpass
33
34 # tcpmd5 is wanting to do 32bit ARM cross-compilation and is specifically
35 # requesting the following be installed (note the kernel headers are
36 # going to be the x86_64 package as there aren't separate 32bit and
37 # x86_64 packages for them
38 yum install -y glibc-devel.i686 kernel-headers
39
40 # Needed by opendove
41 yum install -y {jansson,libevent,libnl,libuuid}-devel
42
43 # Needed for vsemprovider build in vtn project to enable C# compilation.
44 rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
45 # Add the mono tools repository
46 yum-config-manager -y --add-repo http://download.mono-project.com/repo/centos/
47 # Install the mono toolchain and nuget
48 yum -y install mono-complete nuget
49
50 # Needed by TSDR
51 echo "---> Installing the Hbase Server..."
52 mkdir /tmp/Hbase
53 cd /tmp/Hbase
54 wget --no-verbose https://archive.apache.org/dist/hbase/hbase-0.94.27/hbase-0.94.27.tar.gz
55 tar -xvf hbase-0.94.27.tar.gz
56
57 # Needed by TSDR
58 echo "---> Installing the Cassandra Server..."
59 mkdir /tmp/cassandra
60 cd /tmp/cassandra
61 wget --no-verbose https://archive.apache.org/dist/cassandra/2.1.16/apache-cassandra-2.1.16-bin.tar.gz
62 tar -xvf apache-cassandra-2.1.16-bin.tar.gz
63
64 # Generally useful for all projects
65 echo "---> Installing the Elasticsearch node..."
66 mkdir /tmp/elasticsearch
67 cd /tmp/elasticsearch
68 wget --no-verbose https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.5.tar.gz
69 tar -xvzf elasticsearch-1.7.5.tar.gz
70
71 # Installs Hashicorp's Packer binary, required for {verify,merge}-packer jobs
72 mkdir /tmp/packer
73 cd /tmp/packer
74 wget https://releases.hashicorp.com/packer/0.12.2/packer_0.12.2_linux_amd64.zip
75 unzip packer_0.12.2_linux_amd64.zip -d /usr/local/bin/
76 # rename packer to avoid conflict with binary in cracklib
77 mv /usr/local/bin/packer /usr/local/bin/packer.io
78
79 #Check out 6Wind quagga with tag name '20170418', compile and install for router functionalities
80 echo "---> Installing the Quagga..."
81 mkdir -p /tmp/build_quagga
82 cd /tmp/build_quagga
83 git clone https://github.com/6WIND/zrpcd.git
84 cd zrpcd
85 git checkout 20170418
86 chmod a+x /tmp/build_quagga/zrpcd/pkgsrc/dev_compile_script.sh
87 /tmp/build_quagga/zrpcd/pkgsrc/dev_compile_script.sh -d -b -t -v 2
88
89 # Removing the build_quagga folder
90 rm -rf /tmp/build_quagga/