This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a deployment | |
kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080 | |
# Create a service | |
kubectl expose deployment hello-minikube --type=NodePort | |
# List the pods | |
kubectl get pod | |
# List the service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
## Note: this script has dependency on "ack" utility. | |
if [ $# -lt 2 ]; then | |
echo "--------- Synopsis--------" | |
echo "Synopsis: Globally replace an old pattern withe a new text string for all directories given" | |
echo "Usage: $0 <old_pattern> <new_text> [directory, default: ./]" | |
echo "e.g." | |
echo " $0 '=logging\/' '/root/logging_files\/' /home/ec2-user/all/ansible/roles" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# example1-volume.yaml | |
# | |
- hosts: localhost | |
tasks: | |
- name: check if myvolume exists | |
command: docker volume inspect myvolume | |
register: myvolume_exists | |
failed_when: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
# ref: https://docs.docker.com/engine/security/https/ | |
mkdir CA-server-client-keys | |
cd CA-server-client-keys/ | |
## Create a CA, server and client keys with OpenSSL | |
## ---------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## references: | |
## 1.) https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs | |
function usage() { | |
if [ $# -lt 1 ]; then | |
echo "----------------------------------------------------------------------" | |
echo "---------------------------- USAGE -----------------------------------" | |
echo "----------------------------------------------------------------------" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## find ports being used | |
sudo netstat -antup |awk '{print $4;}'|cut -d':' -f2 |sort -u | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ------------------------------------ | |
# maintainer: [email protected] | |
# license: Apache License Version 2.0 | |
# ------------------------------------ | |
# This feature is not yet available for native Docker Windows containers. | |
# On Linux and when using Docker for Mac or Docker for Windows or | |
# Docker Toolbox, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
if [ $# -lt 3 ]; then | |
echo "ERROR: --- Usage: $0 <config_file> <key> <value> [<delimiter>] [<prefix-pattern>]" | |
echo "e.g." | |
echo './replaceKeyValue.sh \"elasticsearch.yml\" \"^network.host\" \"172.20.1.92\" \":\" \"# network\" ' | |
exit 1 | |
fi | |
CONFIG_FILE=${1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ------------------------------------ | |
# maintainer: [email protected] | |
# license: Apache License Version 2.0 | |
# ------------------------------------ | |
ERROR_NO_ARGS_PROVIDED=99 | |
ERROR_ERROR_ARGS_PROVIDED=98 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
# ref: https://github.com/dcos/dcos-vagrant | |
if [ ! -d dcos-vagrant ]; then | |
git clone https://github.com/dcos/dcos-vagrant | |
fi | |
cd dcos-vagrant | |
if [ ! -s VagrantConfig.yaml ]; then |