Sunday, May 2, 2021

github actions and golang 1.16 or higher - no required module provides package - working directory is not part of a module.

In your environment your app might work out of the box for go 1.16.x but github actions it might say:
main.go:20:2: no required module provides package github.com/myuser/project/pkg/deployment: working directory is not part of a module.

In go lang 1.16 GO111COMPILE is on by default which means the packages will be stored via GOPATH/go/pkg or for example /home/foobar/go/pkg/github.com/mypackagelibrary. To make it work via github actions use:

jobs:

  my-job-name:

    runs-on: [ ubuntu-18.04 ]

    env:

      GOPATH: /home/runner/work/MYPACKAGELIBRARYNAME/go

      GO111MODULE: auto


....

OR 

for every go command, including get, build, run add GO111MODULE=off in front, like GO111MODULE=off go get github.com/foobar && GO111MODULE=off go run main.go


Wednesday, March 10, 2021

building kubernetes: Fedora 33 and master kubernetes - requirement golang 1.16

$ dnf update   https://kojipkgs.fedoraproject.org//packages/golang/1.16/1.fc34/noarch/golang-src-1.16-1.fc34.noarch.rpm --best --allowerasing

$  dnf install https://kojipkgs.fedoraproject.org//packages/golang/1.16/1.fc34/x86_64/golang-1.16-1.fc34.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/golang/1.16/1.fc34/x86_64/golang-bin-1.16-1.fc34.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/golang/1.16/1.fc34/x86_64/golang-race-1.16-1.fc34.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/golang/1.16/1.fc34/x86_64/golang-shared-1.16-1.fc34.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/golang/1.16/1.fc34/noarch/golang-misc-1.16-1.fc34.noarch.rpm https://kojipkgs.fedoraproject.org//packages/golang/1.16/1.fc34/noarch/golang-docs-1.16-1.fc34.noarch.rpm https://kojipkgs.fedoraproject.org//packages/golang/1.16/1.fc34/noarch/golang-misc-1.16-1.fc34.noarch.rpm https://kojipkgs.fedoraproject.org//packages/golang/1.16/1.fc34/noarch/golang-tests-1.16-1.fc34.noarch.rpm


Monday, March 1, 2021

oVirt Driver to install Windows 2019 Server

1. Download oVirt Guest tools iso

https://resources.ovirt.org/pub/ovirt-4.3/iso/oVirt-toolsSetup/4.3-2/el7/oVirt-toolsSetup-4.3-2.el7.iso

2. Upload oVirtToolsSetup iso to your data/iso storage in the Cluster

3. Change the CD to oVirt Tools Setup

After booting the Windows installer, select the Virtual machine in the Admin portal and click ... and Change CD attach oVirt Tools Setup 4.3.2.

4. Re-attach Windows 2019 Server ISO

Attach again the windows ISO by selecting the Virtual machine in the Admin portal and click ... and Change CD attach Window Server 2019 ISO.


A good video explaining the process:

https://www.youtube.com/watch?v=m5Ud4RZI8bU&t=503s


Thursday, August 20, 2020

traefik: kubernetes service not found: xyz

Check if the removed application left the ingressroute behind.

$ kubectl delete ingressroute -n ${NAMESPACE} ${INGRESSROUTE_APP}

Tuesday, August 18, 2020

helm3: installing kubeapps over TLS

$ kubectl create ns kubeapps

$ helm install  kubeapps --namespace kubeapps bitnami/kubeapps \

  --set ingress.enabled=true \

  --set ingress.certManager=true \

  --set ingress.hosts[0].name=kubeapps.medogz.com \

  --set ingress.hosts[0].tls=true \

  --set ingress.hosts[0].tlsSecret=kubeapps-tls


2. Create the secret
$ kubectl -n default create secret tls kubeapps-tls -n kubeapps --key=/path/STAR_medogz_com.key --cert=/path/STAR_medogz_com.crt 

3. Get the token to access the kubeapps.medogz.com

$  kubectl get secret $(kubectl get serviceaccount kubeapps-operator -o jsonpath='{.secrets[].name}') -o jsonpath='{.data.token}' -o go-template='{{.data.token | base64decode}}' && echo


4. Access https:/kubeapps.medogz.com

NOTE: After the login, some images will load from external network and the site won't be accessed fully by TLS.

Saturday, August 15, 2020

Lenovo thinkpad x1: How to enable the Keyboard Backlight ?

On the keyboard, the keys that are used to enable or disable the backlight is the Fn + Space bar.