minor clean
This commit is contained in:
		@@ -1,4 +1,3 @@
 | 
				
			|||||||
 
 | 
					 | 
				
			||||||
language: python
 | 
					language: python
 | 
				
			||||||
dist: bionic
 | 
					dist: bionic
 | 
				
			||||||
cache: pip
 | 
					cache: pip
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,6 @@ functions=(isprime-kubeless-go-sc)
 | 
				
			|||||||
connections=(45)
 | 
					connections=(45)
 | 
				
			||||||
times=(30s)
 | 
					times=(30s)
 | 
				
			||||||
kuberhost="node1:31299"
 | 
					kuberhost="node1:31299"
 | 
				
			||||||
maxthreads=40
 | 
					 | 
				
			||||||
kubeless=true
 | 
					kubeless=true
 | 
				
			||||||
rps=500
 | 
					rps=500
 | 
				
			||||||
#Climb mode configuration
 | 
					#Climb mode configuration
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,14 +1,4 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
# @author: Daniel Keszei <keszei.daniel@gmail.com>
 | 
					 | 
				
			||||||
# @description: Kubernetes deployer
 | 
					 | 
				
			||||||
# @created: 2019-02-15
 | 
					 | 
				
			||||||
# @version: 1.0
 | 
					 | 
				
			||||||
# @origin: https://github.com/szefoka/openfaas_lab
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Variable(s)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Script variable(s)
 | 
					 | 
				
			||||||
PID=$$
 | 
					PID=$$
 | 
				
			||||||
SCRIPTNAME="$(basename $0)"
 | 
					SCRIPTNAME="$(basename $0)"
 | 
				
			||||||
WORKER_LIST="worker.list"
 | 
					WORKER_LIST="worker.list"
 | 
				
			||||||
@@ -16,23 +6,6 @@ EXTERNAL=false
 | 
				
			|||||||
MASTER_IP=""
 | 
					MASTER_IP=""
 | 
				
			||||||
TOKEN=""
 | 
					TOKEN=""
 | 
				
			||||||
