4 ms·
What's wrong with booting a VM off a standardized base image (e.g. an AMI), and then applying simple deployment scripts for each application you need to run? Yo
by bob1029 7y ago
What's wrong with booting a VM off a standardized base image (e.g. an AMI), and then applying simple deployment scripts for each application you need to run? You could probably replicate 90% of the justification for using docker with some basic scripting.
git clone https://github.com/myprofile/my-cool-app
cd my-cool-app
chmod +x deploy.sh
./deploy.sh
That's it. The above script would be responsible for getting your application runtime environment up and then getting the application running as a persistent service with reasonable defaults. Most cloud vendors let you put something like that in your VM startup configuration. All you would need from this point is to ensure that any sort of desired management functions are built into the app itself. Perhaps having a central management service it communicates with across the public internet would be a good place to start. You don't need a lot of tooling to make a huge impact here. If you own the codebase behind it, and have a fundamental understanding of your deployment techniques, you can easily pivot and embrace radical new approaches. If you are stuck on Docker, this doesn't seem as optimistic from where I am standing.
- roca 7y agoOff the top of my head: two things in our (OP) case: 1) Memory overhead 2) Slow access to filesystem storage shared between containers
- lacampbell 7y agoThis is what I ended up doing. Don't laugh, but I spent about two weekends furiously learning docker for a side project, only to replace it with a shell script of about 100 lines. I'm sure containers have valid use cases for larger teams, but for one person I didn't see the point at all - especially as I use the same OS for dev and production.
- samvher 7y agoDocker is not only about having reproducible environments. I mostly work as a single developer and I use Docker all the time, mainly because I like the isolation properties and because it's super easy to launch certain services (e.g. set up a postgres database). In the past really often I would have issues with conflicting dependencies, that's all gone now. The fact that your shell script did the job for you is obviously a good thing, but maybe that just means that in this particular situation Docker didn't have much to offer for you.
- james_s_tayler 7y agoI use docker all the time when doing side projects by myself. It's nice because I don't know ahead of time what the dependencies will be but I don't really care. I just pull in all the container images via docker compose and suddenly everything is there and talking to each other. I find it very ergonomic outside the need to run docker system prune from time to time. I also value it highly when some open source project I want to play with has docker compose in its readme. Super easy just to spin it up.
- jordanthoms 7y agoThat approach works, but if you are going to go into production with it you might need to support: - Rollbacks - Automatic deployment of new releases from CI, rolling releases - Healthchecks, detecting if/when the server exits and making sure that VM gets killed - Canary deployments - Autoscaling (could use an autoscaling instance group for it, but what if you need to scale based on other metrics) - Log aggregation - Monitoring - Service discovery, load balancing between services - Service mesh - Fast startup of instances (starting a fresh VM and waiting for it to setup everything from scratch could take ~3-4 minutes, docker is in the ~30s or less range). - Bin-packing (run a high-cpu low-memory workload colocated with a low-cpu high-memory workload for maximum efficiency) etc, etc, all of which you get either out of the box or without a huge amount of work if you adopt something like Google Kubernetes Engine (which takes a few clicks to spin up a cluster). If you don't need any of that stuff and don't want to learn Kubernetes, it's totally justifiable to go that way, but personally I would take Google Kubernetes Engine over something like that any time. There's some up-front cost learning how it works which then pays off very quickly.
- KaiserPro 7y agoNone of these features are a function of docker, they are a function of the orchestration layer. bin-packing isn't what you describe, its shoving as much stuff on a machine as possible. Proper resource dependencies management allows what you describe, something k8s is weak on compared to other orchestration systems.
- ay 7y agoWhat about hashicorp’s nomad ? In my experience it does pretty much all of the above at a fraction of the complexity...
- techntoke 7y agoThis is way slower than Docker. Rootless containers are already a thing. If you still want VMs then see Kata Containers. Containers have a lot of benefits, the major one for me is reproducibility and application sandboxing. There is a reason containers exist and that every large cloud platform has adopted them, including Microsoft adding support in Windows.
- notyourday 7y ago> This is way slower than Docker. add-job bake-instances --app=my-id --instances=200 Oh, you never wrote tooling and you dont have a jobbing engine? Well, that's the complaiing that you can't get an an Uber because you did not download an app. It is sort of funny because every single shop that is "oh containers!" either creates them manually ( slow and painfully ) or just uses random ones developers find. > There is a reason containers exist and that every large cloud platform has adopted them, including Microsoft adding support in Windows. It is the same reason why Whole Foods sells sushi: that's teh way to sell salmon for $85/lb to hipsters. Hipsters hate buying salmon for $22/lb but they love the rolls.
- techntoke 7y ago> Oh, you never wrote tooling and you dont have a jobbing engine? Well, that's the complaiing that you can't get an an Uber because you did not download an app. It is sort of funny because every single shop that is "oh containers!" either creates them manually ( slow and painfully ) or just uses random ones developers find. Whatever helps you sleep at night. Creating a container image doesn't have to be slow. There are a lot of tools to help with this that provide things like caching. If I find a container image, the first thing I do is look at the Dockerfile to see if it follows best practices, and if it is secure and lightweight. A lot of the official images on Docker Hub are pretty good. Creating a VM image is going to be slower than Docker period. > It is the same reason why Whole Foods sells sushi: that's teh way to sell salmon for $85/lb to hipsters. Hipsters hate buying salmon for $22/lb but they love the rolls. I don't know what this has to do with anything. Besides, I thought hipsters would be vegan.
- spookthesunset 7y agoOkay so write your own crappy (excuse me, graceful and elegant) pile of shell scripts that nobody in your company but you understands? Sounds good to me. The second you leave, somebody is gonna rip that crap out and replace it with docker. All while mumbling under their breath...
- james_s_tayler 7y agoThis. Times 100x. This is one of Dockers biggest value adds.
- eeZah7Ux 7y agoNonsense. Applications have a lot of complexity and therefore code around initialization. Adding a little script to deploy them is harmless. It's also the approach used by various FAANGs operating at a large scale.
- x86_64Ubuntu 7y agoSounds kind of like a bug to me.
- dharmab 7y agoLow efficiencies. When you work with 1000s of cores, a VM per app instances is literally millions of dollars annually of wasted CPU compared to using a container orchestrator.