Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Charles Moulliard cmoulliard

🏠
Working from home
View GitHub Profile
View ispindle-mqtt-ubidots.md

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

View deps.txt
github.com/redhat-buildpacks/poc/kaniko github.com/GoogleContainerTools/kaniko@v1.7.0
github.com/redhat-buildpacks/poc/kaniko github.com/google/go-containerregistry@v0.4.1-0.20210128200529-19c2b639fab1
github.com/redhat-buildpacks/poc/kaniko github.com/pkg/errors@v0.9.1
github.com/redhat-buildpacks/poc/kaniko github.com/sirupsen/logrus@v1.8.1
github.com/redhat-buildpacks/poc/kaniko github.com/stretchr/testify@v1.6.1
github.com/redhat-buildpacks/poc/kaniko gotest.tools@v2.2.0+incompatible
cloud.google.com/go@v0.56.0 cloud.google.com/go/bigquery@v1.4.0
cloud.google.com/go@v0.44.2 rsc.io/binaryregexp@v0.2.0
cloud.google.com/go@v0.44.2 honnef.co/go/tools@v0.0.0-20190418001031-e561f6794a2a
cloud.google.com/go@v0.44.2 google.golang.org/grpc@v1.21.1
View result.txt
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
View podman-kind.md

Podman on macos

  • Init a new vm
podman machine init macvm
Extracting compressed file
podman machine list
  • Start/stop/delete the VM
View extract-port-k8s-cluster.md

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
View gist:6bca19092d777486ba1e9217a5be5d02
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeE1ETXdPREE1TWpjME1Gb1hEVE14TURNd05qQTVNamMwTUZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTHhOCnVFSUc4TmtUV2MreHpFWFA4ZnpSSHNSQXBTOWdvRVBFYTVZYzk3bDNXZGcxbWErQ1ZVTlEzU1hqY0pUVkl3dEMKcHJ6OThKQjVhZHRRQ3JNUDZsOG5oQTJCWUowZUlneXZONTV0S0d6SmRJb3F0dFliUlVuK0V5dTNZUU1MU3ZveQpXUWRCelRkbUMraXV6dHZXY1MzM1dLdEczcHF2OU52d0Jxd3VEbDVIQ3NZWHFQWE9YeWFKY1gyd0JaSldWdEpsCjZlUS9pTDc3aDY3Ujhkd3J5enVwa2pzalV3SzBwZ2N0Z25HeC80S0c2YUJyeFhleWdmUUg5NEkxTjAzRHZpY2kKOEpIb2Mra3JUL3EyMWtqaUJEYXZ0UWQrNkkrRkNsZ3pybzZ3YWl0bFVHeWYrSjB3cjdMQmxzQUxtU05ZeFZHLwp3RWtlajc3RHdzbWVlM0dNSHNzQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFKb2k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eGtvdVIKb0dZd2hxU3Z6Z0hQRmZuMSt2ckd1a1R5U3hjSTZsaGwrN0JjaVpk
View gist:d2d3f9747bcdbd9be3b8acc50dca48ca
Password Store
├── README.md
├── apps
│   └── snowdrop-bot
│   ├── admin
│   │   └── default_password
│   └── db
│   ├── password
│   └── user
├── github.com
View gist:9b882b4b45982f2f59d1283e6e563822
apiVersion: v1
kind: Pod
metadata:
name: tutorial-image-pod
namespace: demo
spec:
containers:
- image: gcr.io/cf-build-service-public/kpack/completion@sha256:7b8b829ee21f6009ea9b580cad86fb2f74f28d2aa34676d4a130fb62b9fc9893
imagePullPolicy: IfNotPresent
name: completion
View gist:bc53910804cf951b36bea3a7c5804ab2
Name: tutorial-image-build-1-nkgw4-build-pod
Namespace: demo
Priority: 0
Node: h01-118/95.217.159.244
Start Time: Thu, 11 Mar 2021 13:18:04 +0100
Labels: image.kpack.io/buildNumber=1
image.kpack.io/image=tutorial-image
image.kpack.io/imageGeneration=1
kpack.io/build=tutorial-image-build-1-nkgw4
Annotations: image.kpack.io/buildChanges: