Skip to content

Instantly share code, notes, and snippets.

View afym's full-sized avatar
🔬
new ideas

Angel afym

🔬
new ideas
View GitHub Profile
@afym
afym / certficates.md
Created April 20, 2019 02:19
Kubernetes the hard way. Certficates

Creating Certificate Authority

Create common directory

cd ~/
mkdir kthw
cd kthw/
@afym
afym / CFSSL.md
Last active April 19, 2019 23:48
Kubernetes the hard way. Installing the CFSSL tools

Installing the Client Tools

In this lab you will install the command line utilities required to complete this tutorial: cfssl, cfssljson, and kubectl.

Install CFSSL

The cfssl and cfssljson command line utilities will be used to provision a PKI Infrastructure and generate TLS certificates.

Download and install cfssl and cfssljson from the cfssl repository:

@afym
afym / k8s.md
Created April 19, 2019 21:12
k8s install linux

Installing K8S in Centos

First setup two servers

a master node base on centos 7
a worker node base on centos 7

Turn off swap in mater and worker nodes

@afym
afym / windows-backend-stack
Last active April 2, 2019 21:46
windows-backend-stack
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
cinst jdk8
cinst git.install
cinst intellijidea-ultimate
cinst datagrip
cinst keepass.install
cinst Microsoft-Hyper-V-All -source windowsFeatures
#!/bin/sh
# 0. Some constants to re-define to match your environment
ES_HOST=localhost:9200
ES_INDEX=bookingmotor/hotels
JSON_FILE_IN=/home/angel/personal/elasticsearch/result-14-v1.json
JSON_FILE_OUT=/home/angel/personal/elasticsearch/result-14-bulk-v1.json
# 1. Python code to transform your JSON file
@afym
afym / some terraform commands
Created June 19, 2017 15:51
terraform commands
$ terraform init
$ terraform get
$ terraform env list
$ terraform env new test
$ terraform env select test
$ terraform plan -var-file=variables/sydney.tfvars
$ terraform apply -var-file=variables/sydney.tfvars
@afym
afym / php.cli
Created May 1, 2017 02:50
PHP command line uses
# run a server using php
php -S localhost:8000 -t /var/foo/php_demo/
@afym
afym / hashicorp.sh
Last active April 12, 2017 16:26
Install hashicorp tools very fast in ubuntu xenial
#!/bin/sh
TOOL_NAME=$1
ZIP_URL=$2
mkdir /tmp/$TOOL_NAME
cd /tmp/$TOOL_NAME
curl -sS $ZIP_URL > $TOOL_NAME.zip
unzip $TOOL_NAME.zip
sudo cp $TOOL_NAME /usr/local/bin/$TOOL_NAME
rm -rf /tmp/$TOOL_NAME
echo "$TOOL_NAME :: is installed successfully"