HASH=""
 | 
					HASH=""
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Functions
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function usage {
 | 
					 | 
				
			||||||
cat << EOF
 | 
					 | 
				
			||||||
Usage: $SCRIPTNAME [--external|-e] <CNI>
 | 
					 | 
				
			||||||
--external|-e :	Initizalize Kubernetes on the external network
 | 
					 | 
				
			||||||
				instead of on an internal one
 | 
					 | 
				
			||||||
Available <CNI> plugins:
 | 
					 | 
				
			||||||
	* Calico
 | 
					 | 
				
			||||||
	* Cilium
 | 
					 | 
				
			||||||
	* Flannel
 | 
					 | 
				
			||||||
	* WeaveNet
 | 
					 | 
				
			||||||
EOF
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Send error messages to stderr
 | 
					## Send error messages to stderr
 | 
				
			||||||
function echo_err {
 | 
					function echo_err {
 | 
				
			||||||
	echo "Error: $@" >&2
 | 
						echo "Error: $@" >&2
 | 
				
			||||||
@@ -75,18 +48,6 @@ if [ "$#" -lt 1 ]; then
 | 
				
			|||||||
	echo_err "Missing CNI plugin name as an argument."
 | 
						echo_err "Missing CNI plugin name as an argument."
 | 
				
			||||||
	exit 1
 | 
						exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					 | 
				
			||||||
## Check for help parameter
 | 
					 | 
				
			||||||
for i in "$@"
 | 
					 | 
				
			||||||
do
 | 
					 | 
				
			||||||
	### Make the letters of the argument lowercase
 | 
					 | 
				
			||||||
    i=$(tr '[:upper:]' '[:lower:]' <<< $i)
 | 
					 | 
				
			||||||
	case $i in
 | 
					 | 
				
			||||||
		### Print out help message
 | 
					 | 
				
			||||||
		help|h|-h|--help)	usage; exit 0;;
 | 
					 | 
				
			||||||
	esac
 | 
					 | 
				
			||||||
done
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Check parameters and setup variables for Kubernetes installation
 | 
					## Check parameters and setup variables for Kubernetes installation
 | 
				
			||||||
for i in "$@"
 | 
					for i in "$@"
 | 
				
			||||||
do
 | 
					do
 | 
				
			||||||
@@ -151,9 +112,6 @@ HASH=sha256:$(openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt |
 | 
				
			|||||||
				openssl dgst -sha256 -hex |
 | 
									openssl dgst -sha256 -hex |
 | 
				
			||||||
				sed 's/^.* //')
 | 
									sed 's/^.* //')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#FIXME Do I need local docker-registry?
 | 
					 | 
				
			||||||
#./deploy/docker_registry_setup.sh $IP:5000
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Join the worker nodes
 | 
					# Join the worker nodes
 | 
				
			||||||
for WORKERNAME in ${WORKER[@]}; do
 | 
					for WORKERNAME in ${WORKER[@]}; do
 | 
				
			||||||
	echo "[worker:$WORKERNAME] Deploying..."
 | 
						echo "[worker:$WORKERNAME] Deploying..."
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,26 +1,8 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
# @author: Daniel Keszei <keszei.daniel@gmail.com>
 | 
					 | 
				
			||||||
# @description: Kubernetes cluster withdrawer
 | 
					 | 
				
			||||||
# @created: 2019-02-26
 | 
					 | 
				
			||||||
# @version: 1.0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Variable(s)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Script variable(s)
 | 
					 | 
				
			||||||
PID=$$
 | 
					PID=$$
 | 
				
			||||||
SCRIPTNAME="$(basename $0)"
 | 
					SCRIPTNAME="$(basename $0)"
 | 
				
			||||||
WORKER_LIST="worker.list"
 | 
					WORKER_LIST="worker.list"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Functions
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#FIXME Write usage message
 | 
					 | 
				
			||||||
function usage {
 | 
					 | 
				
			||||||
cat << EOF
 | 
					 | 
				
			||||||
EOF
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Send error messages to stderr
 | 
					## Send error messages to stderr
 | 
				
			||||||
function echo_err {
 | 
					function echo_err {
 | 
				
			||||||
	echo "Error: $@" >&2
 | 
						echo "Error: $@" >&2
 | 
				
			||||||
@@ -46,9 +28,6 @@ readarray WORKER < $WORKER_LIST
 | 
				
			|||||||
./withdraw/node_reset.sh
 | 
					./withdraw/node_reset.sh
 | 
				
			||||||
rm -rf ~/.kube
 | 
					rm -rf ~/.kube
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#FIXME Does local docker-registry needs removal
 | 
					 | 
				
			||||||
#./deploy/docker_registry_setup.sh $IP:5000
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Reset the workers0
 | 
					# Reset the workers0
 | 
				
			||||||
for LINE in $(cat $WORKER_LIST | grep -vE "^#"); do
 | 
					for LINE in $(cat $WORKER_LIST | grep -vE "^#"); do
 | 
				
			||||||
	WORKERNAME=`echo $LINE | awk -F"/" '{print $NF}'`
 | 
						WORKERNAME=`echo $LINE | awk -F"/" '{print $NF}'`
 | 
				
			||||||
@@ -56,8 +35,5 @@ for LINE in $(cat $WORKER_LIST | grep -vE "^#"); do
 | 
				
			|||||||
	echo "[worker:$WORKERNAME] Evicating..."
 | 
						echo "[worker:$WORKERNAME] Evicating..."
 | 
				
			||||||
	ssh $WORKERNAME -o "StrictHostKeyChecking no" "bash -s" < ./withdraw/node_reset.sh
 | 
						ssh $WORKERNAME -o "StrictHostKeyChecking no" "bash -s" < ./withdraw/node_reset.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	#FIXME Does local docker-registry needs removal
 | 
					 | 
				
			||||||
#	ssh $WORKERNAME -o "StrictHostKeyChecking no" "bash -s" < ./deploy/docker_registry_setup.sh $IP:5000
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	echo "[worker:$WORKERNAME] Eviction is completed."
 | 
						echo "[worker:$WORKERNAME] Eviction is completed."
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user