Skip to content
No description, website, or topics provided.
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gogo
kubernetes
microservice
notes
quickstart
.gitattributes
.gitignore
.travis.yml
Dockerfile-alpine.osgi.txt
README.md
install_azure.sh
klibio.kdbx
launch.sh
pom.xml
travis_rsa.enc
updatedevelop.sh
updatemaster.sh

README.md

OSGi enroute quickstart example

This is the enroute quickstart tutorial ...

  • Developed with bndtools in Eclipse,
  • Build with maven on TravisCI
  • Containerized to DockerHub

Build Master: Build Status Master branch

Build develop: Build Status Develop branch

Docker Hub

Pre-requisites

  • Docker installed on your local machine

How to consume

docker pull klibio/io.klib.docker.osgi.tutorial
docker container run -p 8888:8080 klibio/io.klib.docker.osgi.tutorial

Now you can open a webbrowser on http://localhost:8888/quickstart/index.html

docker pull klibio/io.klib.docker.osgi.tutorial
docker container run -p 8888:8080 klibio/io.klib.docker.osgi.tutorial

Now you can open a webbrowser on http://localhost:8888/quickstart/index.html

Digital Ocean Hosting

Step-by-Step:

  1. Create One-Click Droplet with Docker (preferred with SSH already deposited)
  2. Login either via root + password or via ssh key
  3. docker pull klibio/io.klib.docker.osgi.tutorial:master-latest
  4. sudo ufw allow 8888/tcp Stackoverflow
  5. docker container run -d -p 8888:8080 klibio/io.klib.docker.osgi.tutorial:master-latest

To add a SSH key to an existing droplet follow these steps:

  1. Change directory to where your public ssh key file is located
  2. cat <public_key_file> | ssh root@<droplet_ip> "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
  3. To change this file, login via root and password
  4. cat sshrsa_id_pub | ssh root@<droplet_ip> "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

Deployed containers

Hosted Container on DigitalOcean

master develop

Microsoft Azure Hosting

Step-by-Step:

  1. Install Azure CLI Install_Page
  2. Use this command to login az login -u <username> -p <password>
  3. Use this command to create/update the container
az container create \
--resource-group <resgrp_name> \
--name <container_name> \
--image klibio/io.klib.docker.osgi.tutorial:develop-latest \
--dns-name-label <name_label> \
--ports 8080

Be careful, as azure container instances do NOT support port mapping. This feature will be implemented, but has not been yet. If you need this feature, a Ubuntu Server will be more usable. The dns contains the name label you desire as suffix. The prefix is determined by the location where you host the container instance on azure (f.e. <name_labe>.westeurope.azurecontainer.io) 4. Wait for the container instance to be published. It will recieve an automatically associated ip and a dns adress. The DNS adress depends on the region in which the instance has been hosted and is unique. 5. now you can connect to either "<dns_name>:8080/quickstart/index.html" or "<ip_adress>:8080/quickstart/index.html"

Example: OSGI Tutorial

To update die container we first delete it and then redeploy it:

az container delete --resource-group klibio --name develop --yes && az container create --resource-group klibio --name develop --image klibio/io.klib.docker.osgi.tutorial:develop-latest --dns-name-label develop --ports 8080
You can’t perform that action at this time.