I want to see current status of my docker containers on dashboard.
Something like this:
Is there any third party plugin to do this or I have to create my own?
If I have to, where can I start?
Related
I have a web application that helps my client launch an API with a button "Launch my API".
Under the hood, I have a Docker image that is ran on two Google Cloud Run services (one for debug environment and one for production).
My challenge is the following: How can I trigger the deployment of new Docker containers on-demand ?
Naively, I would like that this button call an API that trigger the launch of these services based on my Docker image (that is already in Google Cloud or available to download at a certain URL).
Ultimately, I'll need to use Kubernetes to manage all of my container's clients. Maybe I should look into that for triggering new container deployments ?
I tried to glue together (I'm very new to the cloud) a Google Cloud function that trigger a new service on Google Cloud Run based on my docker image but with no success.
I'm looking to be able to build docker containers on the fly given a docker file. That is, given a docker file, I want to be able to send the file to a remote "build service", which builds it for me programatically. Are there any hosted or open source services that provide this?
Note that I'm not looking to build images on CI, but rather do something in code like this:
def build_image(dockerfile_contents):
resp = docker_service.build(dockerfile_contents)
...
A simple rest API would be perfect. Any thoughts or ideas?
I don't think there are such service providers by now. But you can use Docker SDK to build images for you. You can use their official Python library.
Also, you can inspire how Docker CLI itself triggers the builds.
For the sake of remoteness and being cloudy, check out the way this article mentions using a Kubernetes cluster to build your images: You can use K8s API to trigger a job that its container builds your Docker image.
Seems like the best solution is to self-host something like kaniko. The post by #Ali Tou here seems like a more involved, but viable option.
I would like to monitor my docker containers with a TIG (Telegraf, InfluxDB and Grafana) stack running in containers too.
I would like my architecture to be like this:
I'm using this stack for TIG, but I'm open to any idea.
Do you have any idea how I could achieve that? Thanks.
Rather than that you should point out something like this:
In here you would only need to create base Docker Image that have the Telegraf agent installed and how to connect to InfluxDB, and the plugins selection on how to collect information from your Containers. From that point everything should be trivial.
Take a look at Telegraf docker input plugin. If you do not need to monitor something complex this may be what you need. A single Telegraf instance on a host. No need to build it in inside a docker image.
I'm setting up a CI/CD workflow for my organization but I'm missing the final piece of the puzzle. Surely this is a solved problem, or do I have to write my own?
The full picture.
I'm running a few EC2 instances on AWS, each running docker in its native swarm mode. A few services are running here which I've started manually via docker service create ....
When a developer commits source code a trigger is sent to jenkins to pull the new code and build a new docker image which is then pushed to my private registry.
All is well and good up to here, but how do I get the new image onto my docker hosts and the running container automatically updated to the new version?
Docker documentation states (here) that the registry can send events to configurable endpoints when a new image gets pushed onto it. This is what I want to automatically react to by having my docker hosts then pull the new image and stop, destroy and restart the service using that new version (with the same env flags, labels, etc etc), but I'm not finding any solution to this that fits my use case.
I've found v2tec/watchtower but it's not swarm-aware nor can it pull from a private registry at the time of writing this question.
Preferably I want a docker image I can deploy on my docker manager which listens to registry events (after pointing the registry config at it) and does the magic I need.
Cost is an issue, but time is less so, so I'm more inclined writing my own solution than I am adopting a fee-based service for this.
One option you have is to SSH to swarm master from Jenkins using SSH plugin and pull the new image and update the service when new image is pushed to the registry.
I would like to build in my web application, the ability to monitor updates, and install them, if the admin chooses to do so.
This functionality is some-what similar to what Jira does.
The question is, how would I perform this?
Let's assume I have full admin access to the docker host.
Maybe there is a tool out there?
I was thinking something along the lines of:
Have a seperate "update" docker container.
When starting an update, the web app communicates to host docker to startup the update container.
The update container will receive the new docker images then docker save && docker load into the host machine (can child containers do this?)
The update container will shutdown web container and start another web container (progress container) that just gives update progress on port 80.
The update container will update the web container with new image.
When complete, the update container will shutdown the progress container, and start the new web application.
Sorry if this isn't exactly a Q/A question, but I am wondering if there is a tool out there that does something like this, or maybe a tool that could be re purposed for this.
i'm not an expert, but answering in case someone like me searches and finds this.
so maybe the answer is you wouldn't. docker container shall be immutable. so the way you update your webapp is by building a new docker image and deploying that.
see also:
Can I push application updates to docker image without rebuilding?