I’d played with this before and just saw it as dark magic. I couldn’t really get my head around it. I remember trying to set one up and making a total mess of it, so I left it.
Yesterday I went to an Azure All day presentation on Cognative services, hopefully I’ll try one of those out. I got a voucher for testing it out, but want to create a new Microsoft Account to try it out on. Unfortunately MS account creation is down at the moment.
One of the presentations was using Cognitive services in containers, and how you’d do that in Azure, basically it wraps all the bits up for you, but you still need to give it your Cognitive services app key and code so that it can communicate with the web and send info back for billing to your MS Azure account. The presentation was great, it was by Raju (I think) who I’d seen present before, and he does a very good presentation, also with demo’s, and I understood what it was all about.
I’ve been going to DevOps talks for a while and finally gave up on them as 1/ they were a bit over my head, 2/ Not really applicable to what I do as far as testing my ideas, which are small scale, not deployment. So for the last 6 months I’ve stopped going to them.
Anyway, back to Docker. After the presentation I found some good videos that walk you through setting up a real basic “Hello World” docker container and then also then deploy’s it.
The next video in his series shows the docker compose. Docker Compose lets us start multiple containers all in one config file, this is good if you have dependancy containers, his example is micro web services making api calls to different services, so the Docker Compose lets you make sure that they all start and run together.
His 3rd example is using it in the cloud, a bit more advanced, and i sort of like the idea of it, but its a bit complicated, I would like to see if I could build the processs on my VPS and maybe vid 2 will be sufficient.
So, from the video’s , which didn’t show up on the presentation, was getting the dependancy packages, a bit like Python and pip calling for dependancy packages.
I need to think a bit more where I’d use this, but I like the way of the containerised website, in fact, it reminds me of how WordPress does it , by having the main index.php file call oll the other parts such as header/footer/ article etc. Leaves the front light and lets it call what it needs. WordPress is just calling the database, but with docker you could call other containers , or wrap them all up into one big container.
I also like how you can test on your localhost to see that its working. That is a simple development environment. An appeal for this is the notion that it is like spinning up a VM for something, so you can spin up a Python instance. This has always troubled me with running python, sitting in the background when you are not using it for anything. Whereas in his 2nd video he uses Python code as an API, and as it has to talk to the PHP its passing JSON data across.
So notionally I could have a couple of containers running on my server for specific tasks and let them just run. I think this is the idea that the presentation was trying to convey, that you could have Cognitive services running in the background, but you are only paying for the calls to its API.
I’ll definitely have to find an exercise that will let me try this out. I would like to build and explore a Docker image/container.
Also the structure of micro-services. That allows you to work on micro elements independantly so can control build and testing. I think this may be an interesting avenue to explore for a FM Asset Management package with a database sitting in it.