I've been using ECS with Fargate and EC2 backed clusters (in the past, rolling updates with Ansible). Docker images I've been building with Jib via pack.alpha https://github.com/juxt/pack.alpha#docker-image
I did some testing with deployment policies. Two things I’ve learned
First, RollingWithAdditionalBatch reduces the deploy time from 26 min to 6 min
Second, I think I’ve been over-automating things. It makes sense to also have a manual mode. Whereas in auto mode, every merge to master causes a deployment, in manual developers use the EB web console directly
Even with batch size = 1?
No, with BatchSize=100%. I’m not seeing disadvantages of swapping out everything at once
Oh right. We don’t do that. We have scripts to do deploys, combined with aws-vault for credentials.
What I’d like to do is prepare the deploy artifacts on every commit, upload them to S3 or as a new version in beanstalk, then choose to deploy one manually.
Yeah creating a new version is fast , using aws elasticbeanstalk create-application-Version
Isn’t that effectively the same as immutable?
Oh, I am using the eb
tool which doesn’t have such an option. I’ll have a look at the AWS cli.
It’s a good point: CI can always prepare the deploy artifact, then you can choose to auto-update the environment, or not
Yeah I discovered that i don’t need the eb cli tool at all
Are you pushing a zip file that you build yourself? With jars and resources and procfile and .ebextensions etc?
Or does the AWS cli do that as well?
I create a zip file containing the jar and .ebextensions and upload it to s3. The API call accepts an S3 bucket/key
Better to decomplect the process as much as possible
You'd think that but in fact immutable is always much slower. Aws support has confirmed this
It’s also good to decomplect configuration changes (e.g. auto scaling group size) on the one hand and code changes on the other as much as possible
Ah that’s fantastic. I opened an issue with the EB tool some time ago asking just for this — but got no meaningful response.
Have you tried using the API directly? I think scripting with Clojure is might be faster than using a CLI 🙂
Haven't tried it but should be fairly easy. I'm going go with bash/awscli