Skip to content

InstallKubernetesComponents

Tim Stair edited this page Apr 23, 2020 · 1 revision

Install Kubernetes Components

The execution components run in Kubernetes as pods. The following are necessary for execution:

Prerequisites

  • Docker repository accessible by Kubernetes & installed locally
  • Kubernetes
  • Maven 3.3.9
  • Local clone of this repo!

Work in progress ⚠️

All below...

Building / Deploying the Docker Images

You will need the clone of the repo to build all the necessary modules and create the images.

⚠️ If you are working with Minikube please see this guide on using the built in docker repo. Run Local Execution With Minikube

Build

From the root of the repo run:

mvn clean install

Confirm

Run this command and confirm the puller, executor, and sample images are listed:

docker images

Sample result (trimmed down to the items of interest)

cppull            1.0.0  1a847b2e3c3a  About a minute ago   176MB
fhexec            1.0.3  39e12ebdc816  About a minute ago   180MB
pop-sample    1.0.2  5fa24507d7a6  2 minutes ago        147MB

Tag and Push

docker tag cppull:1.0.0 <your docker repo>/<your docker namespace>/cppull:1.0.0
docker tag fhexec:1.0.0 <your docker repo>/<your docker namespace>/fhexec:1.0.3
docker tag pop-sample:1.0.0 <your docker repo>/<your docker namespace>/pop-sample:1.0.2
docker push <your docker repo>/<your docker namespace>/cppull:1.0.0
docker push <your docker repo>/<your docker namespace>/fhexec:1.0.3
docker push <your docker repo>/<your docker namespace>/pop-sample:1.0.2

Kubernetes Setup

Please setup the namespace and the service account (and local credentials if needed): Kubernetes Setup

Kubernetes Configs Update / Apply

⚠️ If your namespace in Kubernetes is not pop be sure to update the ConfigMaps accordingly.

Location: ./deploy/resourcepool/kubernetes/configmap

Puller

ConfigMap.yaml

  • Change agendaProviderUrl url
  • Change executor image repo
  • Tweak pullAlways and imagePullPolicy as desired
  • Tweak reapCompletedPods as desired

Apply with kubectl apply -f ConfigMap.yaml

Deployment.yaml

  • Change the image to your docker repo
  • Tweak the imagePullPolicy as desired

(do not apply yet!)

Service.yaml

  • No specific changes recommended.

(do not apply yet!)

Executor (ConfigMap.yaml)

  • Change agenda.progress.url url
  • Setup any new entries in the registry-json section (if you plan to use sample you'll need the imageName updated to point to your docker repo)
  • tweak pullAlways as desired
  • tweak reapCompletedPods as desired

Apply with kubectl apply -f ConfigMap.yaml

Sample (ConfigMap.yaml)

  • Change agenda.progress.url url
  • Change pop.kubernetes.podconfig.docker.imageName to point to an image available in your docker repo.
  • tweak pullAlways as desired
  • tweak reapCompletedPods as desired

Apply with kubectl apply -f ConfigMap.yaml

Puller Deployment

  1. Navigate to ./deploy/resourcepool/kubernetes/configmap/puller
  2. Start the puller deployment with: kubectl apply -f Deployment.yaml
  3. Start the puller service with: kubectl apply -f Service.yaml
  4. Watch the logs for successful calls to getAgenda

Priority Operation Processing

  1. Submission
  2. Scheduling
  3. Execution
    the ResourcePool

Data Object API

Agenda
the workflow
Agenda Template
the workflow definition
Customer
Insight
the scheduling queue definition
Operation Progress
the state of the running Agenda operations
Progress
the state of the running Agendas
ResourcePool
the processing resources

Service Agenda

Agenda Service
the workflow submission
Progress Service
rolled up agenda progress summary
ResourcePool Service
getting work and updating progress

Timed Processes

AgendaReclaimer
restarting stuck Agendas
AgendaRetry
retrying failed Agendas
DataObjectReaper
reaping expired data objects
PodReaper
reaping stuck Kubernetes pods

Installation

Install

Development

DevKubernetesSetup
RunLocalExecution
- RunWithMiniKube

Demo / Examples

SampleAuthorizer
SampleHandler

Clone this wiki locally