Merge "Add dependencies to bgpcep.cfg, create tcpmd5.cfg"
[releng/builder.git] / vagrant / basic-mininet-node / bootstrap.sh
1 #!/bin/bash
2
3 # vim: sw=4 ts=4 sts=4 et tw=72 :
4
5 yum clean all
6 # Add the ODL yum repo (not needed for java nodes, but useful for
7 # potential later layers)
8 yum install -q -y https://nexus.opendaylight.org/content/repositories/opendaylight-yum-epel-6-x86_64/rpm/opendaylight-release/0.1.0-1.el6.noarch/opendaylight-release-0.1.0-1.el6.noarch.rpm
9
10 # Make sure the system is fully up to date
11 yum update -q -y
12
13 # Add in git (needed for most everything) and XML-XPath as it is useful
14 # for doing CLI based CML parsing of POM files
15 yum install -q -y git perl-{XML-XPath,Digest-SHA}
16
17 # install all available openjdk-devel sets
18 yum install -q -y 'java-*-openjdk-devel'
19
20 # we currently use Java7 (aka java-1.7.0-openjdk) as our standard make
21 # sure that this is the java that alternatives is pointing to, dynamic
22 # spin-up scripts can switch to any of the current JREs installed if
23 # needed
24 alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
25 alternatives --set java_sdk_openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64
26
27 # To handle the prompt style that is expected all over the environment
28 # with how use use robotframework we need to make sure that it is
29 # consistent for any of the users that are created during dynamic spin
30 # ups
31 echo 'PS1="[\u@\h \W]> "' >> /etc/skel/.bashrc
32
33 # add in mininet, openvswitch, and netopeer
34 yum install -q -y netopeer-server-sl CPqD-ofsoftswitch13 mininet \
35     telnet openvswitch
36
37 # we need semanage installed for some of the next bit
38 yum install -q -y policycoreutils-python
39
40 # netconf / netopeer needs some special modifications to ssh
41 semanage port -a -t ssh_port_t -p tcp '830'
42
43 # The default /etc/ssh/sshd_config doesn't actually specify a port as such
44 # we need to specify both 22 as well as 830 along with the netconf
45 # subsystem
46 echo << EOSSH >> /etc/ssh/sshd_config
47
48 # Added for netconf / netopeer testing
49 Port 22
50 Port 830
51 Subsystem netconf /usr/bin/netopeer-server-sl
52 EOSSH
53
54 # set the system up for VTN as well (note we are not adding all the bits
55 # to allow VTN to operate in the Hydrogen design erra)
56 mkdir /usr/local/vtn
57
58 yum install -q -y http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm
59 yum install -q -y postgresql93{,-{contrib,libs,server,odbc}}
60 chkconfig postgresql-9.3 off
61
62 # the current deploy_vtn.sh script used by integration will be pushed
63 # into the system during dynamic spin-up as it has changed often enough
64 # that sticking it into the image may not be good as changing it would
65 # either require updating the image or doing it during the dynamic
66 # spin-up anyway.