Procedure to add features to OpenDaylight application - osgi

This is an inverse of my question Install a custom feature or module in Opendaylight?. I am looking to take the Hello World app and add the ability to do a feature:install for the following features:
feature:install
odl-restconf
odl-mdsal-apidocs
odl-openflowplugin-flow-services
odl-openflowplugin-app-table-miss-enforcer
odl-openflowplugin-nxm-extensions
odl-restconf-all
odl-openflowplugin-flow-services
I assume it comes down to listing these features properly in one of the many pom files.
For the record, currently we run the ODL 0.12.1 by downloading the .tar.gz from ODL's nexus server, shell into karaf, and run the feature:install command against all the above features and I am able to do the install.
I'd like to be able to run that same feature:install for all those features as well, but in the Hello World example, karaf can't find those features.
There are some similar questions out there (such as this How to add new features to OpenDayLight Karaf?) however the answers weren't specific enough and seem generic to Karaf. For example, the answer there seems to be about modifying the values of org.ops4j.pax.url.mvn.repositories however when I look at the ODL 0.12.1 integration/distribution repo, I do not see this value being used at all.

I think what you are looking for is the featuresBoot config in the
etc/org.apache.karaf.features.cfg file.

Related

Java buildpack for sourceless project?

We're wanting to set up Elastic Search with Appbase.io's abc tool (pointed at one of our existing PostgreSQL dynos). We don't want to compile either of these tools, but Heroku's buildpack documentation strongly suggests that there are flags that are set with the java buildpack sets that we want/need. The most simple solution would probably be to set up an empty pom file, but I don't know if that would actually work. (I assume it's not that hard to do--no java knowledge here.)
I plan to use Amiel's fix of the apt buildpack to actually install Elastic Search, and a custom buildpack to grab & install abc.
Is this a reasonable approach?
What are the gottchas we need to watch out for?

Where can I find updated source code for Jorge Acetozi book "Continuous Delivery for Java Apps: Kubernetes and Jenkins in Practice"

I just started reading the Jorge Acetozi book "Continuous Delivery for Java Apps: Kubernetes and Jenkins in Practice".
For the code examples I use the source code in his github repository:
https://github.com/jorgeacetozi
Unfortunately this code doesn't work for Java 11 and uses old Spring Boot 1.5 version
Also Jenkins, Selenium, Kubernetes and Vagrant tools, described in the book, use very old versions.
Has anyone finished this book lately, could you please, provide the updated source code for this book?
Unfortunately, the old source code, prevents me from learning further.
I have managed to finish this book, but did a lot of changes to the source code:
https://github.com/skyglass/notepad - updated source code for Notepad Spring Boot application.
Spring Boot has been updated to version 2.4.2.
I had to make lots of changes to the front-end code, to make styles displayed correctly with the latest version of Thymeleaf library.
Also did some other changes, related to update from Java8 to Java11.
All maven dependencies have been updated to the latest versions
https://github.com/skyglass/jenkins-kubernetes-cd - This repository corresponds to Jorge Acetozi's "ebook-continuous-delivery-with-kubernetes-and-jenkins" repository.
"docker-images" folder contain "jenkins", "kubectl" and "maven-jdk11-git" docker image files, which are used by Jenkins pipelines
Kubernetes yaml files have been updated to the latest version of Kubernetes
Unfortunately, I couldn't manage to make acceptance tests working for "Firefox" browser, with the latest "Selenium Grid" docker images. Therefore, acceptance-tests pipeline code only contains tests with "Chrome" browser
All Jenkins files have been updated to use the latest docker images, or custom docker images, published by me in Skyglass Docker Hub. Feel free to publish them in your own docker hub, using docker files from "docker-images" folder.
"docker-images" folder contains custom docker image to run Jenkins. I recommend using this image to run Jenkins on your computer. It uses the latest version of jenkins for jdk11 and all needed plugins with the latest versions
https://github.com/skyglass/notepad-performance-tests - the performance tests have been updated for the latest versions of Scala, SBT and Gatling.
https://tferdinand.net/en/create-a-local-kubernetes-cluster-with-vagrant/
https://www.exxactcorp.com/blog/HPC/building-a-kubernetes-cluster-using-vagrant
These articles will help you to install Kubernetes Cluster locally, with Vagrant and VirtualBox.
Of course, I also used lot of other online resources. StackOverflow helped me a lot. :)
Have fun reading this book, hope these examples help you get the best learning experience.
Thank you, Jorge Acetozi, for this wonderful book!

