This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (18)
- # beginners (16)
- # boot (13)
- # bristol-clojurians (1)
- # cider (41)
- # clojure (116)
- # clojure-berlin (1)
- # clojure-italy (2)
- # clojure-japan (6)
- # clojure-russia (94)
- # clojurescript (46)
- # clojutre (5)
- # core-matrix (2)
- # cursive (1)
- # datascript (14)
- # datomic (10)
- # devops (73)
- # editors (3)
- # emacs (19)
- # hoplon (382)
- # jobs (1)
- # ldnclj (8)
- # ldnproclodo (4)
- # off-topic (50)
- # onyx (3)
- # reagent (2)
- # yada (19)
I'd like to get an uberjar deployed to an EC2 instance and switched over with minimal/zero downtime. I am hoping to enjoy something that feels as automated as possible and not writing
java -jar uberjar.jar every time--like how capistrano or flightplan works in other languages/environments. I have nginx running in front of the jar and I'm thinking of how to juggle different ports and use proxy_port to get it done but that's also messy.
Naturally it would shut down the old one once the new one is up. And on reboot restart the right jar.
Do I just need to start writing bash scripts or daemon scripts to make that sort of behavior?
@tom - 3 questions (1) How are you deploying now? Do you use any particular tools? (2) How many machines do you have? (3) Do you have a load balancer?
@markmandel: 1) Publish over SSH with jenkins to get the jar sent over, then log in to do the
java -jar command, switch port and restart nginx (or moving thing off the ELB depending on the service I'm deploying). 2) It varies, 6-10. 3) Si
2) Why not just take the machines out of the load balancer, deploy, and then put it back in - no downtime
1) Just use ansible to restart nginx and start/stop the jars? that actually would probably work very well. 2) True, I'm just lazy I guess and spoiled from other dynamic and interpreted languages where you change a file and it's done haha, I guess it won't kill me to just move things around the load balancer each deployment.
the only other thought I had - deploy them out to each machine, but have it run on a different port
but that could go wrong a lot faster than a rolling deploy - you can health check as you go, and if it fails, stop and rollback
It may be worth eventually exploring the docker world - just because this type of thing becomes commoditized
I'll look into it. I used to use vagrant+puppet a long time ago but haven't had much of a chance to look into docker. Dockers runs on top of a Vagrant machine?
From your message >I'd like to get an uberjar deployed to an EC2 instance If you are using AWS using AWS’s services is good
I extremely recommend use AWS services such RDS, Cloudformation, ElastiCache, CodeDeploy and anther instead 3d-party and own solutions
ok, I'll look into those. I've been using some of their other services but not as much with devops sort of things.
I’m periodically do it again and again. For example I’m waiting when AWS implement support CircleCI for CodePipeline
that's awesome, I tried to use lambda but it wasn't available in one of the regions I needed it. One of these days.
I don’t see any benefits from docker for my projects at the moment but in future it’s possible I guess
And docker brings additional questions about managing and orchestration of the containers
But yes it does - but there is so much tooling around docker containers, the ecosystem is just getting better and better
I cannot find any good beginner guides that (dummies level) to get started with it. If I'm on windows, would I start a VM (like with vagrant) and connect docker to that?
I found this docker book really good: http://www.amazon.com/Docker-Book-Containerization-new-virtualization-ebook/dp/B00LRROTI4/
I haven't read it, but http://www.amazon.com/Docker-Up-Running-Karl-Matthias-ebook/dp/B00ZGRS4XM/ came out recently as well