Let's look at some basic kubectl output options.
Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).
We can start with:
kubectl get no
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
# Create all variables used in this Terraform run | |
variable "aws_access_key" {} | |
variable "aws_access_secret_key" {} | |
variable "aws_bucket_name" {} | |
variable "aws_region_main" { | |
default = "eu-west-1" | |
} | |
variable "aws_region_replica" { | |
default = "eu-central-1" | |
} |
##Install AWS CLI Tools##
cd ~/.aws
edit or create new file named config
paste the following contents inside.
Save the file as "config"
#!/usr/bin/groovy | |
/* | |
* Copyright (c) 2016, Andrey Makeev <[email protected]> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* 1. Redistributions of source code must retain the above copyright |
node { | |
repositoryAccess = 'https://' | |
repositoryAccessSeparator = '/' | |
echo "repository host: ${repositoryHost}" // github.com | |
echo "repository path: ${repositoryPath}" // <user>/<repository>.git | |
echo "repository jenkins credentials id: ${credentialsId}" // jenkins credentials for the jenkins git account who have commit access | |
echo "repository branch: ${branch}" // master or another branch | |
echo "repository commiter username: ${repositoryCommiterUsername}" // Jenkins account email | |
echo "repository commiter name: ${repositoryCommiterEmail}" // Jenkins |
These steps show two less common interactions with git to extract a single file which is inside a subfolder from a git repository. These steps essentially reduce the repository to just the desired files and should performed on a copy of the original repository (1.).
First the repository is reduced to just the subfolder containing the files in question using git filter-branch --subdirectory-filter
(2.) which is a useful step by itself if just a subfolder needs to be extracted. This step moves the desired files to the top level of the repository.
Finally all remaining files are listed using git ls
, the files to keep are removed from that using grep -v
and the resulting list is passed to git rm
which is invoked by git filter-branch --index-filter
(3.). A bit convoluted but it does the trick.
global | |
chroot /var/lib/haproxy | |
crt-base /etc/pki/tls/certs | |
daemon | |
group haproxy | |
log 127.0.0.1 local0 | |
maxconn 2000 | |
pidfile /var/run/haproxy.pid | |
stats socket /var/lib/haproxy/stats | |
tune.ssl.default-dh-param 2048 |
#!/bin/sh | |
version="1.4.15" | |
priority="10415" | |
libevent="/usr/local/libevent/2.0.20-stable/" | |
supervisordir="/etc/supervisord.d" | |
# create user | |
sudo groupadd memcached | |
sudo useradd -r -g memcached -s /sbin/nologin -M -d /var/run/memcached memcached |