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
6 1. Get a source tarball:
7 $git clone https://git.opendaylight.org/gerrit/p/controller.git
9 $git archive --prefix=opendaylight-controller-0.1.0/ d684dd4 | xz > opendaylight-controller-0.1.0.tar.xz
12 $rpmbuild -ba opendaylight-controller.spec
15 #rpm -ivp opendaylight-controller-0.1.0-0.1.20131007gitd684dd4.fc19.noarch.rpm
17 4. Start the controller:
18 #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"
19 *** If you need the console then telnet 127.0.0.1 2400 logs
21 4. Stop the controller:
22 #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"
25 #rpm -e opendaylight-controller-0.1.0-0.1.20131007gitd684dd4.fc19.noarch
28 Using yum for testing.
30 1. Create a local repo:
31 yum install createrepo
33 systemctl start vsftpd.service
35 Add /etc/yum.repos.d/localftp.repo
38 baseurl=file://127.0.0.1/pub
43 2. Add packages to local repo:
44 cp opendaylight-controller.spec /var/ftp/pub
45 cp opendaylight-controller-dependencies.spec /var/ftp/pub
47 3. Update local repo with new packages:
48 Change the enabled=0 to enabled=1 in the localftp.repo file.
49 createrepo /var/ftp/pub
50 yum clean expire-cache
52 4. Verify the repo is there:
57 You could also use a fiel based repo and change the baseurl to:
59 This failed with a network error for me so I switched to ftp.
62 The file system after install should look like
64 /etc/opendaylight-controller/config.ini
65 /usr/share/java/opendaylight-dependencies/{all the non-opendaylight jars from
66 the lib and plugin directories
67 /usr/share/opendaylight-controller/run.bat, run.sh, ..
68 /usr/share/opendaylight-controller/configuration/...
69 /usr/share/opendaylight-controller/lib/*.jar ln's to /usr/share/java/opendaylight-dependencies/*.jar
70 /usr/share/opendaylight-controller/plugins/*.jar ln's to /usr/share/java/opendaylight-dependencies/*.jar
71 /var/lib/opendaylight-controller
72 /var/lib/opendaylight-controller/configuration/ ln's back to /usr/share/opendaylight-controller/configuration
73 /var/lib/opendaylight-controller/lib
74 /var/lib/opendaylight-controller/plugins