Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
DOCKER_USER=${DOCKER_USER:-$1}
DOCKER_PASSWORD=${DOCKER_PASSWORD:-$2}
export DOCKER_USER=dpawlik;
export DOCKER_PASSWORD=''
if [ -z "$DOCKER_USER" ] || [ -z "$DOCKER_PASSWORD" ]; then
@danpawlik
danpawlik / minikube-podman.sh
Created October 17, 2023 06:58
Install minikube with a podman driver
#!/bin/bash
MINIKUBE_VERSION=${MINIKUBE_VERSION:-'latest'}
echo "$USER ALL=(ALL) ALL" | sudo tee -a /etc/sudoers
echo "%$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
# install crio
CRIO_VERSION=1.24
OS="xUbuntu_$(lsb_release -r -s)"
@danpawlik
danpawlik / minikube-docker.sh
Last active September 27, 2023 11:50
Install pure minikube with cri-o runtime
#!/bin/bash
echo "$USER ALL=(ALL) ALL" | sudo tee -a /etc/sudoers
echo "%$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
# install crio
CRIO_VERSION=1.26
OS="xUbuntu_$(lsb_release -r -s)"
echo "deb [trusted=true] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
echo "deb [trusted=true] http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list
@danpawlik
danpawlik / iperf3-tests-ax3200-4a-giga.md
Last active August 29, 2023 09:35
compare results with iperf3 - ax3200 to 4a Giga version
number kernel version commit d5a05e69ac6e Bitrate sender Bitrate receiver Dumb AP connection
1 5.15.128 reverted 827 Mbits/sec 825 Mbits/sec WAN
2 5.15.128 reverted 821 Mbits/sec 819 Mbits/sec LAN
3 6.1.48 reverted 850 Mbits/sec 849 Mbits/sec LAN
4 6.1.48 - 822 Mbits/sec 821 Mbits/sec LAN
---
- name: Generate self signed certs
hosts: localhost
vars:
ssl_path: /tmp/ssl
org_name: SoftwareFactory
organizational_unit_name: Test
common_name: sftests.com
common_name_alt: gerrit.sftests.com
@danpawlik
danpawlik / create-crc-snc.sh
Last active July 13, 2023 06:55
Create CRC qcow2 image
#!/bin/bash
# Helpful link: https://crc.dev/blog/posts/2023-06-05-create-okd-bundle/
export PASS_DEVELOPER=123456789
export PASS_KUBEADMIN=123456789
export PASS_REDHAT=123456789
export OPENSHIFT_PULL_SECRET_PATH=${OPENSHIFT_PULL_SECRET_PATH:-''}
# export BUNDLED_PULL_SECRET_PATH=${BUNDLED_PULL_SECRET_PATH:-$OPENSHIFT_PULL_SECRET_PATH}
# https://origin-release.apps.ci.l2s4.p1.openshiftapps.com/ and https://github.com/okd-project/okd/releases/
#!/bin/bash
set -x
### NOTE: Remember to run as a root ;)
## https://github.com/crc-org/snc/blob/master/createdisk.sh#L9
## https://github.com/crc-org/snc/blob/master/createdisk-library.sh#L387
## https://github.com/crc-org/snc/blob/master/createdisk-library.sh#L83
## requires packages: libzstd zstd
@danpawlik
danpawlik / readme.md
Created June 30, 2023 06:24 — forked from gbraad/readme.md
Microshift with podman machine

5 minutes to OpenShift on a Mac with podman machine and microshift.

Steps:

  1. brew install podman
  2. podman machine init
  3. podman machine start
  4. podman machine ssh

(in the ssh session)

# Base on https://www.howtogeek.com/devops/how-to-monitor-kubernetes-resource-usage-with-metrics-server-and-kubectl-top/
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
---
@danpawlik
danpawlik / clusterRole.yaml
Created June 13, 2023 13:05
cluster-role-openshift
---
# from https://github.com/kubernetes/dashboard/issues/4179
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
rules: