Merge "Add Robot Framework and RIDE to fedora VM tool"
[integration/test.git] / test / tools / tools_vm / scripts / fedora.sh
1 #!/usr/bin/env bash
2
3 # --------------------------------------------
4 # External shell provisioner script for Fedora
5 # --------------------------------------------
6
7 # Set HOME variable for this script
8 HOME="/home/vagrant"
9
10 # Install initial packages
11 sudo yum install -y \
12   git \
13   puppet \
14   python-pip \
15   python-devel
16
17 # ----------------
18 # Install netopeer
19 # ----------------
20
21 # Install required dependencies
22 sudo yum install -y \
23   readline \
24   readline-devel \
25   libssh2 \
26   libssh2-devel \
27   libxml2 \
28   libxml2-devel \
29   libxml2-python \
30   libxslt \
31   libxslt-devel \
32   libcurl \
33   libcurl-devel \
34   dbus \
35   dbus-devel \
36   libevent \
37   libevent-devel \
38   libssh-devel \
39   libtool \
40   doxygen
41
42 # Install pyang (extensible YANG validator and converter in python)
43 cd $HOME && git clone https://github.com/mbj4668/pyang.git
44 sudo chown -R vagrant:vagrant $HOME/pyang/
45 cd $HOME/pyang/ && sudo python setup.py install
46
47 # Install libnetconf (NETCONF library in C)
48 cd $HOME && git clone https://code.google.com/p/libnetconf
49 sudo chown -R vagrant:vagrant $HOME/libnetconf/
50   cd $HOME/libnetconf/ && \
51   sh configure --prefix=/usr --with-nacm-recovery-uid=1000 && \
52   make && \
53   sudo make install
54
55 # Install netopeer (set of NETCONF tools built on the libnetconf library)
56 cd $HOME && git clone https://code.google.com/p/netopeer
57 sudo chown -R vagrant:vagrant $HOME/netopeer/
58   cd $HOME/netopeer/server/ && \
59   sh configure --prefix=/usr && \
60   make && \
61   sudo make install
62
63 # --------------------------------
64 # Install Robot Framework and RIDE
65 # --------------------------------
66
67 # Install required dependencies
68 sudo yum install -y \
69   wxGTK-devel \
70   gcc-c++ \
71   xorg-x11-xauth
72
73 # Install Robot Framework libraries
74 sudo pip install \
75   robotframework-ride \
76   robotframework-sshlibrary \
77   robotframework-requests
78
79 # Install wxPython, a blending of the wxWidgets C++ class library used for RIDE
80 cd $HOME && \
81   wget http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/wxPython-src-2.8.12.1.tar.bz2 && \
82   tar -xjvf wxPython-src-2.8.12.1.tar.bz2 && \
83   rm wxPython-src-2.8.12.1.tar.bz2 && \
84   cd wxPython-src-2.8.12.1/wxPython && \
85   python setup.py build && \
86   sudo python setup.py install
87
88 # Add 'ride' alias for quietly running RIDE gui
89 echo "alias ride=\"nohup ride.py >/dev/null 2>&1 &\"" >> $HOME/.bashrc