KotsAdmin Automated Deployment Enhancements
Opened this issue · 7 comments
HI @dexhorthy ,
We have an urgent requirement where we want to trigger automated deployment via Kots CLI on Azure Marketplace, this is how the overall deployment would look like,
Step 1: Provision the Resources through ARM templates, create all required secrets and confimaps
Step 2: Kick Start the Deployment through Kots CLI
Right now the problems that I see with Kots CLI are,
- when I trigger a deployment at the time of KotsAdmin installation like this and if there are any Pre-flight warnings, the deployment doesn't trigger and it doesn't notify to client that deployment didn't happen
- if there is any change in the config, we can modify the config and re-install the app with updated config
kubectl kots install aif-core/aksinstaller --license-file akstest.yaml --shared-password xxxxx --namespace aif-core
One solution to this problem is to add a flag through which Pre-flight warnings will be skipped and deployment will continue.
But we don't like this idea because in our case they are many good pre-flight checks which we do by running a container inside kubernetes cluster where we validate whether the DB is accessible, whether the Identity server is reachable and few other resources are connectable/accessible and these checks will be realistic only when they run as a container on target cluster and we want to stop the deployment when any such pre-flight check fail because if we don't stop the deployment, the deployment will eventually fail at a later stage due to unsatisfied dependencies
So, what we want is,
Step 1: We will install Kots Admin console and upload the license but the deployment should not trigger , so a flag is required through which we can skip the initial deployment
Step 2: Through a kots flag we should be able to check if there are any Pre-flight Warnings/Errors and kots should return an json response with what all checks have passed/fail/warnings
Step 3: Based on step2 response, if there are no warnings/Errors, there should be an additional flag, through which we should be able to trigger the automated deployment
Please let me know in case of any further clarification required
thanks @rajivml -- cc @markpundsack
@rajivml Thanks for the feedback. To be clear, when you're talking about warnings here, you really mean errors, right? We have a separate issue about not blocking installs based only on warnings (#847).
Can you elaborate on why you need 3 separate steps? It seems the most important part is that you're able to get information about the errors (and warnings) and pass them on to the user. If we could do that in one step, would it work as well?
@markpundsack I mean both warnings/errors, what ever that is preventing the deployment , more context about this can be found here,
yeah am ok with a single command as well as long as the errors/warnings which are preventing the deployment can be surfaced back to the user and the acceptance criteria here will be , I should be able to re-trigger the deployment again with the same command once the warnings/errors are fixed
@markpundsack hi, can we please have some commitment / timelines on when can we expect this, we are targetting AKS release by August 2nd week end, so it should be available before that because we changed the deployment architecture for Azure after talking to @dexhorthy and team, so now there is no looking back or explore an alternate solution
Also, i noticed that if the preflights fail, then the license upload also doesn't happen
Hello.
I am working at the same thing as rajivml and I can confirm that when running the command with a valid license and passed simple preflight - the license is NOT uploaded. No errors, no warnings, no logs. Just when I hit the https://x.x.x.x:8800 - it takes me dirrectly to the upload license.
Please advice how can I install the license and deploy the product using a stable procedure that can be reproduced 10 times out of 10.
Attached the 2 pictures to show the command and the preflights:
We've got some more details from @cezarboicu and are now investigating further