What's the best way to achieve a docker-like build with Windows?
February 11, 2016 11:39 AM   Subscribe

I really like developing with docker, I can get a nice clean install of everything on every build, while also being able to spin up a production environment locally (load balancing, SQL cluster, etc.). What's the closest I can come with Windows? And I don't mean the new pre-release container features (unless those work without a whole lot of caveats), I need something I can use.

I'm simplifying what docker can do, but I work with a large, proprietary CMS. It has a lot of dependencies: SQL, Mongo, IIS, etc. We have scripts that set these up, but they can take time to tear up/tear down and depend heavily on the team keeping the same paths, or maintaining config files for what their local paths should be. In any case what I'd like to do:

- Branch a feature, then have a whole new environment to test that feature
- On each build (maybe just on the build server), build up the environment from scratch so things like configs don't get left behind

Is my best bet chef or something? I'm a little confused as to how to use those. I'd like, obviously, same processes we use on local development to bubble up all the way to production.

On docker, if I remember correctly, you move up your source files and it goes through the build/compile toolchain.

Right now I'm toying with creating an ISO with everything on it, but that's a monolithic ISO built by hand.
posted by geoff. to Technology (9 answers total)
 
Have you tried Vagrant? It's not as lightweight as Docker containers (it usually spins up VirtualBox or VMWare) but has a lot of the same ideas.
posted by zsazsa at 12:00 PM on February 11, 2016 [3 favorites]


Microsoft is releasing Docker support in Windows Server 2016 so you won't have to wait too long to try it out.
posted by mmascolino at 12:15 PM on February 11, 2016


Response by poster: Ah I could try Vagrant, so is a Vagrantfile the same as a Dockerfile? Can it configure Windows similar to how Dockerfile will build from scratch? Or do I need something else to get that going?
posted by geoff. at 12:15 PM on February 11, 2016


You can use shell scripts in (Powershell, and batch) in the configs to set things up.
posted by zabuni at 12:37 PM on February 11, 2016


Is my best bet chef or something? I'm a little confused as to how to use those.

Can you clarify the problem you're trying to solve? For me, Docker/ Vagrant solves a different problem than Chef, Ansible, et al. We use Vagrant to save our developers from having to be dev ops experts as our server setup is fairly complex. They get a nice clean VM so they can start working on code right away and if anything ever goes wrong you can always blow it up and start right over. So that's good for developers as it's convenient and replicates the live server environment fairly closely.

Chef and the rest are a more general toolset for setting up environments. You can use them to generate development environments like Docker & Vagrant but you can also use them to deploy projects, provision new servers, whatever. It sounds like these kinds of tools would be better for what you want to do. OTOH, you can certainly use them to deploy Docker/ Vagrant images so it could be a mix as well.
posted by yerfatma at 12:55 PM on February 11, 2016 [2 favorites]


What we do is just run Linux (Ubuntu or Mint) in Oracle's Vbox on Windows and run docker/docker-compose on there.
posted by octothorpe at 12:58 PM on February 11, 2016


is a Vagrantfile the same as a Dockerfile? Can it configure Windows similar to how Dockerfile will build from scratch?

Vagrant handles setting up complete virtual machines. As part of that, it will use a provisioning tool of your choice to apply OS level changes and configuration.

It does sound like the solution to the problem you have.
posted by Candleman at 3:43 PM on February 11, 2016


Response by poster: Can you clarify the problem you're trying to solve? For me, Docker/ Vagrant solves a different problem than Chef, Ansible, et al. We use Vagrant to save our developers from having to be dev ops experts as our server setup is fairly complex. They get a nice clean VM so they can start working on code right away and if anything ever goes wrong you can always blow it up and start right over.

Ah yes this is what I'm trying to do. I should have clarified that my needs are generally simple, through production. Lots of moving parts, but not a 100 node cluster, so I can usually have a local environment mimic production.

I will use normal Powershell scripts to setup IIS/SQL/etc. Ideally on a higher environment it'd build everything from scratch (SQL/IIS/etc.) just like everything else, if some change is made it is captured.
posted by geoff. at 4:35 PM on February 11, 2016


It feels like the Chef-route is what you want, define a configuration and you can deploy it locally or in production. Just to confuse things I'm pretty sure you can deploy things that are defined as Docker containers/ Vagrant instances. For example, here's how Ansible and Vagrant work together. And Ansible and Docker.
posted by yerfatma at 8:33 AM on February 12, 2016


« Older Laptop purchase advice: optimizing for hw...   |   Exasperate me, please Newer »
This thread is closed to new comments.