17:03:14 <colindixon> #startmeeting tws
17:03:14 <odl_meetbot> Meeting started Mon Aug  4 17:03:14 2014 UTC.  The chair is colindixon. Information about MeetBot at http://ci.openstack.org/meetbot.html.
17:03:14 <odl_meetbot> Useful Commands: #action #agreed #help #info #idea #link #topic #startvote.
17:03:14 <odl_meetbot> The meeting name has been set to 'tws'
17:03:23 <colindixon> #chair Madhu phrobb
17:03:23 <odl_meetbot> Current chairs: Madhu colindixon phrobb
17:03:31 <colindixon> mlemay_: you around?
17:03:39 <colindixon> #topic agenda bashing
17:03:42 <mlemay_> yup
17:03:53 <mlemay_> it’s loading
17:03:54 <Madhu> mlemay_: u joining us on TWS call ?
17:04:08 <colindixon> #link https://wiki.opendaylight.org/view/Tech_Work_Stream:Main this is the main page for the TWS call
17:04:12 <mlemay_> of course
17:04:15 <Madhu> mlemay_: i was about to do the Karaf if u didn't show up... thank god that didn't happen ;)
17:04:21 <mlemay_> just had someone in the office
17:04:21 <colindixon> #info today’s agenda is covering the usage of karaf
17:05:40 <Madhu> mlemay_: a bunch of folks are waiting ;)
17:07:35 <colindixon> #topic karaf hands on
17:07:37 <Madhu> #info hands-on walk-through by mlemay_ on Karaf for ODL Helium release
17:07:59 <colindixon> #info note that this is being recorded and will be posted
17:08:21 <colindixon> #link https://wiki.opendaylight.org/view/Runtime:Karaf_Features_Guidelines this is the first resource you should go to to get started
17:08:31 <colindixon> #info mlemay_ is also working on an archetype which will help
17:09:35 <colindixon> #topic creating the feature pom file
17:09:38 <Madhu> #info the convention is to create a directory named : features under the root of the repository and it is recommended
17:10:40 <colindixon> #info start by copying the pom.xml file from the above wiki page (it has all the the things you need, while some of the poms floating around may not)
17:13:13 <colindixon> #info mlemay_ is demonstrating in the video by doing this in l2switch
17:13:54 <colindixon> #info after copying you should find your parent pom and copy it’s groupId, artifactId, and version from there
17:14:33 <colindixon> #info you need to give this artifact a name, e.g., features-<project>
17:14:42 <colindixon> #info complete the description field as well
17:15:10 <colindixon> #topic creatint a features.xml file
17:16:44 <colindixon> #info after creating the pom.xml file, you should create a features.xml file in src/main/resources (relative to the pom.xml)
17:17:06 <colindixon> #info you should copy the projects features file xml from the wiki page linked above
17:18:00 <colindixon> #info in the <features…> tag, change the name=“…” block to use your project instead of whatever it’s there
17:19:22 <colindixon> #info in the <feature…> tag, change the name to be “odl-<project>-<feature>”, which is the naming convention we’re using
17:20:17 <colindixon> #info at this point, you can test what you have so far by building the pom.xml file and seeing if it works
17:21:05 <colindixon> #topic filling in the <feature> block in the features.xml
17:21:32 <Madhu> #info the bundle dependencies inside of the feature file follow the Pax-URL format
17:22:53 <colindixon> #info the simplest way to start making a feautre is to grab a bundle using a <bundle> tag, an example is shown on the wiki page linked above
17:24:09 <colindixon> somebody should send mlemay_ a headset :p
17:25:50 <colindixon> #info at this point building it will create a .kar file which is a repository that contains the bundles you asked for
17:27:12 <colindixon> #info this won’t work yet (at least for l2switch) because we haven’t expressed our dependencies yet
17:27:56 <colindixon> #Info in this case, to add the the md-sal and get all of it’s transitive feautures, we add teh md-sal feature as a dependency in the pom.xml
17:28:15 <colindixon> #info this isn’t required, but it makes it so that you get transitive dependencies
17:29:29 <colindixon> #info after doing this the dependency needs to be added to the feature.xml file as well, this is done by putting another <feature> tag inside the first, again an example is on the above linked wiki page
17:30:40 <colindixon> #info in general, you should try to use care in picking which features you’re dependent on so that you avoid “pulling in the entire world"
17:31:59 <colindixon> #info in this case, we’re pulling in odl-mdsal-all to be faster
17:32:56 <colindixon> #topic wrapping up features.xml and pom.xml parts
17:33:31 <colindixon> #info Madhu points out the key point is that the the important part here is really just filling out the few blanks in the pom.xml, then filling in the few key lines of the features.xml
17:34:03 <colindixon> #info after that everything that follows, including installing features, is the same for everyone
17:34:23 <colindixon> #topic installing/using features
17:34:24 <Madhu> #info the Controller project has the default container today. It will be added to the integration project too
17:34:39 <Madhu> #info the controller project's container is located under
17:34:48 <colindixon> Madhu: thank you, please keep going
17:34:55 <Madhu> #info opendaylight/distribution/opendaylight-karaf
17:35:05 <colindixon> tell me when you want me to take over again
17:35:16 <Madhu> #info mvn clean install of the above folder will create a distribution*.zip file which can be unzipped
17:35:28 <colindixon> Madhu: is it .zip or .tar.gz?
17:35:39 <Madhu> #info and run the karaf container from within the distribution.* folder bin/karaf
17:35:44 <Madhu> colindixon: both zip and tar.gz
17:36:06 <Madhu> #info bin/karaf will launch the karaf container.
17:36:26 <Madhu> #info feature:list will list all the features from the local karaf repo
17:36:39 <Madhu> #info kar:list will list all the Karaf archives
17:37:05 <Madhu> #info feature:install will install a particular feature. when a feature is installed it will install all the dependent features and bundles.
17:37:31 <Madhu> #info example feature:install odl-adsal-all will install everything that adsal provides.
17:37:39 <colindixon> #info hideyuki asks if the fact that we’re running Karaf means that we’re running an osgi runtime as well
17:37:54 <Madhu> #info bundle:list will list every bundle that is loaded (just like ss command in the equinox togo shell)
17:38:16 <colindixon> #info mlemay_ says, yes, and you can see the osgi bundles with the command bundle:list
17:39:05 <Madhu> #info feature:repo-list will display the repos that is available and provisioned
17:39:27 * colindixon lets Madhu keep going because he’s rocking it
17:40:25 <colindixon> #info hideyuki asks what “repo” means here, mlemay_ says it’s a feature repository which is the the features.xml file we defined earlier
17:40:26 <Madhu> #info feature:repo-add will add the karaf feature repo that is created (the xml that is created as part of the project feature)
17:41:26 <Madhu> #info once the feature-repo is added. it will be available to be installed.
17:42:18 <Madhu> #info once the feature-repo is added, we can use the feature-install to install the file to the running container and that will pull in all the dependencies as before.
17:42:26 <colindixon> #undo
17:42:26 <odl_meetbot> Removing item from minutes: <MeetBot.ircmeeting.items.Info object at 0x2593990>
17:42:28 <colindixon> #undo
17:42:28 <odl_meetbot> Removing item from minutes: <MeetBot.ircmeeting.items.Info object at 0x2593590>
17:42:33 <colindixon> #info once the feature-repo is added, we can use the feature-install to install the file to the running container and that will pull in all the dependencies as before.
17:43:08 <Madhu> #info alternatively, we can use kar:install to install a kar file that is created on a particular project
17:43:39 <Madhu> #info also, kar file can be simply dropped into the "deploy" folder and it will automatically install all the features part of the kar file
17:45:04 <Madhu> #info repo-refresh command can be used to refresh a feature at runtime and it is very useful during development
17:46:22 <Madhu> #undo
17:46:22 <odl_meetbot> Removing item from minutes: <MeetBot.ircmeeting.items.Info object at 0x2484a90>
17:46:35 <Madhu> #info feature:repo-refresh command can be used to refresh a feature at runtime and it is very useful during development
17:48:10 <Madhu> #info use the log: command to explore more
17:50:18 <colindixon> #info Rob Adams asks some questions about how we can make this easier for users in the WebEx chat, Madhu provides some answers
17:50:32 <Madhu> #info karaf CLI is a bit more feature richness like history, command completion, etc...
17:50:46 <Madhu> #info exploring the CLI options can be useful
17:51:02 <colindixon> #info hideyuki asks if by default log messages do not go to the karaf cli, the answer is yeah, to get them you go to log:display or log:tail
17:52:14 <Madhu> #info karaf container provides ability to configure the Command-line to be used remotely using ssh.
17:52:17 <colindixon> #info the karaf cli provides ssh access by default, which you can use to get remote access to the running container
17:52:41 <colindixon> #info you can change the port (or even if it’s turned on) in the config files which are located in the “etc” folder inside the karaf distribution
17:54:08 <colindixon> #info edwarnicke points out that when you’re installing a bundle, it won’t start unless you pass -s to that command, e.g., bundle:install -s …
17:54:39 <Madhu> #info karaf remembers the previous session and restarts all the features installed in the previous run, if the karaf container is restarted
17:54:41 <colindixon> can somebody post how to start over clean quickly?
17:54:47 <colindixon> that seems important
17:54:53 <Madhu> #info clearing the data/ folder
17:54:58 <colindixon> #undo
17:54:58 <odl_meetbot> Removing item from minutes: <MeetBot.ircmeeting.items.Info object at 0x2484e10>
17:55:03 <readams> How do I just run with my feature and its dependencies without having to use this command line?
17:55:25 <colindixon> #info to clear that state, you can delete the contents of the “data” folder
17:55:37 <Madhu> readams: just dropping the kar file in deploy. will run the feature
17:55:46 <Madhu> no need to use these CLIs
17:56:22 <readams> Is that weird ascii banner something Karaf did or we did?
17:56:33 <Madhu> readams: lol. its ours.
17:56:42 <readams> Are we 1337?
17:56:43 <Madhu> thats y it is weird ;)
17:57:02 <Madhu> rofl.
17:57:21 <readams> I would recommend something that looks more professional
17:57:23 <Madhu> ascii is the new trend... didn't u notice it ;)
17:57:33 <Madhu> j/k
17:58:00 <colindixon> #info LuisGomez asks some questions about how to roll this up for integration, mlemay_ responds yeah there are lots of things we are planning there, but the first step is to get projects making feature files
17:58:09 <colindixon> #topic key take aways
17:58:46 <colindixon> #info we are asking all projects to try to get their stuff packaged up as karaf features if at all possible
17:58:50 <readams> It's a lot less powerful than what you can do without OSGi of course
17:58:59 <Madhu> #info we are developing REST-APIs being developed to do most of the stuffs done using the CLI.
17:59:15 <colindixon> #info please reach out to mlemay_ and others if you need help getting started or if you get stuck
17:59:15 <Madhu> #info also developing DLUX ui to install, etc...
17:59:16 <readams> pax exam is a horrible workaround for the OSGi brokenness
17:59:33 <Madhu> readams: OSGi brokenness is debatable.
17:59:41 <colindixon> readams: I think karaf is OSGi at the bottom, no
17:59:42 <Madhu> but agree.. pax-exam is horrible :)
17:59:53 <readams> yes, karaf inherits osgi brokenness
17:59:57 <Madhu> pax-exam with karaf is much better
18:01:47 <colindixon> #info colindixon points out that the part where you identify what your dependencies are might be a sticking point for people and wasn’t really covered here
18:02:18 <colindixon> #action mlemay_ to provide information about figuring out you dependencies (which will likely be other features) that on a wiki page and send it out
18:04:00 <colindixon> as a note, most of the “low-level” projects, i.e., the ones most people depend on, already have their features defined
18:05:20 <colindixon> #endmeeting