Skip to content

Instantly share code, notes, and snippets.

Andrei Kvapil kvaps

View GitHub Profile
View eip-on-eks-secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: restund
type: Opaque
data:
awsKeyId: TkFFVEhFQjhJRVNIOUZFQ0gyVE8=
awsSecretKey: YmFpNWVraWkzUGUyYWdlZTVvb25nZWlSb2lnaGllNHNodWg4ZmVlNA==
View eip-on-eks.yaml
spec:
hostNetwork: true
initContainers:
- name: eip
image: docker.io/amazon/aws-cli:2.0.18
command:
- /bin/bash
- -xec
- |
INSTANCE_ID=$(curl http://169.254.169.254/latest/meta-data/instance-id)
View benji_backup1
time benji backup file:///tmp/some2/tmp/some/dev/drbd/by-res/one-vm-5525-disk-0/0 one-vm-5525-disk-0
INFO: $ /benji/bin/benji backup file:///tmp/some2/tmp/some/dev/drbd/by-res/one-vm-5525-disk-0/0 one-vm-5525-disk-0
INFO: Backed up 26/5121 blocks (0.5%)
INFO: Backed up 52/5121 blocks (1.0%)
INFO: Backed up 78/5121 blocks (1.5%)
INFO: Backed up 104/5121 blocks (2.0%)
INFO: Backed up 130/5121 blocks (2.5%)
INFO: Backed up 156/5121 blocks (3.0%)
INFO: Backed up 182/5121 blocks (3.6%)
INFO: Backed up 208/5121 blocks (4.1%)
@kvaps
kvaps / test_big_files.sh
Last active May 22, 2020
minio ec:2 vs raid6 (16 drives / 2 parity / 20GB LACP / ST6000NM0115-1YZ110)
View test_big_files.sh
# s3bench -accessKey=minioadmin -accessSecret=minioadmin -bucket=bench -endpoint=http://minio:9001/ -numSamples=1000 -numClients=100
Test parameters Test parameters
endpoint(s): [minio-ec2] | endpoint(s): [minio-raid6]
bucket: bench bucket: bench
objectNamePrefix: loadgen_test_ objectNamePrefix: loadgen_test_
objectSize: 80.0000 MB objectSize: 80.0000 MB
numClients: 100 numClients: 100
numSamples: 1000 numSamples: 1000
@kvaps
kvaps / main.tf
Last active May 14, 2020
OpenNebula Terraform example from @azazell_o https://t.me/opennebula/11606
View main.tf
##################################################################################
# PROVIDERS
##################################################################################
provider "opennebula" {
endpoint = "${var.opennebula_endpoint}"
username = "${var.opennebula_user}"
password = "${var.opennebula_password}"
}
View config.yml.diff
version: 0.1
log:
level: info
fields:
service: registry
storage:
cache:
layerinfo: redis
filesystem:
rootdirectory: /storage
View docker-compose.yml.diff
- registry:
+ registry-gitlab:
image: goharbor/registry-photon:v2.7.1-patch-2819-v1.8.1
- container_name: registry
+ container_name: registry-gitlab
restart: always
+ ports:
+ - 5000:5000
cap_drop:
- ALL
@kvaps
kvaps / .gitlab-ci.yml
Created Mar 27, 2020 — forked from shalkam/.gitlab-ci.yml
using service account
View .gitlab-ci.yml
stages:
- deploy
deploy_app:
image: bitnami/kubectl:latest
stage: deploy
environment: production
script:
- USER_TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
- CERTIFICATE_AUTHORITY_DATA=$(cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | base64 -i -w0 -)
- kubectl config set-cluster k8s --server="https://kubernetes.default.svc"
View managedFields.yaml
apiVersion: v1
data:
index.html: |
hello default
kind: ConfigMap
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","data":{"index.html":"hello default\n"},"kind":"ConfigMap","metadata":{"annotations":{"qbec.io/component":"hello"},"labels":{"aaaa":"ccccc","qbec.io/application":"test","qbec.io/environment":"default"},"name":"demo-config","namespace":"default"}}
qbec.io/component: hello
@kvaps
kvaps / old_firefox_jre.sh
Created Mar 23, 2020
Run old firefox with jre6 using docker
View old_firefox_jre.sh
mkdir -p /tmp/1
cd /tmp/1
cat >Dockerfile <<\EOT
FROM i386/ubuntu:12.04
RUN apt-get update \
&& apt-get install -y firefox=11.0+build1-0ubuntu4 icedtea-6-plugin libstdc++5
EOT
docker build -t firefox-jre .
xhost +local:
docker run -ti \
You can’t perform that action at this time.