Generating Karaf Bundle

I've got a hello world opendaylight app (created following the tutorials) which compiles using a mvn clean install, and appears when I run the karaf package that is also generated.
However I am unable to get it to run in another ODL install (downloaded the binary with all the other packages from the website), and even using a
bundle:install mvn:org.andrew.test
results in unable to install bundle (tried copying to deploy and system/org/andrew....)
How do you get a bundle which can be used in another install?
Why do you want to bundle:install instead of feature:install ?
What most existing ODL projects do for you, and what the example generated by the archetype should also show you how to do for your custom org.andrew.test one (have you used the archetype? try it..) is that there is a local karaf/ artifact which correctly depends on the features/odl-something feature of your example, and lets you install it, which will install your bundle/s.
In theory and if you really know what you are doing, you can also get it to work for what you call "in another install" in your question, but you have to use repo-app and what not - most people do not use it like that AFAIK (at least in ODL development); so I wouldn't bother, if I were you.
If you want to learn more about this in general outside of OpenDaylight, the general Karaf documentation manual is not bad. Beware that in ODL we've tweaked a few things though; for example, we have (intentionally) disabled the direct installation from ~/.m2/repository (for better isolation).

Alfresco deployment doesn't work

I've created the simple example from here, then packaged it using mvn package, and made an effort to deploy the result amp file as described here. But after restarting Alfresco I didn't see any changes. There were no new variants of workflow to choose. The java -jar alfresco-mmt.jar list <WARFileLocation> executing showed that modules org.alfresco.integrations.google.docs and org.alfresco.vti are installed in the chosen war but not a word about my helloworld workflow
UPD: I looked deeper through the tutorial and found that to add an activiti to the share u first need to add some other activiti to the alfresco. it is told there:
Open a command-line window and switch to
$TUTORIAL_HOME/workflow-tutorial-repo. Run mvn integration-test
-Pamp-to-war -Dmodule.log.level=debug. Your repo tier project will be installed and started on Tomcat running on port 8080. Open a new
command-line window and switch to
$TUTORIAL_HOME/workflow-tutorial-share. Run mvn integration-test
-Pamp-to-war -Dmaven.tomcat.port=8081
why is it so? I can't just deploy the only one project to the share but need to make a progect for the Alfresco first?
By the command you wrote you start repo. Since share and repo running on the same server they should run on different ports, so for share you need to provide another port, which is done by additional parameter: -Dmaven.tomcat.port=8081
UPD
#NikitinMikhail The quote you've added describes how to start share.
Alfresco consists of two projects (according to the maven sdk you use) which are repo and share.
Alfresco Share provides a rich web-based collaboration environment for managing documents, wiki content, blogs and more. Share leverages the Alfresco repository to provide content services and utilises the Alfresco Surf Platform to provide the underlying presentation framework.
In other words share is just separate project which communicates with repo and provides better user interface than repo.

Using Sling Launchpad for production

I was trying to understand deployment scenarios for Sling/JCR when I started wondering if I could simply use the Sling Launchpad and simply start the server using the jar. My project needs simplicity more than performance, but is there something seriously wrong with this approach? Alternatively, is there a good place where Sling/JCR deployment is discussed in detail?
I don't think we have a detailed description on how to deploy Sling applications, the best might be to ask on the users mailing list ( http://sling.apache.org/site/project-information.html#ProjectInformation-lists ) so that others can share their experiences.
As for starting with the launchpad I don't see a problem with that, that's pretty much how we are using Sling in Adobe CQ5. We have our own customized launcher that adds a few features, mostly related to upgrades management, but the basics are the same.
Although the few details of your project, I can say that Sling-Launchpad is a very useful tool to start an OSGi environment with selectable bundles. You just make a list of bundles to be included in the environment. It is very actively used in Apache Stanbol project. For the details you can investigate the various launchers of Stanbol e.g full, full-war, etc. Those launchers produce a single jar file including the necessary files to start the server.
Cryo-answer, maybe better late than never.
As long as you're not after a clustered config, the sling trunk build now has a debian contrib module that packages the launchpad jar in a debian package. It's a simplistic packaging mechanism that doesn't fully exploit all possible use cases, but it does setup logging and provide an etc/defaults for for config setup.

Resources