This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-26
Channels
- # aws (1)
- # beginners (15)
- # boot (30)
- # cider (13)
- # cljsrn (16)
- # clojure (458)
- # clojure-dev (15)
- # clojure-france (131)
- # clojure-greece (124)
- # clojure-korea (2)
- # clojure-spec (42)
- # clojure-uk (115)
- # clojure-ukraine (1)
- # clojurescript (103)
- # component (18)
- # cryogen (1)
- # datomic (4)
- # dirac (3)
- # figwheel (1)
- # funcool (13)
- # hoplon (60)
- # luminus (2)
- # off-topic (2)
- # om (28)
- # onyx (45)
- # parinfer (28)
- # pedestal (1)
- # proton (23)
- # re-frame (18)
- # reagent (36)
- # ring (1)
- # ring-swagger (5)
- # untangled (13)
- # vim (9)
I am specifically looking for a nice light-weight base that I can drop an (uber)jar on 😉
I'll be interested to hear what people recommend for this... it's something we're starting to look into... we're already using Docker for a bunch of stuff and that's on out "todo list" 🙂
@seancorfield - Glad it’s not just me that is hoping that someone else has already figured this out 🙂 We use Alpine bases for our Python microservices, but there are handy Python3-alpine base images that mean I don’t have to navigate package management for Alpine to get those working. I am hoping that someone somewhere has a solid, but slim, container base for Clj...
If you have an uberjar, you only need Java in the container (and your JAR file).
If you want to run a Clojure program from source, there's a Boot / Clojure Docker image from Adzerk (I think). Assuming you use Boot 🙂
Morning
More for running Clojure from source but I guess you guy's must have looked at this? https://hub.docker.com/_/clojure/
At my current client they're deploying Docker images from openjdk:8-alpine
image and the firing up uberjars using a shell script but all that's doing is java -jar
in most cases. Using Kubernetes for deployment, scaling, etc.
I’m just using the java image and an uberjar built with a CI script - but long term I’d rather drop the compilation, as it creates an extra difference between dev and prod.
peterwestmacott: So you're planning to run lein
or boot
in production or bootstrap some other way?
I think so. I guess in theory I could just java -jar with the clojure jar and point it at my source code, but lein
would probably make that easier
I’ve not looked at boot yet
my understanding was that it is mostly better for complex clojurescript builds - which I don’t yet have.
also: I told a small lie - I had forgotten that I'm actually using a clojure/lein docker image, not a plain java one
the one you linked in fact, agile_geek
peterwestmacott: so not concerned about any performance penalty then?
should I be?
I generally give no thought at all to performance when I work (besides not writing obviously stupid code).
Not necessarily, it depends on your app. You can always start off as you are and move to an uberjar later but I personnaly don't like the idea of my production images pulling down dependencies into m2 directory and running under tooling designed more for development. I would be quite comfortable with an uberjar...but I've lived in the Java world for 19 years so WARs, EARs and JARs are bread and butter 😉
I would have guessed that once the bytecode is loaded it makes no difference how it got there. But I could be wrong.
certainly startup time might be affected
but for a server I don’t consider that an issue
Start up time would definitely be effected and this slows your ability to scale fast but it depends what your requirements are. I guess my take would be the benefit of running exactly the same tooling in dev and all other env's is not worth it. I tend to only use lein
in local dev and all other env's use the uberjar so I've hammered it in a couple of env's before prod anyway. Nothing stops me running the uberjar in dev if I want to and if I wanted to poke at the code I could host a REPL on a socket and only activate it in dev env's.
@maleghast here's my dockerfile https://www.refheap.com/293467ebae06fee93beb200e5 which meets pretty much exactly your requirement 🙂
Cheer @mccraigmccraig and everyone else that chipped in - all interesting ideas / thoughts; sadly I’ve only just got back to this channel after being “distracted” by work 😞
here's my other dockerfile @maleghast from my onyx project , which is a bit more modern - https://www.refheap.com/972b2163b5ad5de61e8d8f24d
though it's got some onyx-specific bits in there which you would probably want to drop
in particular it's using S6 for managing the aeron media driver as a separate process from the application process, within the same container
Cheers again @mccraigmccraig
I may create some crazy hybrid that uses the alpine base from the Onyx file but is simpler in the “what’s going on” department like the Ubunutu 14.04 Dockerfile you posted / pasted first 🙂
that wouldn't be crazy @maleghast - i should update the first dockerfile to use the alpine base
@mccraigmccraig - I was employing exaggeration as a device… Oh hold on, you’ve figured that out already, haven’t you? 😉
@maleghast just checking
maleghast we do this https://github.com/MastodonC/kixi.heimdall/blob/master/Dockerfile
martinklepsch & jr0cket we could do the same as Berlin. We could just take out the circle bit and it could be the shard. 😉
Thanks @otfrom - Good to have lots of options / ideas 🙂 Is there a particular reason y’all went with the phusion base..?
@elise_huard - tell me the tale of phusion, please? 😉
btw, I think using openjdk8 in a docker image might be a violation of the Java license (something around trademark/releases/compatibility) so azure jvm might be the way to go
http://blog.takipi.com/running-java-on-docker-youre-breaking-the-law/#comment-2562735570
@otfrom reading this http://blog.takipi.com/running-java-on-docker-youre-breaking-the-law/ it would seem to me that you are fine to run oracle java on docker if you install in your Dockerfile
Right, so if I start with Alpine base and add Oracle Java to it myself I am golden, but if I start with an alpine+Oracle Java 8 base image I am in trouble..?
@minimal unbalanced parens !
@maleghast @otfrom: to be fair the phusion base came from my colleague Antony - but it makes sense to use a minimal ubuntu
we'll have to ask him how he came upon it @acron ?
Ah so i'd seen it used by a couple of other folks and the Onyx people had it in their sstarter template
@mccraigmccraig @otfrom looks like OpenJDK is OK in Docker thou (according to that article)
my reading was oracle jdk is fine in docker too as long as you are not re-distributing your images @agile_geek
but my parens always match b/c I use the proper paredit commands to navigate and kill C-M-k
@mccraigmccraig so I assume that means distributing for public consumption rather than distributing at runtime for your own use?
that was my assumption @agile_geek and would seem reasonable, but who knows, this is oracle, maybe backing up your system is verboten too ?
I am going to be just fine with the alpine openjdk “official” base image, I reckon 🙂
@otfrom i think you sent me a terraboot related link a couple of weeks ago - dyu have it again ? i appear to have misplaced it
mccraigmccraig https://github.com/mastodonc/terraboot
I'm going to blog about my Ruby one soon :-)
ah, cool - i think you sent me a link to a PR, but it's all merged now @otfrom
i'll kick it's tyres then
Or you could just use Heroku... https://devcenter.heroku.com/articles/getting-started-with-clojure - git push heroku master
then get back to coding...
@martinklepsch do you have an .svg version of the Clojure Berlin logo? And if so, would we have permission to create a modified version of your image. Thank you
@otfrom I didnt suggest you pay for Heroku... unless you like coding over devops 🙂
jr0cket depends on what you are doing. heroku is good for a goodly number of usecases and thankfully has a zero carbon EU location now (IIUC that they run in Dublin)
Good to know about the zero carbon footprint, thanks.
I've added more content to the [ClojureBridge curriculum using Klipse](http://jr0cket.co.uk/community-docs/docs/curriculum/). I like [Klipse](https://github.com/viebel/klipse), it works very well and its a very usable alternative to setting up Clojure environments for ClojureBridge. I like Klipse so much, I even created Klipse snippets in Spacemacs 🙂
@jr0cket i looked at heroku a while back, and the only cassandra addon was remarkably expensive, and as soon as you want multi-datacenter support you are on your own anyway
@mccraigmccraig I've never seen any figures on how much that would cost for cassandra if you would do it yourself, so couldn’t comment if it was expensive. Was it https://elements.heroku.com/addons/instaclustr you looked at?
Thanks for the logo @martinklepsch I will see what my modest artistic skills can make of it...
yep @jr0cket that's the one - https://elements.heroku.com/addons/instaclustr#pricing
these days i'm using DataStax Enterprise with multi-datacenter and spark, and i don't know that that's available as a service anywhere
@jr0cket if you end up making a rough thing and you're not happy with it's polish I'm happy to try to improve it