Skip to content

Instantly share code, notes, and snippets.

View antonfisher's full-sized avatar

Anton Fisher antonfisher

View GitHub Profile
#!/usr/bin/env bash
# Run this script from githib:
#bash <(curl -s https://gist.githubusercontent.com/antonfisher/06461c7ac9ba147884222a2cea815fda/raw/77af2d09d7ed517f641fc888d0ff3ff12604d4e5/deploy-minikube-nexentaedge-cluster-on-ubuntu.sh)
# cleanup
#sudo apt remove virtualbox kubectl; sudo rm -rf /usr/local/bin/minikube; rm -rf ~/.minikube
# port forwarding if run inside ubuntu vm (IP - vm ip)
#sudo ssh -L 0.0.0.0:80001:IP:31080 root@IP
func waitForTask(id string) (err error) {
done := make(chan error)
timer := time.NewTimer(0)
timeout := time.After(10 * time.Seconds)
go func() {
for {
select {
case <-timeout:
timer.Stop()
@antonfisher
antonfisher / allow-privileged-for-microk8s.md
Last active September 24, 2021 09:53
MicroK8s add --allow-privileged=true flag

Add --allow-privileged=true to:

# kubelet config
sudo vim /var/snap/microk8s/current/args/kubelet

#kube-apiserver config
sudo vim /var/snap/microk8s/current/args/kube-apiserver

Restart services:

@antonfisher
antonfisher / install-nexentastor-csi-driver-to-microk8s.md
Last active June 1, 2021 14:03
Install NexentaStor CSI Driver to MicroK8s

Install NexentaStor CSI Driver to MicroK8s

Requirements

  • Ubuntu 18.04
  • root user access

Steps

  1. Install dependencies:
@antonfisher
antonfisher / install-nexentastor-csi-driver-to-minikube.md
Last active November 29, 2018 21:26
Install NexentaStor CSI Driver to Minikube

Install NexentaStor CSI Driver to Minikube

Requirements

  • Ubuntu 18.04
  • root user access

Steps

  1. Install dependencies:
@antonfisher
antonfisher / index.html
Created March 25, 2019 22:01
math-loader
CSS Loaders:
<div class="loader">
<div class="item item-0">
<div class="ball"></div>
</div>
<div class="item item-30">
<div class="ball"></div>
</div>
<div class="item item-60">
<div class="ball"></div>
@antonfisher
antonfisher / server.go
Last active June 9, 2019 23:52
HTTP PUT servers on Node.js and Go with calculating MD5 sums of uploaded files
//
// Usage:
// env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o server server.go && ./server
// Test:
// dd if=/dev/urandom of=./archive.2gb.zip bs=1024KB count=2000
// time curl --upload-file archive.2gb.zip http://localhost:9001
//
package main
@antonfisher
antonfisher / run-all-mint-tests.sh
Last active March 16, 2020 12:56
Run all minio/mint tests and do not fail on first failed test case
# by defailt mint tests fail on the first failed test case, to change it follow these steps:
git clone [email protected]:minio/minio.git
cd minio/mint
vim mint.sh +194 # comment "break" on string 194 to run all the tests and don't stop on the first fail
docker build --no-cache -t minio/mint:local . -f Dockerfile.dev
docker run \
--name mint \
--rm \
-it \
-e SERVER_ENDPOINT=10.3.199.254:9000 \
@antonfisher
antonfisher / add-test-options.diff
Last active March 16, 2020 12:56
Add BAIL and TEST_ONLY options to minio/mint tests runner
diff --git a/mint/mint.sh b/mint/mint.sh
index 5d9e997..952dc16 100755
--- a/mint/mint.sh
+++ b/mint/mint.sh
@@ -139,6 +139,7 @@ function main()
export ENABLE_VIRTUAL_STYLE
export GO111MODULE
export GOPROXY
+ export BAIL
@antonfisher
antonfisher / s3-test-mc.sh
Created September 12, 2019 21:08
Simple S3 test using minio/mc client
#!/usr/bin/env bash
# setup:
# $ mkdir -p /tmp/s3 && cd /tmp/s3
# $ ~/js/nexenta/nef.extra/mc/test.sh 2>&1 | grep --color -E "^\+.+$|$"
set -x;
#set -e;
HOST="1.1.1.1:9000"