devops

devn 2017-06-30T04:03:55.767199Z

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

devn 2017-06-30T04:04:57.773790Z

Seems like something the community should work on

devn 2017-06-30T04:05:08.774959Z

I would be happy to be involved

2017-06-30T05:19:58.237784Z

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

devn 2017-06-30T05:53:00.457660Z

@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?

2017-06-30T05:53:36.461804Z

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

devn 2017-06-30T05:54:30.468039Z

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

2017-06-30T05:55:06.472281Z

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

2017-06-30T05:56:20.481491Z

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?)

devn 2017-06-30T06:00:15.511268Z

@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.

2017-06-30T06:00:36.514441Z

then use luminus

2017-06-30T06:00:41.515213Z

it makes most of those choices for you

devn 2017-06-30T06:01:43.523776Z

/me checks on Arachne

2017-06-30T06:01:55.525239Z

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

2017-06-30T06:02:12.527450Z

arachne is pretty unformed still isn't it?

devn 2017-06-30T06:03:18.535961Z

Clojure is young. Nothing is set in stone.

2017-06-30T06:03:29.537391Z

but it gives you a jar

2017-06-30T06:03:37.538441Z

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

2017-06-30T06:03:48.539843Z

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

2017-06-30T06:04:27.544898Z

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

devn 2017-06-30T06:04:32.545478Z

I'm not sure what we're arguing about

2017-06-30T06:04:54.548452Z

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

2017-06-30T06:05:09.550295Z

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

2017-06-30T06:05:27.552656Z

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

2017-06-30T06:05:42.554553Z

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

devn 2017-06-30T06:05:55.556403Z

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

2017-06-30T06:06:08.558188Z

it's not because ruby uses different libraries

2017-06-30T06:06:12.558835Z

and has a weird runtime

2017-06-30T06:06:17.559507Z

those things are not true of clojure

2017-06-30T06:06:55.564519Z

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

2017-06-30T06:08:12.574157Z

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

devn 2017-06-30T06:09:45.585862Z

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

2017-06-30T06:10:13.589372Z

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

2017-06-30T06:11:08.596221Z

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

devn 2017-06-30T06:12:05.603189Z

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

devn 2017-06-30T06:13:17.612297Z

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

2017-06-30T06:13:39.615210Z

but it does mean that they can be without issue

2017-06-30T06:13:55.617127Z

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

devn 2017-06-30T06:14:01.617786Z

I think it's a weak story

devn 2017-06-30T06:14:11.618886Z

It can be true, but it's weak

2017-06-30T06:14:46.623387Z

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

devn 2017-06-30T06:15:13.626896Z

JVM or Java?

2017-06-30T06:15:40.630436Z

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

devn 2017-06-30T06:15:43.630826Z

The language changes the underlying values

2017-06-30T06:16:01.633286Z

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

devn 2017-06-30T06:17:23.644Z

And yet, declarative descriptions of infrastructure rule the space.

devn 2017-06-30T06:19:16.658124Z

I need to rest, but thanks for the conversation

devn 2017-06-30T06:19:20.658610Z

Cheers

2017-06-30T06:19:23.659018Z

cheers