This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-25
Channels
- # 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
1) Sounds like a great job for ansible
2) Why not just take the machines out of the load balancer, deploy, and then put it back in - no downtime
If you have that many machines
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.
It just feels like a more complicated problem otherwise
and you could use ansible to do the rolling deploy
the only other thought I had - deploy them out to each machine, but have it run on a different port
then configure the load balancer to switch to the new port in one go
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
and still no downtime
either that - or run on a service that manages all this stuff for you 😉
Heh no worries
It may be worth eventually exploring the docker world - just because this type of thing becomes commoditized
I recommend to take a look on CodeDeploy
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?
@lowl4tency: just google CodeDeploy?
I deploy my jars from CircleCI via CodeDeploy
tom: AWS CodeDeploy
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
tom: it works good in bundle with ELB, EC2 and AutoScaling.
CircleCI has integration with CodeDeploy as well
Yeah sorry - I don't know AWS' services that well
I have been working with AWS services about 3 month
Really best service
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.
tom: I highly recommend take a look on describing of all services by AWS
I’m periodically do it again and again. For example I’m waiting when AWS implement support CircleCI for CodePipeline
At the moment it supports only Jenkins as build provider 😞
It’s true
Lambda is awesome service as well
Unfortunately I have not a case for this yet
Lambda is able to run clojure code
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.
tom: yes, aws usually starts a service for one region
Virginia or Oregon are first as rule
Also, I use boto3 (A python3 library) by AWS
Pretty good as well
tom: feel free to ask questions about AWS
tom: actually I use simple ec2 servers
tom: and if you use docker I can recommend to take a look on ECS
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
kuberntes 😉
But yes it does - but there is so much tooling around docker containers, the ecosystem is just getting better and better
but if it doesn't suit your needs yet - makes sense too
I'm waaaay down the docker hole these days 😉 so take it all with a grain of salt
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?
boot2docker will be your friend
but I'm not a windows user (Linux all the way down)
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
@markmandel: thanks!
markmandel: agreed
I have to be honest, I don't know many Windows developers anymore. Unfortunately, I think you often get the short end of the stick