Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
  • Loading branch information
kakkoyun committed Nov 30, 2021
1 parent 8f07455 commit 2629221
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions scripts/local-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,37 @@ set -euo pipefail

# Creates a local minikube cluster, and deploys the dev env into the cluster
function up() {
# Spin up local cluster if one isn't running
if minikube status -p parca-agent; then
echo "----------------------------------------------------------"
echo "Dev cluster already running. Skipping minikube cluster creation"
echo "----------------------------------------------------------"
else
ctlptl create registry ctlptl-registry || echo 'Registry already exists'
# minikube start -p parca-agent --driver=virtualbox --kubernetes-version=v1.22.3 --cpus=4 --disk-size=80000mb --docker-opt dns=8.8.8.8
minikube start -p parca-agent --driver=kvm2 --kubernetes-version=v1.22.3 --cpus=12 --memory=40gb --disk-size=120gb --docker-opt dns=8.8.8.8 --docker-opt default-ulimit=memlock=9223372036854775807:9223372036854775807
fi
# Spin up local cluster if one isn't running
if minikube status -p parca-agent; then
echo "----------------------------------------------------------"
echo "Dev cluster already running. Skipping minikube cluster creation"
echo "----------------------------------------------------------"
else
ctlptl create registry ctlptl-registry || echo 'Registry already exists'
# kvm2, hyperkit, hyperv, vmwarefusion, virtualbox, vmware, xhyve
minikube start -p parca-agent \
--driver=virtualbox \
--kubernetes-version=v1.22.3 \
--cpus=12 \
--memory=40gb \
--disk-size=120gb \
--docker-opt dns=8.8.8.8 \
--docker-opt default-ulimit=memlock=9223372036854775807:9223372036854775807
fi

# Deploy all services into the cluster
deploy
# Deploy all services into the cluster
deploy

echo "Now run \"tilt up\" to start developing!"
echo "Now run \"tilt up\" to start developing!"
}

# Tears down a local minikube cluster
function down() {
minikube delete -p parca-agent
minikube delete -p parca-agent
}

# Deploys the dev env into the minikube cluster
function deploy() {
# Deploy all generated manifests
kubectl apply -R -f ./deploy/tilt
# Deploy all generated manifests
kubectl apply -R -f ./deploy/tilt
}

0 comments on commit 2629221

Please sign in to comment.