Skip to content

Commit

Permalink
fix: add default domain and other cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccaffery committed Jan 11, 2021
1 parent 7ae998a commit 123ec5f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions kvm.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env sh
# shellcheck disable=SC2155

set -e
set -eu

FORMAT_CLEAR=$(tput sgr0) # CLEAR ALL FORMAT
FORMAT_BOLD=$(tput bold) # SET BRIGH
Expand Down Expand Up @@ -67,6 +67,7 @@ help() {

PREFIX=$(whoami)-
NETWORK="bridge"
DOMAIN="local"

MASTER_NODE_COUNT=1
WORKER_NODE_COUNT=1
Expand All @@ -75,6 +76,8 @@ CENTOS_VERSION=7
CPU_LIMIT=2
MEMORY_LIMIT=4096

GH_USER=

while [ $# -gt 0 ]; do
case $1 in
--prefix)
Expand Down Expand Up @@ -159,7 +162,7 @@ for node in $(sudo virsh list --all --name | grep "kube-${PREFIX}"); do
done

# remove existing configs
rm -f kube-*
rm -f kube-"$PREFIX"*

# ensure base image is accessible
sudo chmod u=rw,go=r "$BASE_IMAGE"
Expand Down Expand Up @@ -271,7 +274,7 @@ while [ $((i<=MASTER_NODE_COUNT)) -ne 0 ]; do
done

# create the ha proxy node
create_vm kube-"${PREFIX}"proxy "$PROXY_VIRTUAL_IP" "$PROXY_MAC" "$PROXY_IP"
create_vm kube-"${PREFIX}"proxy

print_machines() {
role=$1
Expand Down

0 comments on commit 123ec5f

Please sign in to comment.