Skip to content

Instantly share code, notes, and snippets.

View alicek106's full-sized avatar

Chanho Yong alicek106

View GitHub Profile
type MemoryStats struct {
// Current memory usage, this includes all memory regardless of when it was
// accessed.
// Units: Bytes.
Usage uint64 `json:"usage"`
// Maximum memory usage recorded.
// Units: Bytes.
MaxUsage uint64 `json:"max_usage"`
@alicek106
alicek106 / groups
Created March 22, 2019 05:59
Ansible dynamic discovery in Inventory file - It groups to user defined group!
#######################
## EC2 Dynamic Inventory Groups
[tag_ansibleNodeType_etcd]
[tag_ansibleNodeType_worker]
[tag_ansibleNodeType_controller]
root@dev:/# apt update && apt install git python python-pip unzip wget vim -y && \
git clone https://github.com/alicek106/aws-terraform-kubernetes.git && \
cd aws-terraform-kubernetes/terraform
root@testbed:~# docker run -it --name terraform-aws-kube -h dev ubuntu:16.04
root@dev:/#
root@dev:/aws-terraform-kubernetes/terraform# wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip && \
unzip terraform_0.11.13_linux_amd64.zip && \
rm terraform_0.11.13_linux_amd64.zip && \
mv terraform /usr/bin && chmod +x /usr/bin/terraform
root@dev:/aws-terraform-kubernetes/terraform# export AWS_ACCESS_KEY_ID=<ACCESS_KEY>
root@dev:/aws-terraform-kubernetes/terraform# export AWS_SECRET_ACCESS_KEY=<SECRET_KEY>
root@dev:/aws-terraform-kubernetes/terraform# terraform init && \
ssh-keygen -t rsa -N "" -f ../keys/tf-kube
$ docker run -it --name test -h aws-cli alicek106/aws-cli-preset:0.0
root@aws-cli:/# export AWS_ACCESS_KEY_ID=<KEY>
root@aws-cli:/# export AWS_SECRET_ACCESS_KEY=<KEY>
root@aws-cli:/# cat trust-policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "eks.amazonaws.com"
},
"Action": "sts:AssumeRole"