17:03:14 #startmeeting tws 17:03:14 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 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 17:03:14 The meeting name has been set to 'tws' 17:03:23 #chair Madhu phrobb 17:03:23 Current chairs: Madhu colindixon phrobb 17:03:31 mlemay_: you around? 17:03:39 #topic agenda bashing 17:03:42 yup 17:03:53 it’s loading 17:03:54 mlemay_: u joining us on TWS call ? 17:04:08 #link https://wiki.opendaylight.org/view/Tech_Work_Stream:Main this is the main page for the TWS call 17:04:12 of course 17:04:15 mlemay_: i was about to do the Karaf if u didn't show up... thank god that didn't happen ;) 17:04:21 just had someone in the office 17:04:21 #info today’s agenda is covering the usage of karaf 17:05:40 mlemay_: a bunch of folks are waiting ;) 17:07:35 #topic karaf hands on 17:07:37 #info hands-on walk-through by mlemay_ on Karaf for ODL Helium release 17:07:59 #info note that this is being recorded and will be posted 17:08:21 #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 #info mlemay_ is also working on an archetype which will help 17:09:35 #topic creating the feature pom file 17:09:38 #info the convention is to create a directory named : features under the root of the repository and it is recommended 17:10:40 #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 #info mlemay_ is demonstrating in the video by doing this in l2switch 17:13:54 #info after copying you should find your parent pom and copy it’s groupId, artifactId, and version from there 17:14:33 #info you need to give this artifact a name, e.g., features- 17:14:42 #info complete the description field as well 17:15:10 #topic creatint a features.xml file 17:16:44 #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 #info you should copy the projects features file xml from the wiki page linked above 17:18:00 #info in the tag, change the name=“…” block to use your project instead of whatever it’s there 17:19:22 #info in the tag, change the name to be “odl--”, which is the naming convention we’re using 17:20:17 #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 #topic filling in the block in the features.xml 17:21:32 #info the bundle dependencies inside of the feature file follow the Pax-URL format 17:22:53 #info the simplest way to start making a feautre is to grab a bundle using a tag, an example is shown on the wiki page linked above 17:24:09 somebody should send mlemay_ a headset :p 17:25:50 #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 #info this won’t work yet (at least for l2switch) because we haven’t expressed our dependencies yet 17:27:56 #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 #info this isn’t required, but it makes it so that you get transitive dependencies 17:29:29 #info after doing this the dependency needs to be added to the feature.xml file as well, this is done by putting another tag inside the first, again an example is on the above linked wiki page 17:30:40 #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 #info in this case, we’re pulling in odl-mdsal-all to be faster 17:32:56 #topic wrapping up features.xml and pom.xml parts 17:33:31 #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 #info after that everything that follows, including installing features, is the same for everyone 17:34:23 #topic installing/using features 17:34:24 #info the Controller project has the default container today. It will be added to the integration project too 17:34:39 #info the controller project's container is located under 17:34:48 Madhu: thank you, please keep going 17:34:55 #info opendaylight/distribution/opendaylight-karaf 17:35:05 tell me when you want me to take over again 17:35:16 #info mvn clean install of the above folder will create a distribution*.zip file which can be unzipped 17:35:28 Madhu: is it .zip or .tar.gz? 17:35:39 #info and run the karaf container from within the distribution.* folder bin/karaf 17:35:44 colindixon: both zip and tar.gz 17:36:06 #info bin/karaf will launch the karaf container. 17:36:26 #info feature:list will list all the features from the local karaf repo 17:36:39 #info kar:list will list all the Karaf archives 17:37:05 #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 #info example feature:install odl-adsal-all will install everything that adsal provides. 17:37:39 #info hideyuki asks if the fact that we’re running Karaf means that we’re running an osgi runtime as well 17:37:54 #info bundle:list will list every bundle that is loaded (just like ss command in the equinox togo shell) 17:38:16 #info mlemay_ says, yes, and you can see the osgi bundles with the command bundle:list 17:39:05 #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 #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 #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 #info once the feature-repo is added. it will be available to be installed. 17:42:18 #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 #undo 17:42:26 Removing item from minutes: 17:42:28 #undo 17:42:28 Removing item from minutes: 17:42:33 #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 #info alternatively, we can use kar:install to install a kar file that is created on a particular project 17:43:39 #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 #info repo-refresh command can be used to refresh a feature at runtime and it is very useful during development 17:46:22 #undo 17:46:22 Removing item from minutes: 17:46:35 #info feature:repo-refresh command can be used to refresh a feature at runtime and it is very useful during development 17:48:10 #info use the log: command to explore more 17:50:18 #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 #info karaf CLI is a bit more feature richness like history, command completion, etc... 17:50:46 #info exploring the CLI options can be useful 17:51:02 #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 #info karaf container provides ability to configure the Command-line to be used remotely using ssh. 17:52:17 #info the karaf cli provides ssh access by default, which you can use to get remote access to the running container 17:52:41 #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 #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 #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 can somebody post how to start over clean quickly? 17:54:47 that seems important 17:54:53 #info clearing the data/ folder 17:54:58 #undo 17:54:58 Removing item from minutes: 17:55:03 How do I just run with my feature and its dependencies without having to use this command line? 17:55:25 #info to clear that state, you can delete the contents of the “data” folder 17:55:37 readams: just dropping the kar file in deploy. will run the feature 17:55:46 no need to use these CLIs 17:56:22 Is that weird ascii banner something Karaf did or we did? 17:56:33 readams: lol. its ours. 17:56:42 Are we 1337? 17:56:43 thats y it is weird ;) 17:57:02 rofl. 17:57:21 I would recommend something that looks more professional 17:57:23 ascii is the new trend... didn't u notice it ;) 17:57:33 j/k 17:58:00 #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 #topic key take aways 17:58:46 #info we are asking all projects to try to get their stuff packaged up as karaf features if at all possible 17:58:50 It's a lot less powerful than what you can do without OSGi of course 17:58:59 #info we are developing REST-APIs being developed to do most of the stuffs done using the CLI. 17:59:15 #info please reach out to mlemay_ and others if you need help getting started or if you get stuck 17:59:15 #info also developing DLUX ui to install, etc... 17:59:16 pax exam is a horrible workaround for the OSGi brokenness 17:59:33 readams: OSGi brokenness is debatable. 17:59:41 readams: I think karaf is OSGi at the bottom, no 17:59:42 but agree.. pax-exam is horrible :) 17:59:53 yes, karaf inherits osgi brokenness 17:59:57 pax-exam with karaf is much better 18:01:47 #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 #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 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 #endmeeting