Fork me on GitHub
#devops
<
2017-06-30
>
devn04:06:55

Why isn't there a better story for clojure deployment best practices?

devn04:06:57

Seems like something the community should work on

devn04:06:08

I would be happy to be involved

noisesmith05:06:58

@devn "make an uberjar, make sure the java binary exists on the server" is most of it for me

devn05:06:00

@noisesmith what about jvm options? Do you run an nrepl server? If it's a web service do you use tomcat, jetty, netty? Do you use jmx monitoring? What logging deps? Why?

noisesmith05:06:36

I use the clojure built in socket server, because you can just start it with a command line arg to the vm

devn05:06:30

I guess I just mean to say: there would be value in a review of monitoring, deployment options and techniques

noisesmith05:06:06

the technique is almost always: put an uberjar on a server. The rest of the stuff about tuning and library choices are interesting though, but that is as much about dev as deployment

noisesmith05:06:20

it has to do with what your app is trying to do. Though I welcome new insights about logging and monitoring, I never feel like those are working as well as they should (maybe that is universal?)

devn06:06:15

@noisesmith I don't know that I agree fully. Yes there are decisions to be made w/r/t dev, but for someone who just wants to deploy a webapp there's no reason why there couldn't be a well-documented suggestion. Not every problem is novel.

noisesmith06:06:36

then use luminus

noisesmith06:06:41

it makes most of those choices for you

devn06:06:43

/me checks on Arachne

noisesmith06:06:55

clojure deployment is mostly identical to java deployment, which has a lot of existing expertise and info

noisesmith06:06:12

arachne is pretty unformed still isn't it?

devn06:06:18

Clojure is young. Nothing is set in stone.

noisesmith06:06:29

but it gives you a jar

noisesmith06:06:37

and you run that jar the same way you would any java jar

noisesmith06:06:48

any differences from java are dev time differences, not deployment differences

noisesmith06:06:27

clojure is a java library that supplies a main entry point that compiles bytecode

devn06:06:32

I'm not sure what we're arguing about

noisesmith06:06:54

I'm saying that there's nothing about clojure that requires different strategies for deployment than java would

noisesmith06:06:09

clojure gives you a jar, you use a jvm to run that jar

noisesmith06:06:27

optionally you can integrate clojure with things like containers or process controllers like jsvc

noisesmith06:06:42

but you do that as part of app development, it's not a deployment task

devn06:06:55

Imagine I told you ruby deployment is the same as C.

noisesmith06:06:08

it's not because ruby uses different libraries

noisesmith06:06:12

and has a weird runtime

noisesmith06:06:17

those things are not true of clojure

noisesmith06:06:55

clojure's runtime is a jvm, clojure's deps are bundled in a single jar just as they would be with java

noisesmith06:06:12

clojure literally runs in any container or deployment strategy that runs java, as long as your machine has the resources to handle it - I haven't seen clojure specific deployment issues in my years of using clojure in production, other than some command line flags that you might want to tune differently

devn06:06:45

None of that really matters if people don't feel like there's a simple narrative for deploying basic clojure apps.

noisesmith06:06:13

1) make uberjar 2) do the same thing to the uberjar you would do with java jars

noisesmith06:06:08

I would be interested in seeing more documentation and walk throughs that are targeted to clojure, but I think the reason it doesn't exist is because the story is the same as another one that is very well documented

devn06:06:05

I don't disagree with you, but can we agree the story could be better?

devn06:06:17

Clojure being on the JVM does not automatically mean all JVM customs are observed.

noisesmith06:06:39

but it does mean that they can be without issue

noisesmith06:06:55

or, nearly without- there's the rare corner case

devn06:06:01

I think it's a weak story

devn06:06:11

It can be true, but it's weak

noisesmith06:06:46

I think we'd be better off if people stopped doing things that were clojure specific and stuck to existing jvm stuff actually

devn06:06:13

JVM or Java?

noisesmith06:06:40

I'm not talking about writing java code, I'm talking about using the tooling and ops utilities around the jvm

devn06:06:43

The language changes the underlying values

noisesmith06:06:01

only to make them worse, as far as ops is concerned

devn06:06:23

And yet, declarative descriptions of infrastructure rule the space.

devn06:06:16

I need to rest, but thanks for the conversation