Tuesday, July 28, 2020

OCP-on-RHV: checking the ovirt-credentials

$ oc get secret --all-namespaces | grep ovirt
kube-system                          ovirt-credentials                                          Opaque                              openshift-machine-api          ovirt-credentials                                          Opaque                        

$ oc get secret ovirt-credentials -n kube-system -o yaml 
$ oc get secret ovirt-credentials -n openshift-machine-api -o yaml 

Fedora 32 - baloo_file_extr consuming CPU/Memory (Gnome)

Baloo is a file indexing and searching framework. 

To disable indexing:

$ vi ~/.config/baloofilerc

[Basic Settings]

Thursday, July 23, 2020

golang: calculates cyclomatic complexities of functions in Go source code.

Just found an kind of old interesting project: https://github.com/fzipp/gocyclo

$ go get github.com/fzipp/gocyclo
$ cd ~/go/src/github.com/fzipp/gocyclo
$ go build gocyclo.go
$ cp gocyclo ~/go/bin
$ export PATH=$PATH:~/go/bin

$ gocyclo file.go

Monday, July 13, 2020

OCP-on-RHV: deployed failed. How to collect the data from bootstrap vm? (via ssh)

./bin/openshift-install gather bootstrap --dir=DIR_NAME --log-level=debug

Jul 21 2020: Still not working, need guest agent to fully work

Where to download the openshift-install (binary from Red Hat)?


ssh-key: Changing password

To change the passphrase on your ssh key:

$ ssh-keygen -p -f /home/douglas/.ssh/id_rsa
Enter old passphrase: 
Key has comment ''
Enter new passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved with the new passphrase.

Sunday, July 12, 2020

openssl base64: tips for day by day

1. How to view the contents of a .pem cert:
$ openssl x509 -in FILE_NAME.pem -text -noout
$ keytool -printcert -file FILE_NAME.pem

2. Check TLS/SSL Of Website with Specifying Certificate Authority
$ openssl s_client -connect engine.medogz.home:443 -CAfile /etc/pki/ca-trust/source/anchors/ca.pem 

3. Using the new feature, partial_chain
$ openssl s_client -connect registry.medogz.home:443 -partial_chain
If specified, this validates if the truststore has any anchor, not just a root. 

4. Decode base64 encode:
$ base64 -d FILE_NAME

5. Encode PEM/key to base64
$ openssl base64 -in foobar.key -out foobar.base64

7. Verify a chain 
$ openssl verify -verbose -CAfile RootCert.pem Intermediate.pem
$ openssl verify -CAfile RootCert.pem -untrusted Intermediate.pem UserCert.pem

golang: testing docs


golang: debuggers


OCP-on-RHV: openshift-install wait-for-install

If a timeout during installation happens, use the following command to wait it complete:
$ ./bin/openshift-install wait-for install-complete --dir=ocp

Friday, July 10, 2020

OCP on RHV: Creating an admin user for management the installation

1. Login into the Engine machine
2. Clone the ocp-on-ovirt repo

$ git clone https://github.com/ovirt/ocp-on-ovirt/ && cd ocp-on-ovirt/ipi-tools

3. Set environment vars to create the new username ocpadmin
$ export OVIRT_ENGINE_FQDN=engine.medogz.home
$ export OVIRT_ENGINE_USERNAME=admin@internal
$ export OVIRT_ENGINE_PASSWORD=mysuperpassword
$ export OCP_ADMIN_PASSWORD=__PASSWORD_FOR_ocpadmin_username__

4. Run the ansible-playbook
$ ansible-playbook ovirt_ocpadmin_user-setup.yml 

Tuesday, July 7, 2020

3D Printer: Lithophane

A list of sites to create lithophane. :)


abrt: installing abrt and generating coredump for tests

The Automatic Bug Reporting Tool, commonly abbreviated as ABRT, is a set of tools that is designed to help users detect and report application crashes. Its main purpose is to ease the process of reporting issues and finding solutions. In this context, the solution can be a Bugzilla ticket, a knowledge-base article, or a suggestion to update a package to a version containing a fix.

# dnf install abrt -y

# sleep 30 &

# killall -SIGSEGV sleep

# ls -la /var/tmp/abrt/
total 12
drwxr-x--x.  3 root abrt   61 Jul  7 15:09 .
drwxrwxrwt. 11 root root 4096 Jul  7 15:03 ..
drwxr-x---.  3 root abrt 4096 Jul  7 15:09 ccpp-2020-07-07-15:09:24-53444
-rw-------.  1 root root   14 Jul  7 15:09 last-ccpp

Saturday, July 4, 2020

unifi: Configuring Dynamic DNS (from google domains)

Google Domains:

1. Synthetic records -> Dynamic DNS -> Subdomain -> MYSUBDOMAIN_NAME -> Add
2. Expand Dynamic DNS (copy the username/password)
Unifi Controller:
Go to your Unifi Controller -> Unifi Network -> Settings -> Search (Requies the new UI): Dynamic DNS
Or you can by:

Create New Dynamic DNS
           Interface: Wan1
           Service: dyndns
           Hostname: Use subdomain.mydomain.com created in the google domains interface
           Username: Use username created in the google domains interface
           Password: Use password created in the google domains interface
           Server: domains.google.com

Thursday, July 2, 2020

oVirt-Engine: Changing FQDN and updating the certs

Example from engine machine:

#engine-machine> /usr/share/ovirt-engine/setup/bin/ovirt-engine-rename \
     --newname=newnameEngine.ocp.medogz.home \
     --otopi-environment="OSETUP_RENAME/forceIgnoreAIAInCA=bool:'True' \
     OVESETUP_CORE/engineStop=bool:'True' \

# systemctl restart ovirt-engine
# systemctl restart ovirt-imageio-proxy