contents based on article cross-team collaboration

Overview

camelk-team-collaboration

This repository contains all the sources showcased in the following Red Hat Developers article:

Context

Camel K implements a cloud-native platform that helps cross-functional teams to collaborate. A Strategy team uses a Google Sheets document to list questions and concerns to be answered by other teams in the organisation. Camel K automatically distributes and collects answers from other departments to update the Google Sheets document.

Prerequisites

This demo Camel K code requires the following dependencies:

  • A Kubernetes environment
  • A Camel K platform installed
  • A Kafka platform installed
  • Access to Google Sheets and Google Drive APIs
  • A Mail server (demo-testing server)

This demo has been tested using:


Preparations

Google APIs

You need to setup API access to Google Sheets and Drive. You can start from here:

Credentials comprise of a

  • clientId
  • clientSecret
  • refreshToken.

A handy resource for generating a long-lived refreshToken is the OAuth playground:

GreenMail

GreenMail supports both secure and non-secure SMTP, POP3 and IMAP. You can deploy an image in OCP using their docker image:

Ensure there is a route to its web interface in 8080

You can connect your local email client to GreenMail by opening tunnels using the following commands:

  • POP3 port:
    oc get pods -n demo-mail -o name | grep standalone | xargs -I {} oc port-forward -n demo-mail {} 3110
    
  • SMTP port:
    oc get pods -n demo-mail -o name | grep standalone | xargs -I {} oc port-forward -n demo-mail {} 3025
    

The following command line will run a script file that will create all the demo accounts for you by interacting with GreenMail's API:

./setup/mail.sh

Google Sheet

Note: The demo is implemented with simplistic logic. Camel K just looks for 3 rows in the spreadsheet using the range B5:D7. This is obviously unrealistic, but you're invited to complete the demo's logic to fully cover the entire spreadsheet.

