3 # --------------------------------------------
4 # External shell provisioner script for Fedora
5 # --------------------------------------------
6 echo "Preparing basic environnement"
8 # Set HOME variable for this script
11 # Add a nice login message
12 su -c "cp /vagrant/scripts/welcome.txt /etc/motd"
14 # Install initial packages
15 su -c "yum install -y \
24 echo "Installing netopeer"
26 # Install required dependencies
27 su -c "yum install -y \
47 # Install pyang (extensible YANG validator and converter in python)
49 git clone https://github.com/mbj4668/pyang.git && \
50 su -c "chown -R vagrant:vagrant $HOME/pyang/" && \
52 su -c "python setup.py install"
54 # Install libnetconf (NETCONF library in C)
56 git clone https://github.com/cesnet/libnetconf && \
57 su -c "chown -R vagrant:vagrant $HOME/libnetconf/" && \
58 cd $HOME/libnetconf/ && \
59 sh configure --prefix=/usr --with-nacm-recovery-uid=1000 && \
63 # Install netopeer (set of NETCONF tools built on the libnetconf library)
65 git clone https://github.com/cesnet/netopeer && \
66 su -c "chown -R vagrant:vagrant $HOME/netopeer/" && \
67 cd $HOME/netopeer/server/ && \
68 sh configure --prefix=/usr && \
72 # --------------------------------
73 # Install Robot Framework and RIDE
74 # --------------------------------
75 echo "Installing Robot Framework and RIDE"
77 # Install required dependencies
78 su -c "yum install -y \
83 # Install Robot Framework libraries
86 robotframework-sshlibrary \
87 robotframework-requests"
89 # Install wxPython, a blending of the wxWidgets C++ class library used for RIDE
91 wget -e dotbytes=1M http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/wxPython-src-2.8.12.1.tar.bz2 && \
92 tar -xvjf wxPython-src-2.8.12.1.tar.bz2 && \
93 rm wxPython-src-2.8.12.1.tar.bz2 && \
94 cd wxPython-src-2.8.12.1/wxPython && \
95 python setup.py build && \
96 su -c "python setup.py install"
99 # Install Pyangbind, a tool to generate python bindings which can be further used to
100 # generate JSON dict for yang files.
101 echo "Installing Pyangbind plugin"
102 su -c "pip install pyangbind"
104 # ----------------------------
105 # Add aliases to run the tools
106 # ----------------------------
107 echo "Creating aliases"
109 # Add 'ride' alias for quietly running RIDE gui
110 echo "alias ride=\"nohup ride.py >/dev/null 2>&1 &\"" >> $HOME/.bashrc
112 # Add 'karaf' alias for running karaf shell
113 echo "alias karaf=\"sh /vagrant/scripts/connect.sh\"" >> $HOME/.bashrc