nre-learning / antidote-selfmedicate

Configs and scripts for spinning up a local instance of Antidote on your laptop for testing and lesson development
Apache License 2.0
12 stars 19 forks source link

Handling resumes better #65

Closed Mierdin closed 4 years ago

Mierdin commented 5 years ago

Things seem to work fine on the first start, but if we halt the VM and then run vagrant up later, none of the Antidote services are running inside of k8s.

Looks like sub_resume runs minikube start, which in theory should just re-start what was running before, but it doesn't seem like the cluster remembers previously deployed artifacts. Maybe this is a byproduct of using the none driver, since I don't remember this being a problem when we were using the minikube VM.

smk4664 commented 5 years ago

This is due to the vagrant provisioners not running on a "vagrant up" if the provisioners had already been run. Vagrant does not seem to have a way to differentiate between the first up and the second "up". A temporary solution would be to run "vagrant ssh ./selfmedicate.sh resume". Or you can pause the vagrant and resume later. The commands "vagrant suspend" and "vagrant resume" will assist with this.

smk4664 commented 5 years ago

Looking at the vagrantfile, it looks like you need to run "vagrant reload" after a halt.

smk4664 commented 5 years ago

After investigating, the resume is being run, and it is being run the first time the provisioner runs as well, not what I wanted. Also, the resume works but takes a few minutes for the pods to all come back up. First, the Kube-system pods run, then the antidote pods run. So, I will be putting some messages into the vagrant to show this.