3 ms·
At the job I'm at, I've picked up three tools either for the first time, or in a very new way: 1. Makefiles. See @aequitas' comment for more. 2. Terraform. Se
by RangerScience 7y ago
At the job I'm at, I've picked up three tools either for the first time, or in a very new way:
1. Makefiles. See @aequitas' comment for more.
2. Terraform. Seriously, just using this tool taught me [a lot of] devops. It's fantastic!
3. Docker (as a tool!)
I'm going to go into the third one a bit - I feel like Docker is mostly thought of as useful for deploying things to the 'net (kubernetes, ECS, etc), but I think it's also amazing for local development and build pipelines. I actually have no idea one way or the other how much other people use it this way as well, so maybe it's just me that's finding it unexpectedly awesome for this.
Put together the right CLI command + Dockerfile, and you can hand someone a repo and they can launch a complete, reliable development environment in a single command without any other system prep. No more worrying about which dependencies need to be installed in what way; it's like `rvm` + `bundle exec` but for EVERYTHING. No more dealing with whatever custom system modifications someone has going on. `git clone`, `make dev` move on with life.
And then you can also have Dockerfiles that are specifically for producing your build artifacts, and then completely ignore the container for execution. This is how I'm using both AWS EMR and Lambda.
- akx 7y agoI'm also occasionally using Docker t generate build artifacts (so +1 for that) - how do you pull the built blob out of the image? I've used `docker exec` plus `docker cp`, but it feels a little clunky.
- victornomad 7y agoYou can just mount a volume and write the blob into it, very easy and convinient!
- akx 7y agoOoh, right, you can mount in `docker build`? That'd solve it, thanks!
- RangerScience 7y agoOh hmm, no you can't: https://vsupalov.com/cache-docker-build-dependencies-without-volume-mounting/ https://vsupalov.com/cache-docker-build-dependencies-without...
- victornomad 7y agoYou mount it when you run it using -v hostfolder:containerfolder I recommend you though to use Docker-compose, somehow everything becomes much saner than using the normal "docker" executable
- RangerScience 7y agoDepends on the nature of the build artefacts? Gems, jars and NPM packages get posted to a jFrog artefactory. Go and Cocoapods just use straight Git, so Jenkins actually makes commits for those (and in the case of Go, version tags) from inside the Docker container. For the EMR clusters, there's a step in the build script that uploads the files to S3. Another way to do it would be to have the `docker run` / `docker build` script be given a mounted volume that maps to the system's, and then it would write the blobs to that volume, where (I think?) they'd then be accessible to the outer system.