1 Everything required for building the Karaf OpenDaylight RPM.
3 Note that the currently supported version is Helium SR3.
5 ## Vagrant build environment
7 The included `Vagrantfile` provides a simple, but tested and known-working, build environment. We recommend using it when building an ODL RPM.
10 [~/integration/packaging/rpm]$ vagrant status
11 Current machine states:
13 default not created (virtualbox)
14 [~/integration/packaging/rpm]$ vagrant up
15 [~/integration/packaging/rpm]$ vagrant ssh
16 [vagrant@localhost vagrant]$ cd /vagrant/
17 [vagrant@localhost vagrant]$ ls
18 build.sh connect.sh install.sh opendaylight.spec README.md Vagrantfile
23 The `build.sh` script is a helper for building the RPM.
27 Location: /home/vagrant/rpmbuild/SRPMS/opendaylight-0.2.3-1.fc20.src.rpm
28 Assuming you want to move RPM off Vagrant box
29 Also renaming RPM, not actually tagged as for FC20 target OS
30 cp /home/vagrant/rpmbuild/SRPMS/opendaylight-0.2.3-1.fc20.src.rpm /vagrant/opendaylight-0.2.3-1.src.rpm
32 Location: /home/vagrant/rpmbuild/RPMS/noarch/opendaylight-0.2.3-1.fc20.noarch.rpm
33 Assuming you want to move RPM off Vagrant box
34 Also renaming RPM, not actually tagged as for FC20 target OS
35 cp /home/vagrant/rpmbuild/RPMS/noarch/opendaylight-0.2.3-1.fc20.noarch.rpm /vagrant/opendaylight-0.2.3-1.noarch.rpm
38 ## Working with the ODL RPM
40 The familiar RPM-related commands apply to the OpenDaylight RPM.
42 ### Installing OpenDaylight via the RPM
44 The `install.sh` script is a helper for doing the install.
47 [vagrant@localhost vagrant]$ ./install.sh
48 Installing ODL from ./opendaylight-0.2.3-1.noarch.rpm
51 Here's a manual walk-through of the install and the resulting system changes.
54 # Note that there's nothing in /opt before the install
55 [vagrant@localhost vagrant]$ ls /opt/
56 # Note that there are no opendaylight systemd files before install
57 [vagrant@localhost vagrant]$ ls /usr/lib/systemd/system | grep -i opendaylight
58 # If you want to test the install in the provided build env, install Java
59 [vagrant@localhost vagrant]$ sudo yum install -y java
61 [vagrant@localhost vagrant]$ sudo rpm -i opendaylight-0.2.3-1.noarch.rpm
62 # Note that ODL is now installed in /opt
63 [vagrant@localhost vagrant]$ ls /opt/
65 # Note that there's now a systemd .service file for ODL
66 [vagrant@localhost vagrant]$ ls /usr/lib/systemd/system | grep -i opendaylight
70 ### Uninstalling OpenDaylight via the RPM
72 The `uninstall.sh` script is a helper for uninstalling ODL.
75 [vagrant@localhost vagrant]$ ./uninstall.sh
76 Uninstalling opendaylight-0.2.3
79 Here's a manual walk-through of the uninstall and the resulting system changes.
82 # Note that ODL is installed in /opt/
83 [vagrant@localhost vagrant]$ ls /opt/
85 # Note that there's a systemd .service file for ODL
86 [vagrant@localhost vagrant]$ ls /usr/lib/systemd/system | grep -i opendaylight
88 # Uninstall the ODL RPM
89 [vagrant@localhost vagrant]$ sudo rpm -e opendaylight-0.2.3
90 # Note that ODL has been removed from /opt/
91 [vagrant@localhost vagrant]$ ls /opt/
92 # Note that the ODL systemd .service file has been removed
93 [vagrant@localhost vagrant]$ ls /usr/lib/systemd/system | grep -i opendaylight
96 ## Managing OpenDaylight via systemd
98 The OpenDaylight RPM ships with systemd support.
100 ### Starting OpenDaylight via systemd
103 [vagrant@localhost vagrant]$ sudo systemctl start opendaylight
104 [vagrant@localhost vagrant]$ sudo systemctl status opendaylight
105 opendaylight.service - OpenDaylight SDN Controller
106 Loaded: loaded (/usr/lib/systemd/system/opendaylight.service; disabled)
107 Active: active (running) since Mon 2015-03-23 21:45:40 UTC; 34s ago
108 Docs: https://wiki.opendaylight.org/view/Main_Page
109 http://www.opendaylight.org/
110 Process: 13839 ExecStart=/opt/opendaylight/bin/start (code=exited, status=0/SUCCESS)
111 Main PID: 13846 (java)
112 CGroup: /system.slice/opendaylight.service
113 └─13846 java -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -X...
115 Mar 23 21:45:40 localhost.localdomain systemd[1]: Starting OpenDaylight SDN Control....
116 Mar 23 21:45:40 localhost.localdomain systemd[1]: Started OpenDaylight SDN Controller.
119 ### Stopping OpenDaylight via systemd
122 [vagrant@localhost vagrant]$ sudo systemctl stop opendaylight
123 [vagrant@localhost vagrant]$ sudo systemctl status opendaylight
124 opendaylight.service - OpenDaylight SDN Controller
125 Loaded: loaded (/usr/lib/systemd/system/opendaylight.service; disabled)
126 Active: inactive (dead)
127 Docs: https://wiki.opendaylight.org/view/Main_Page
128 http://www.opendaylight.org/
132 ## Connecting to the Karaf shell
134 A few seconds after OpenDaylight is started, its Karaf shell will be accessible.
136 The `connect.sh` script is provided as an example of how to connect to the Karaf shell.
139 [vagrant@localhost vagrant]$ ./connect.sh
140 Installing sshpass. It's used connecting non-interactively
142 opendaylight-user@root>
145 Additionally, here's an example of connecting manually (password: `karaf`):
148 [vagrant@localhost vagrant]$ ssh -p 8101 -o StrictHostKeyChecking=no karaf@localhost
149 Authenticated with partial success.
150 Password authentication
153 ________ ________ .__ .__ .__ __
154 \_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_
155 / | \\____ \_/ __ \ / \ | | \\__ \< | || | | |/ ___\| | \ __\
156 / | \ |_> > ___/| | \| ` \/ __ \\___ || |_| / /_/ > Y \ |
157 \_______ / __/ \___ >___| /_______ (____ / ____||____/__\___ /|___| /__|
158 \/|__| \/ \/ \/ \/\/ /_____/ \/
161 Hit '<tab>' for a list of available commands
162 and '[cmd] --help' for help on a specific command.
163 Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.
165 opendaylight-user@root>^D
166 Connection to localhost closed.
167 [vagrant@localhost vagrant]$