Closed LeDominik closed 8 years ago
So with a recent change to go-getter the package we use to download artifacts, you can package up all the files you need in an archive and nomad will unzip it for you inside your task directory.
See here for the supported archives: https://github.com/hashicorp/go-getter/blob/master/README.md
Thanks, @dadgar -- this is a very nice feature, also clarifies a lot what I can use as source (because for testing locally I just started with file
and it worked :+1:). I see this was introduced at version 0.1.2 so I will test it on the afternoon!
Hmmm, I couldn't figure it out. With the java
task-driver I can only start a jar, so I switched over to raw_exec but it would still just copy the zip to the target directory and nothing more. So, with Nomad v0.2.3 I currently can't figure it out on OS X. But it seems that with this go-getter the pieces should be there just some additional parametrization needed.
To play with this you will need to build from head as the change is new. The Java driver will need to be updated as well since it assumes downloading just a jar
This is fixed as of 0.3.1. See artifact
block
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Nomad's task-drivers to deploy non-containerized stuff are a great option IMHO. Specifically being in a very Java-centric environment containers are overkill for a majority of my tasks which are Dropwizard / Spring Boot / you name it jar-only deployments. Containers are our go-to option for software that doesn't have a natural single-file output like node-based apps.
However I'm somehow missing a key feature: I need a few additional files deployed with the jar, basically shipped to the working-directory of the java-process. E.g. in Dropwizard you always have a
yml
-config file, of which we selectively overwrite parameters via the args (= like set a different HTTPS port). Other common use-cases are certificates and the infamous log-configuration in some frameworks. Some of these files can even be hot-reloaded!Solutions I can imagine range from listing the single-files (where we a hot-reloadability feature could be done via checksums/versions) or going with something like archive-unpacking (which would by nice to
exec
a small suite of scripts). However I'd be happy to list out the files, maybe it has an educative aspect :smile:Does this make sense? Maybe I just missed something in the docs & issues...