When making a new release or adding new features to an existing release it’s very useful to have a rapid iteration development environment. We describe here how to setup an inner loop development cycle with Application Manager (KOTS) and use Tilt to automate that inner loop for truly rapid release iteration.
To begin rapid iteration, access your application manager console. Navigate to the files page, and you’ll see at the top of the page “Need to edit these files? Click here to learn how”. Click there and you will be presented with a dialog. These are the commands you will use for the inner development loop to support rapid release iteration.
A dialog like the one below will open. These are the two commands necessary for the inner loop development cycle:
First run the download command download the release:
[.pre]mkdir rapid-iterationcd rapid-iterationkubectl kots download
--namespace iz-test-app --slug iz-test-app
# Use the command given to you in the dialog above[.pre]
Now let’s setup our Tiltfile.
Create a file called Tiltfile in your local directory with contents like the below. Change the slug and folder names to match your application.
[.pre]local_resource ( "kots" , "kubectl kots upload --namespace default --slug iz-test-app ./iz-test-app --deploy --skip-preflights" , deps= "./iz-test-app" )[.pre]
Next let’s bring Tilt up:
Now you can load the url that tilt provided:
Now that we can see that Tilt is synchronizing our release with KOTS, we’re ready to try making a change to our release.
For this example let’s add a new log file collector with the following contents under iz-test-app/upstream.
[.pre]apiVersion: troubleshoot.sh/v1beta2kind: SupportBundlemetadata: name: iz-test-appspec: collectors: - logs: selector: - app.kubernetes.io/instance=wordpress[.pre]
You’ll see a new a Tilt log show up
Notice in the kots admin console we can see it was uploaded by kots:
We can see the file was updated:
And now let’s collect a new support bundle and see if our log file was collected:
This demonstrated how we can use rapid release iteration with Tilt to make enhancements to replicated releases.Even if you don't choose to use Tilt to automate the inner loop like we did here, we hope you find the idea of using an inner loop with in your development cycle with releases useful and you can use this knowledge to advance your application releases more quickly.