Fork me on GitHub
#aws
<
2020-09-12
>
viesti09:09:47

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

pesterhazy12:09:32

I did some testing with deployment policies. Two things I’ve learned

pesterhazy12:09:37

First, RollingWithAdditionalBatch reduces the deploy time from 26 min to 6 min

orestis13:09:24

Even with batch size = 1?

pesterhazy13:09:22

No, with BatchSize=100%. I’m not seeing disadvantages of swapping out everything at once

orestis13:09:03

Isn’t that effectively the same as immutable?

pesterhazy13:09:14

You'd think that but in fact immutable is always much slower. Aws support has confirmed this

pesterhazy12:09:12

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

orestis13:09:25

Oh right. We don’t do that. We have scripts to do deploys, combined with aws-vault for credentials.

orestis13:09:15

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.

pesterhazy13:09:00

Yeah creating a new version is fast , using aws elasticbeanstalk create-application-Version

orestis13:09:13

Oh, I am using the eb tool which doesn’t have such an option. I’ll have a look at the AWS cli.

pesterhazy13:09:16

It’s a good point: CI can always prepare the deploy artifact, then you can choose to auto-update the environment, or not

pesterhazy13:09:43

Yeah I discovered that i don’t need the eb cli tool at all

orestis13:09:46

Are you pushing a zip file that you build yourself? With jars and resources and procfile and .ebextensions etc?

orestis13:09:57

Or does the AWS cli do that as well?

pesterhazy13:09:59

I create a zip file containing the jar and .ebextensions and upload it to s3. The API call accepts an S3 bucket/key

pesterhazy13:09:28

Better to decomplect the process as much as possible

orestis14:09:58

Ah that’s fantastic. I opened an issue with the EB tool some time ago asking just for this — but got no meaningful response.

orestis14:09:54

Have you tried using the API directly? I think scripting with Clojure is might be faster than using a CLI 🙂

pesterhazy15:09:35

Haven't tried it but should be fairly easy. I'm going go with bash/awscli

pesterhazy13:09:17

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