Skip to content

Instantly share code, notes, and snippets.

View cmoulliard's full-sized avatar
🏠
Working from home

Charles Moulliard cmoulliard

🏠
Working from home
View GitHub Profile
|
paketo-container-on--gtr2g-build-container[Duration: 4 minutes 5 seconds]
paketo-container-on--gtr2g-build-container
[prepare] 2024/10/16 14:10:01 Entrypoint initialization
[place-scripts] 2024/10/16 14:10:01 Decoded script /tekton/scripts/script-1-6tqvc
[place-scripts] 2024/10/16 14:10:01 Decoded script /tekton/scripts/script-2-4pn48
[place-scripts] 2024/10/16 14:10:01 Decoded script /tekton/scripts/script-3-hz98j
[place-scripts] 2024/10/16 14:10:01 Decoded script /tekton/scripts/script-4-nbfg4
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/ch007m/konflux-demo?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
== "main"
@cmoulliard
cmoulliard / gosmee.md
Last active April 14, 2023 07:18
RHTAP & Gosmee to custom pipelines

Stonesoup k8s objects

k get all -n user1-tenant
ktree -n user1-tenant components/stonesoup-spring-boot-hdv4
ktree -n user1-tenant applications.v1alpha1.appstudio.redhat.com my-app

Gosmee

k delete -n pipelines-as-code deployment/gosmee-client
cat <<'EOF' | k apply -f -
@cmoulliard
cmoulliard / secured-docker-registry.md
Last active April 13, 2023 12:34
Commands used top of kind + docker registry
rm -rf $HOME/.docker/certs.d/registry.local:5000 
./kind-tls-secured-reg.sh

ls -la $HOME/.docker/certs.d
docker ps

docker pull gcr.io/google-samples/hello-app:1.0
docker tag gcr.io/google-samples/hello-app:1.0 kind-registry:5000/google-samples/hello-app:1.0

HTTPProxy quarkus-app-contour-quarkus-app.tap-demo

apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
  annotations:
    projectcontour.io/ingress.class: contour
  creationTimestamp: "2022-02-17T08:45:16Z"
  generation: 1
  labels:

Intro

The data collected by the ispindle IoT can be forwarded to a server, MQTT broker, brewery web site, ...

The following node-red flow has been designed to collect from a MQTT broker running on a laptop (or raspberry pi) the data which are then enriched in order to post them on ubidots

Before to start the flow locally, install node-red and mosquitto as MQTT broker

github.com/redhat-buildpacks/poc/kaniko github.com/GoogleContainerTools/[email protected]
github.com/redhat-buildpacks/poc/kaniko github.com/google/[email protected]
github.com/redhat-buildpacks/poc/kaniko github.com/pkg/[email protected]
github.com/redhat-buildpacks/poc/kaniko github.com/sirupsen/[email protected]
github.com/redhat-buildpacks/poc/kaniko github.com/stretchr/[email protected]
github.com/redhat-buildpacks/poc/kaniko [email protected]+incompatible
cloud.google.com/[email protected] cloud.google.com/go/[email protected]
cloud.google.com/[email protected] rsc.io/[email protected]
cloud.google.com/[email protected] honnef.co/go/[email protected]
cloud.google.com/[email protected] google.golang.org/[email protected]
This file has been truncated, but you can view the full file.
time="2021-11-19T20:13:04Z" level=info msg="The layered tzg files will be extracted to the home dir ..."
INFO[0000] Starting the Kaniko application to process a Dockerfile ...
INFO[0000] Initialize the BuildPackConfig and set the defaults values ...
DEBU[0000] Check if DOCKER_FILE_NAME env is defined...
DEBU[0000] DOCKER_FILE_NAME=Dockerfile2
DEBU[0000] DockerfileName is: Dockerfile2
DEBU[0000] Checking if CNB_* env var have been declared ...
DEBU[0000] CNB ENV var is: map[]
DEBU[0000] KanikoOptions defined
INFO[0000] Kaniko dir: /kaniko

Podman on macos

  • Init a new vm
podman machine init macvm
Extracting compressed file
podman machine list
  • Start/stop/delete the VM

How to get the port number of the Server IP address of a k8s cluster using the info of the kubeconfig file

clusterName="kind-kind"
kubectl config view -o json | \
     jq '.clusters[] | select(.name=="'$clusterName'").cluster.server' | \
     sed -e 's,^.*:,:,g' -e 's,.*:\([0-9]*\).*,\1,g'
50211