aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
viesti 2020-09-12T09:18:47.078300Z

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

pesterhazy 2020-09-12T12:46:32.083200Z

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

pesterhazy 2020-09-12T12:47:37.084800Z

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

pesterhazy 2020-09-12T12:50:12.088Z

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

orestis 2020-09-12T13:18:24.088400Z

Even with batch size = 1?

pesterhazy 2020-09-12T13:20:22.091Z

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

orestis 2020-09-12T13:20:25.091300Z

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

orestis 2020-09-12T13:21:15.092900Z

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.

pesterhazy 2020-09-12T13:23:00.095Z

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

orestis 2020-09-12T13:23:03.095300Z

Isn’t that effectively the same as immutable?

orestis 2020-09-12T13:24:13.098200Z

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

pesterhazy 2020-09-12T13:24:16.098500Z

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

pesterhazy 2020-09-12T13:24:43.099300Z

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

orestis 2020-09-12T13:25:46.100600Z

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

orestis 2020-09-12T13:25:57.101100Z

Or does the AWS cli do that as well?

pesterhazy 2020-09-12T13:43:59.103600Z

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

pesterhazy 2020-09-12T13:44:28.104400Z

Better to decomplect the process as much as possible

pesterhazy 2020-09-12T13:45:14.105600Z

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

pesterhazy 2020-09-12T13:47:17.107900Z

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

orestis 2020-09-12T14:40:58.108Z

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

orestis 2020-09-12T14:51:54.108200Z

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

pesterhazy 2020-09-12T15:23:35.108400Z

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