Skip to content

Instantly share code, notes, and snippets.

View timosalm's full-sized avatar

Timo Salm timosalm

View GitHub Profile
@timosalm
timosalm / Dockerfile
Last active July 12, 2023 07:11
Running Spring Boot with CRaC on Knative
FROM ubuntu:22.04 AS build-app
WORKDIR /home/app
USER root
# Add required libraries
RUN apt-get update && apt-get install -y \
curl \
jq \
libnl-3-200 \
@timosalm
timosalm / scdf-logo-detection.md
Last active October 4, 2020 23:39
Logo detection with SCDF

Stream definition

Definition for any of the default app starters of Spring Cloud Data Flow

object-detection --tensorflow.model-fetch=detection_scores,detection_classes,detection_boxes 
--tensorflow.object.detection.labels=https://scdf-applications-jars.cfapps.io/label_map.pbtxt 
--tensorflow.mode=header --tensorflow.model=https://scdf-applications-jars.cfapps.io/model.pb
@timosalm
timosalm / scdf-s3-compatible-storage.md
Last active July 28, 2020 13:16
Using S3 compatible storage with SCDF

Introduction

S3 compatible storage is currently not supported with the S3 source and sink available as app starters for Spring Cloud Data Flow. I added the S3 compatible storage support for new versions of the app starters using Spring Cloud Function available here with more information here.

Archive files built on Jul 8, 2020 (Commit #c397df1) are available here:

http://scdf-applications-jars.cfapps.io/s3-sink-rabbit-3.0.0-SNAPSHOT.jar
http://scdf-applications-jars.cfapps.io/s3-sink-kafka-3.0.0-SNAPSHOT.jar
http://scdf-applications-jars.cfapps.io/s3-source-rabbit-3.0.0-SNAPSHOT.jar
http://scdf-applications-jars.cfapps.io/s3-source-kafka-3.0.0-SNAPSHOT.jar
@timosalm
timosalm / get-used-cf-docker-images.sh
Created June 30, 2020 06:31
Get used CF Docker images
#!/usr/bin/env bash
export CC_API_URL=https://api.run.pivotal.io
curl -G "${CC_API_URL}/v3/packages" \
--data-urlencode "types=docker" \
--data-urlencode "per_page=5000" \
-H "Authorization: $(cf oauth-token)" | jq '.resources[].data?.image?'
@timosalm
timosalm / metric_store.sh
Last active June 25, 2020 11:11
Querying Metric Store for PCF via Prometheus-Compatible HTTP Endpoints
#!/usr/bin/env bash
export METRIC_DATA_URL=https://metric-store.run.pivotal.io
export APP_GUID=d554cc6d-2f8c-4950-bb97-3cf8805c9b44
export START_TIME=1592995680
export END_TIME=1593082080
echo -e "Issue a PromQL range query against Metric Store data:\n"
curl -G "${METRIC_DATA_URL}/api/v1/query_range" \
--data-urlencode "query=avg_over_time(cpu{source_id='${APP_GUID}'}[1m])" \
--data-urlencode "start=${START_TIME}" --data-urlencode "end=${END_TIME}" \
@timosalm
timosalm / 1-pbs-introduction.md
Last active April 9, 2020 07:09
Introduction to Pivotal Build Service
@timosalm
timosalm / 1-pack-introduction.md
Last active March 24, 2020 08:54
Introduction to pack a local CLI for building apps using Cloud Native Buildpacks
@timosalm
timosalm / 1-kpack-introduction.md
Last active April 24, 2020 07:24
Introduction to kpack a Kubernetes Native Container Build Service