Skip to content

Instantly share code, notes, and snippets.

View bat9r's full-sized avatar
🙃
Always do backup

Mykhaylo Pylypyshyn bat9r

🙃
Always do backup
View GitHub Profile
@bat9r
bat9r / Jenkinsfile
Created July 17, 2019 08:21
Example of injecting parameters
// Import classes
// To work with hudson.model we need have access to System Groovy
// it can be provided by Groovy plugin
import hudson.model.*
import java.util.Map;
// Create directly object of class CascadeChoiceParameter
// which will be parameter
CascadeChoiceParameter CCPCluster = new CascadeChoiceParameter(
"ClusterName",
@bat9r
bat9r / elastic_cheat_sheet.md
Created February 6, 2019 12:20 — forked from igorcosta/elastic_cheat_sheet.md
Elastic Cheat Sheet
@bat9r
bat9r / acs_kubernetes-get-credentials_FAIL.md
Created January 25, 2019 10:56
acs_kubernetes-get-credentials_FAIL

Login into your Kubernetes master and add this /etc/ssh/sshd_config

KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group1-sha1
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha1,hmac-md5,hmac-sha1-96,hmac-md5-96

After it restart ssh

systemctl restart ssh
@bat9r
bat9r / gist:eaec972d80ac8181b400e719c30f1c28
Last active December 26, 2018 09:51
Azure_acs_ssh_isuue

Error:

Incompatible ssh peer (no acceptable kex algorithm)
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke
...

Workaround: Login into your Kubernetes master and add this

@bat9r
bat9r / install_imagemagick7_ubuntu1604.sh
Created September 14, 2018 12:10
Installing ImageMagick7 in docker container ubuntu:16.04
apt-get update
apt-get -y install wget gcc make libpng12-dev
wget https://imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-7*
./configure
make
make install
ldconfig /usr/local/lib
make check

With fluent-logger-python

Link to library https://github.com/fluent/fluent-logger-python

Example

Fluentd service name: "fluentd-svc.elk.svc.cluster.local"
Install library:pip install fluent-logger Python code:

>>> from fluent import sender
>>> logger = sender.FluentSender('app', host='fluentd-svc.maintenance.svc.cluster.local', port=24224)

Running Minikube via LXD

I make some assumptions, and make no claims in how well supported this is or ever will be. I wanted to avoid using VMs because i've been working in containers for the last half decade. It made sense to just skip the middle man and use a machine type container system to run my minikube workloads.

Why not juju?

Simply put, Juju does a fantastic job; but to stay objective I wanted to achieve minikube in LXD as a functional alternative to juju deploy kubernetes-core, or using KVM/VirtualBox in this solution.