Ride Along : Ktor API on Azure
OK - Who's ready to see me SUFFER!!!
I'm working on a website... huh... wonder what's got me blogging again... that's right CODING!!!
Anyway - website. In Kotling. Using Ktor. I need a host. I'm familiar with Azure. I have accounts on Azure. Let's go with Azure.
Step 1 : Google
The unfortunate result of this... It's mostly about Azure Functions. While I LOVE AzFunctions... I'm not going for Azure functions.
There's a github repo that... doesn't look like it's got enough info
There's an article about Ktor that I'm gonna save for later. It's got some examples that clicked a few concepts for me; but nothing on deployment...
Step 2 : Google Moar
OK... next search (ktor deploy) leads me to the Ktor documentation on Deploy. I'm giving up the Azure angle for now. Not enough immediate info.
Since Kotlin is JVM, I figure any java focused deploys into azure will work for Ktor as well. Let's see what this page has...
Some samples...
Examples for deploying to.... Google and Heroku... I've heard of Heroku...
OK... Maybe Azure is out? Then I gotta figure where to host a database... Azure has them together nice and simple.
Let's see... in the Ktor doc it talks about a fat-jar and a war... maybe googling around for "Fat-jar azure" will help with some stuff...
The Azure QuickStart repo has an example for Java and Tomcat... The KTor docs have example producing a WAR for Tomcat... seems like things are aligning...
I think a WAR is the best path forward.
OK... WAR, Tomcat... azure... I've developed the site with MSSQL, so... that'll be simplest.
And now that I've got that selected... It'll be later that I actually do it... later for me. This should sit in my draft folder until I get back to actually deploying it.
Crap... how do I do SSL on Azure... pfft, doable, and solvable later.
Anyway... until I come back to this!
2 months later
OK - I am hosted on Azure - mtgdiscovery.com.
I can see why there's not A LOT of docs on it. Once you get it, it's pretty straight forward. I assume those more familiar with linux web hosting would quickly and easily know where/what to do
It's just an Azure App Service w/Tomcat. Simple.
The SSL - also simple. Azure has simple steps to buy and setup the cert.
I'm working in IntelliJ and there's an azure plugin to make deploying from local super easy.
Of course, you want a proper CI/CD system... unless... lazy... and... Yeah... I'm still running it all locally. I'll get it proper at some point.
Anyway... not a lot. It was pretty straight forward when I finally just sat down and started in on it.
Wish it was a better story... Nope. Just boring old new tech.