Skip to content

Instantly share code, notes, and snippets.

View duchri66's full-sized avatar

Christian Dupont duchri66

  • Momentum
  • QC
View GitHub Profile
@duchri66
duchri66 / self-signed-certificate-with-custom-ca.md
Created October 22, 2020 19:01 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@duchri66
duchri66 / self-signed-certificate-with-custom-ca.md
Created October 22, 2020 19:01 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@duchri66
duchri66 / postgres.docker.backup.txt
Created May 29, 2020 17:44 — forked from narankhetani/postgres.docker.backup.txt
How to backup a AWX postgres database in docker.
To backup:
docker exec -u <your_postgres_user> <postgres_container_name> pg_dump -Fc <database_name_here> > db.dump
To drop db (Don't do it on production, for test purpose only!!!):
docker exec -u <your_postgres_user> <postgres_container_name> psql -c 'DROP DATABASE <your_db_name>'
To restore:
docker exec -i -u <your_postgres_user> <postgres_container_name> pg_restore -C -d postgres < db.dump
working example for awx postgres database
@duchri66
duchri66 / Openshift 4.2 on VMware using govc
Created November 26, 2019 18:34 — forked from dwojciec/Openshift 4.2 on VMware using govc
Openshift 4.2 on VMware using govc
curl https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.2/4.2.0/rhcos-4.2.0-x86_64-vmware.ova -o rhcos-4.2.0-x86_64-vmware.ova
govc import.ova -name=rhcos-4.2.0-x86_64-vmware ./rhcos-4.2.0-x86_64-vmware.ova
export GOVC_URL='vsphere.server.local
export GOVC_USERNAME='[email protected]'
export GOVC_PASSWORD='password
export GOVC_INSECURE=1
export GOVC_NETWORK='NETWORK'