Table of Contents
Developing Openstack and Opendaylight
Vagrant
Devstack
Firewall Issues
curl 'http://localhost:80
If not work, may be libvirtd reconfigured the iptables rules. So open it up.
Allow Input from subnet:
iptables -I INPUT -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED iptables -I INPUT -j ACCEPT -m conntrack --ctstate NEW -p tcp --source 123.123.0.0/16 iptables -I OUTPUT -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED
The scripts
stack.sh: setup openstack and start components. All code are downloaded and installed here:
/opt/stack
unstack.sh: terminate openstack component. You can reboot VM now.
rejoin-stack.sh: start openstack from last reboot and activate screens.
clean.sh: Does its best to eradicate traces of a Grenade run except for the following: - both base and target code repos are left alone - packages (system and pip) are left alone. This is used if you want to erase all the OpenStack related files from your system.
exercise.sh: This script runs all the examples present in the devstack/exercises directory and reports on the results. The exercises directory contains the test scripts used to validate and demonstrate some OpenStack functions. These scripts know how to exit early or skip services that are not enabled.
screen
List all sessions: ctrl+a “
Detach screen (leave session running): ctrl+a d
Detach screen (kill session): ctrl+a D
Next-Prev: ctrl+a p / n
Openstack Logs
ls /opt/stack/log/
Terminate Openstack
$ cd ~/devstack $ screen -dR ctrl-a :quit $ ./rejoin-stack.sh ctrl-a d I had *thought* that this was described on http://devstack.org/ somewhere, however I cannot find it now (funny how often that happens). The only bugs with the above procedure I have seen is that some services are not correctly terminated by the screen quit (looking at you Swift and Trove) and you need to kill 'em before rejoining...
Developing OVSDB ODL
1st Step: OVSDB in Eclipse for Debug
-
- ODL app tutorial: http://sdnhub.org/tutorials/opendaylight/
- Debug ODL w Eclipse: https://alagalah.wordpress.com/2013/12/14/debugging-opendaylight-in-eclipse/
- Get code & import: https://wiki.opendaylight.org/view/OVSDB:Developer_Guide#Testing_patches
- Test with Ostack: https://wiki.opendaylight.org/view/OVSDB:OVSDB_OpenStack_Guide
Create Eclipse Luna workspace: /mnt/nfv/odl/10odldevws → /home/dang/data/src/50imovefanws/10odldevws
Setup eclipse & import controller: https://wiki.opendaylight.org/view/OpenDaylight_Controller:Eclipse_CLI_Setup
Pull ovsdb source: http://docs.inocybe.com/dev-guide/content/_pulling_code_via_git_cli.html
Create branch from Helium-SR2
cd ovsdb git tag -l git checkout -b td_helium-sr2 release/helium-sr2
Compile ovsdb
mvn clean install
Some Test Errors:
- read the README!
Solution: disable Karaf distribution in pom.xml:49 –
> us osgi distribution.
h
ttps:bugs.opendaylight.org/show_bug.cgi?id=1669
==== Test with Openstack ====
OVSDB osgi show a lot of errors. The master does not find oldparent pom. Try install controller first:
git clone https://git.opendaylight.org/gerrit/p/controller.git
git checkout -b td_helium remotes/origin/stable/helium
mvn clean install -DskipTests
git clone https://git.opendaylight.org/gerrit/p/ovsdb.git
git checkout -b td-helium-sr2 release/helium-sr2