1 The Fedora RPM spec is a work in progress. The current spec can build an
2 RPM package for Fedora that still relies on Maven to include the JAVA
3 artifacts. The plan is to create a dependencies RPM to package up all the
8 Build all the required packages:
9 rpmbuild opendaylight-controller.spec
10 rpmbuild opendaylight-ovsdb.spec
11 rpmbuild opendaylight-dependencies.spec
12 rpmbuild opendaylight-distribution.spec
15 rpm -Uvh opendaylight-distribution
16 * This will install all required packages.
19 sudo systemctl start opendaylight-controller.service
20 sudo systemctl stop opendaylight-controller.service
21 * to get the osgi console: telnet 127.0.0.1 2400
24 Edit the sysconfig file to change the type of distribution:
25 sudo vi /etc/sysconfig/opendaylight-controller
26 Set ODL_DIST to the desired distribution, i.e.
27 ODL_DEST="-virt ovsdb" or ODL_DEST="-virt opendove"
31 1. Get a source tarball:
32 $git clone https://git.opendaylight.org/gerrit/p/controller.git
34 $git archive --prefix=opendaylight-controller-0.1.0/ d684dd4 | xz > opendaylight-controller-0.1.0.tar.xz
37 $rpmbuild -ba opendaylight-controller.spec
40 #rpm -ivp opendaylight-controller-0.1.0-0.1.20131007gitd684dd4.fc19.noarch.rpm
42 4. Start the controller:
43 #su - opendaylight -s /bin/sh -c "export ODL_BASEDIR=/var/lib/opendaylight-controller && export ODL_DATADIR=/var/lib/opendaylight-controller && cd /var/lib/opendaylight-controller && /usr/share/opendaylight-controller/run.sh -start"
44 *** If you need the console then telnet 127.0.0.1 2400 logs
46 4. Stop the controller:
47 #su - opendaylight -s /bin/sh -c "export ODL_BASEDIR=/var/lib/opendaylight-controller && export ODL_DATADIR=/var/lib/opendaylight-controller && cd /var/lib/opendaylight-controller && /usr/share/opendaylight-controller/run.sh -stop"
50 #rpm -e opendaylight-controller-0.1.0-0.1.20131007gitd684dd4.fc19.noarch
53 Using yum for testing.
55 1. Create a local repo:
56 yum install createrepo
58 systemctl start vsftpd.service
60 Add /etc/yum.repos.d/localftp.repo
63 baseurl=file://127.0.0.1/pub
68 2. Add packages to local repo:
69 cp opendaylight-controller.spec /var/ftp/pub
70 cp opendaylight-controller-dependencies.spec /var/ftp/pub
72 3. Update local repo with new packages:
73 Change the enabled=0 to enabled=1 in the localftp.repo file.
74 createrepo /var/ftp/pub
75 yum clean expire-cache
77 4. Verify the repo is there:
82 You could also use a fiel based repo and change the baseurl to:
84 This failed with a network error for me so I switched to ftp.
87 The file system after install should look like
89 /etc/opendaylight-controller/config.ini
90 /usr/share/java/opendaylight-dependencies/{all the non-opendaylight jars from
91 the lib and plugin directories
92 /usr/share/opendaylight-controller/run.bat, run.sh, ..
93 /usr/share/opendaylight-controller/configuration/...
94 /usr/share/opendaylight-controller/lib/*.jar ln's to /usr/share/java/opendaylight-dependencies/*.jar
95 /usr/share/opendaylight-controller/plugins/*.jar ln's to /usr/share/java/opendaylight-dependencies/*.jar
96 /var/lib/opendaylight-controller
97 /var/lib/opendaylight-controller/configuration/ ln's back to /usr/share/opendaylight-controller/configuration
98 /var/lib/opendaylight-controller/lib
99 /var/lib/opendaylight-controller/plugins