Skip to content

Instantly share code, notes, and snippets.

View trisberg's full-sized avatar

Thomas Risberg trisberg

View GitHub Profile
@trisberg
trisberg / local-registry.md
Last active January 26, 2024 17:47
Using a Local Registry with Minikube

Using a Local Registry with Minikube

Install a local Registry

These instructions include running a local registry accessible from Kubernetes as well as from the host development machine at registry.dev.svc.cluster.local:5000.

  1. Use the docker CLI to run the registry:2 container from Docker, listening on port 5000, and persisting images in the ~/.registry/storage directory.
@trisberg
trisberg / Minikube-on-Windows10.md
Last active August 23, 2023 00:10
Setting up Minikube and Helm on Windows 10

Setting up Minikube and Helm on Windows 10

Start with a basic Windows 10 Home or Pro installation. Some of the executables require to be on the system path. Simply create a bin folder under the home folder, add that folder to the "User variable" Path via "Environment Variables for your account" in "Windows Settings". That way any executable copied to this bin folder will automatically be on the path.

Development Tools

Install 7-Zip to be able to extract a variety of archive formats. After this install any typical apps needed for software development like Git and Visual Studio Code.

Also download curl and extract the package files and copy the files in the AMD64 folder to the bin folder. If, when running curl from the PowerShell command line there is a prompt saying something like "cmdlet Invoke-WebRequest ..." then this

Build

Add a Dockerfile to the directory with the jar file:

Dockerfile

# syntax=docker/dockerfile:1

FROM eclipse-temurin:17-jdk-jammy
---
# Flux version: v0.27.0
# Components: source-controller
apiVersion: v1
kind: Namespace
metadata:
labels:
app.kubernetes.io/instance: flux-system
app.kubernetes.io/part-of: flux
pod-security.kubernetes.io/warn: restricted
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: weatherforecast-steeltoe
annotations:
"backstage.io/kubernetes-label-selector": "app.kubernetes.io/part-of=weatherforecast-steeltoe"
spec:
type: service
lifecycle: experimental
owner: default-team
@trisberg
trisberg / map2csv.groovy
Created July 14, 2015 16:04
Convert Map to CSV line
def result = ""
def delim = ","
def enclose = "\""
payload.each { key, value ->
if (value instanceof String) {
csvValue = enclose + value + enclose
}
else {
csvValue = value
}
@trisberg
trisberg / repo.adoc
Last active August 5, 2021 13:01
Using your own Maven "repo" with Spring Cloud Data Flow on CF

Using your own Maven "repo" with Spring Cloud Data Flow on CF

  1. Build and install your app locally into your .m2/repository

  2. Create a repo project (mine is named my-cf-repo)

  3. Copy the Maven jar and pom artifacts from your local .m2/repository to this repo project maintaing the directory structure

    At the root level of the repo project create a file named Staticfile with the following content:

@trisberg
trisberg / Minikube-on-Fedora.md
Last active May 17, 2021 16:33
Setting up Minikube and Helm on Fedora

Setting up Minikube and Helm on Fedora

Start with a basic Fedora 27 Desktop installation.

Development Tools

Install any typical apps needed for software development like Git and Visual Studio Code.

The curl command should be available by default.

@trisberg
trisberg / four-bindings.adoc
Last active October 24, 2020 13:57
A tale of four backing service bindings
@trisberg
trisberg / three-bindings.adoc
Last active October 24, 2020 13:56
A tale of three database backing service bindings

A tale of three database backing service bindings

Important

This document is deprecated, you want to look at A tale of four backing service bindings instead.

Introduction

How does Cody connect his function or app to a backing service? First off, what do we mean by backing service?