Create a Google Sheets document and fill in 3 questions. Each row should contain:

  • Column B: the question ID, used by Camel K as a correlator (should be set to the row's ID)
  • Column C: the question.

Ensure the questions are entered in the range B5:D7.

Obtain the document's ID, and update Camel K's code accordingly.

Google Drive

Obtain the target folder ID where Camel K will upload the PDF report generated from Stage-5. The demo uses the same folder where the spreadsheet is located.

You can find the folder ID in your browser's address bar.

Camel K's Kamelets

Camel K comes with a catalogue of pre-defined Kamelets. However this demo defines 2 extra ones not included in the catalogue:

  • Non-secure Mail source (for simplicity purposes)
  • Mail format to JSON action (to simplify data manipulation)

You can deploy these Kamelets in Kubernetes or OpenShift using the CLI clients (kubectl or oc):

oc apply -f kamelet/mail-imap-insecure-source.kamelet.yaml
oc apply -f kamelet/mail-to-json.kamelet.yaml

Kafka topics

The demo streams questions and answers in and out of Kafka using 2 topics. Use the following CLI commands to create have them created:

oc apply -f kafka/questions.yaml
oc apply -f kafka/answers.yaml

Execution

Note: The demo is implemented with simplistic logic. The demo is configured (hacked) to prevent duplicates using a long polling frequency value against the Google Sheets document. You're invited to complete the demo's logic to allow frequent polls and applying data caches and filters to make the demo more realistic.

You can watch how the demo is executed in this video clip:

The demo is composed of 5 Camel K elements

  • 2 KameletBindings (Stages 1 & 3)
  • 3 Camel K sources (Stages 2, 4 & 5)

You can decide to have them all running at the same time, or deploying one at a time to allow your audience to better follow and understand the demo.

  1. Deploy Stage 1 with:

     oc apply -f kameletbinding/stage-1-sheets2kafka.yaml
    
  2. Deploy Stage 2 with:

     kamel run camelk/stage-2-kafka2mail.xml -d camel-jackson
    
  3. Deploy Stage 3 with:

     oc apply -f kameletbinding/stage-3-mail2kafka.yaml
    
  4. Deploy Stage 4 with:

     kamel run camelk/stage-4-kafka2sheets.xml -d camel-jackson
    
  5. Deploy Stage 5 with:

     kamel run --name stage5 camelk/java/HelperStage5.java camelk/stage-5-report2drive.xml -d camel-jackson -d camel-pdf
    
You might also like...

An area maximisation game based on the idea of merging convex shapes.

An area maximisation game based on the idea of merging convex shapes.

Convex Merger Convex Merger is an area maximisation game based on the idea of merging convex shapes. The goal of the game is to claim as large an area

Dec 15, 2022

console-based netrunning game

ALT.NET The build is still in semi-active development ABOUT Alt.net is a netrunning CLI game made for fun. It combines cryptocurrency concept and adds

Nov 7, 2022

A Forge mod based on the EssentialsX plugin suite

A Forge mod based on the EssentialsX plugin suite

A Forge mod based on the EssentialsX plugin suite. Wiki (WIP) | Discord (WIP) | Website (WIP) | | | | Disclaimer: Mod is in early development. Note: I

Aug 4, 2022

A free mixin-based injection hacked client for Minecraft 1.8.9

LiquidCat is a free and open source mixin-based injection hacked client using Forge for Minecraft 1.8.9

Nov 18, 2022

Kingdoms Wars - a turn-based strategy game created with Java.

Kingdoms Wars - a turn-based strategy game created with Java.

Kingdoms Wars is a turn-based strategy game created with Java. The game is loosely based on the Punic Wars.

Feb 7, 2022

A turn-based strategy game

Stalemate Game This is a turn-based strategy game. Support You can report issues in issue tracker. Contributing Contributions are welcomed. Building T

Jul 6, 2022

HackLights - Simple framebuffer based lighting engine for libGDX

HackLights - Simple framebuffer based lighting engine for libGDX

HackLights Simple framebuffer based lighting engine for libGDX. Example See: Sample Code Sample Light Images: Installation Open or create gradle.prope

Dec 5, 2022

Triple X is a 2D space game based on The Three-Body Problem

Triple X is a 2D space game based on The Three-Body Problem

Triple X is a 2D space game based on The Three-Body Problem, which is the famous sci-fi novel wrote by Cixin Liu.

Feb 19, 2022

Simple terminal based JVM application that gives the status of a Minecraft server

MCStatus This is an incredibly simple terminal-based Minecraft server status checker

Feb 24, 2022
Owner
null
Small mod for Minecraft Forge 1.16.5 that sends messages of in-game events to a channel in your Discord server. This mod also enables cross-chatting between Minecraft and Discord.

DiscordSync Small mod for Minecraft Forge 1.16.5 that sends messages of in-game events to a channel in your Discord server. This mod also enables cros

AeonLucid 4 Dec 20, 2022
A high-level cross-platform 2D game development API

mini2Dx A high-level game development API for LibGDX inspired by Slick Website Wiki Community Javadoc Downloads Goals The main objective of mini2Dx is

null 492 Dec 24, 2022
Cross-platform Java game development framework.

Features Kronos is a open source, cross-platform game development library with a robust ecosystem. Listed below are current and planned (*) features:

Temps 0 Dec 19, 2022
Mesh is a cross-version minecraft mod development platform for Forge and Fabric.

Mesh is a cross-version minecraft mod development platform for Forge and Fabric. Supported Versions Mesh will eventually be able to run on most f

null 12 Dec 13, 2022
Jetserver is a high speed nio socket based multiplayer java game server written using Netty and Mike Rettig's Jetlang.It is specifically tuned for network based multiplayer games and supports TCP and UDP network protocols.

Note New version of Jetserver is called Nadron and is in a new netty 4 branch of this same repo. JetServer is a java nio based server specifically des

Abraham Menacherry 1.2k Dec 14, 2022
A mixin based ghost client for Minecraft 1.8.9 built on Minecraft Forge.

A mixin based ghost client for Minecraft 1.8.9 built on Minecraft Forge. Originally designed as a MCP Client (called Tephra), it is now being ported t

Peanut 130 Jan 1, 2023
A minecraft mod that allows using minecrafts structure block based test system

MC Tester Mod This mod allows using the automated structure based test system Mojang created for minecraft. The test system is only partially included

2No2Name 21 Nov 11, 2022
based utility mod

Urmomia Client urmomia strong, oa based clients strong Credits Devs Honsda - based creator Codex - based Kambing - based nekohax dev and antec player

Urmomia Client 20 Dec 31, 2022
A Java Swing based game engine

faypixelengine A Java Swing based game engine What is it? A Java game engine that uses swing and can be used to develop interactive games. The idea fo

null 9 Aug 26, 2022
A free mixin-based injection hacked-client for Minecraft using Minecraft Forge.

Custom LiquidBounce 1.8.9 build that aims to improve original visuals and bypasses, along with built-in ViaVersion to help you change from 1.8 to 1.17.1 without creating any other version branch.

epic group of paster 123 Jan 2, 2023