Skip to content

Instantly share code, notes, and snippets.

@jaindinkar
Last active October 5, 2021 10:07
Show Gist options
  • Save jaindinkar/dfd2e7c98ead4511a903ab404a63a606 to your computer and use it in GitHub Desktop.
Save jaindinkar/dfd2e7c98ead4511a903ab404a63a606 to your computer and use it in GitHub Desktop.
Error Free Installation of Eclipse IoT Solutions (Kapua End-to-End IoT Framework on Ubuntu 20.04 machine + Kura Gateway on Raspberry Pi)

Installing Eclipse Kapua on a Ubuntu20.04 desktop/server.

  • Uninstall any previous version of docker and related packages from the system: sudo apt-get remove docker docker-engine docker.io containerd runc plus do this to be completly sure: https://docs.docker.com/engine/install/ubuntu/#uninstall-docker-engine

  • Installation: There are various methods for installing docker, I installed it using the convinence script, it's by far the simplest method. Just download the script and let it do all the work. If you are experienced enough you can do a manual install too.

  • After this add your user to docker usergroup so you don't need to use sudo for every docker command.

    • Note Sometimes convenience script gives error when it executes sudo apt update command. This happens when you have a single or multiple erronious repo addressess.(run apt update separately and in the bottom you will see a summary of those errors). In this case you have to remove those bad repo addresses: Just delete the erronious repositores from this location: /etc/apt/sources.list.d/additional-repositories.list >>> stack overflow post for that: https://askubuntu.com/questions/810771/remove-packages-with-error-on-apt-get-update
  • Install docker-compose > as simple as doing sudo apt install docker-compose

  • Install jre and jdk specifically for java version 8 and reconfigure your java command to use version 8 by default. You can remove any later versions if you don't need them. Follow this guide to check, install and reconfigure your java installation: https://linuxhint.com/uninstall-java-ubuntu/ https://docs.datastax.com/en/jdk-install/doc/jdk-install/installOpenJdkDeb.html

basic package names for java 8 are as follows: you can install them by sudo apt install <pkg name 1> <pkg name 2> ... openjdk-8-jre-headless openjdk-8-jdk-headless

After installing java 8 reconfigure your java command to use java 8 instead of latest version on your machine.

  • Download the latest tagged version of the kapua from the git repo (in my case 1.5.2) to your home directory and extract: wget <.tar.gz file URL> tar zxvf filename.tar.gz

  • Install maven build tool (It's the build tool used by kapua project for generating output files/images)> sudo apt install maven

  • Build kapua docker images from scratch (this is requred because some images are not hosted on the dockerHub and hence needed to be generated on our own.) go to root directory of the project>

cd ~/kapua.. sudo mvn clean install -Pdocker,dev,console -DskipTests Remember to add -DskipTests at the end as in Ubuntu 20 test results are ambigously wrong. Also it will save you some time skipping tests. If every thing is done allright till now your build will be successfull, otherwise you have to manually debug the problem. For more info checkout: https://download.eclipse.org/kapua/docs/develop/developer-guide/en/building.html#documentation

  • For deploying kapua services(containers) automatically use the shell script provided: go to kapua/deployment/docker/unix/ ./docker-deploy.sh

    If the script succesfully run, your containers would be online and ready to work. Verify this by going to your hostIP:8080/ and you will be greeted with kapua login screen. for login and further engagement follow: https://github.com/eclipse/kapua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment