#airship - February 2019

February 2019
i5okie
i5okiealmost 8 years ago
I’m trying to figure out if it’d be possible to implement changing the deployment controller type to CODE_DEPLOY in the modules.
i5okie
i5okiealmost 8 years ago
and so far, so great. But this resource https://www.terraform.io/docs/providers/aws/r/ecs_service.html is missing specification for “Service role for CodeDeploy” which is required when changing deployment type from rolling to blue/green in web gui.
i5okie
i5okiealmost 8 years ago
if it works without i’ll submit a pr
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
hi @i5okie I'm traveling a bit, so I can't check now, looks good so far, but travis failed, maybe you can run a fmt!
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Why did you make a map with rolling and blue_green. It is more straight forward to keep using ECS and CODE_DEPLOY as arguments, just as a simple string variable. This way they have a direct relation to ECS documentation.
i5okie
i5okiealmost 8 years ago
good point. also the minimum and maximum deployment/health values are redundant when its on CODE_DEPOLOY. but it didn’t complain when i left them set. I’ll get rid of the map later today
i5okie
i5okiealmost 8 years ago(edited)
updated PR. travis green
giphy
giphyalmost 8 years ago
i5okie
i5okiealmost 8 years ago
i keep getting this error “module.core.module.container_definition.null_resource.envvars_as_list_of_maps: null_resource.envvars_as_list_of_maps: value of ‘count’ cannot be computed”
i5okie
i5okiealmost 8 years ago
it doesn’t like more than one envvar in this “container_envvars {..”
i5okie
i5okiealmost 8 years ago
i’ve tried without comas, with comas, i dont get it.
i5okie
i5okiealmost 8 years ago
its interpolation.
i5okie
i5okiealmost 8 years ago
yeah found the issue. completely unrelated to any of these modules.
hlarsen
hlarsenover 7 years ago
hi all, i'm about to do some experimenting with the end goal being an ECS cluster backed by an ec2 fleet made up of on-demand and spot instances. would the airship modules be a good fit for that, or should i just go with the base terraform resources?
joshmyers
joshmyersover 7 years ago(edited)
airship has shaved a load of edges so you don’t have to. Not sure if it works with on demand and spot instances OOTB (probably not) but a good bet would be to fork it and use as a base
hlarsen
hlarsenover 7 years ago
i have some time today to finally look at the code, so i'll see if that will work for us - thanks!
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
Thanks @joshmyers for helping out, for everyone else, I'm back from vacay 🙂
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
@i5okie how are you faring now ?
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
To everyone, I'm thinking of removing the current map input we have. I've always used them for aesthetics, but so far this causes also the famous cannot compute count problems. @Jamie Nelson (BitFlight) You were also a big fan of maps, any last verdict ?
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
@hlarsen The Airship ECS Cluster module is purely on-demand for now. I suggest you take a look at something Jamie started : https://github.com/cloudposse/terraform-aws-ecs-spot-fleet/tree/init
i5okie
i5okieover 7 years ago
@Maarten van der Hoef I left terraforming for later. Trying to get myself more familiarized with ECS/forgate with cloud formation for now. going to write up terraform config from scratch after I think.
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
ah ok, why cloud formation ?
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
because TF is for kids and all real men start with CF? 🙂
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
I forgot 🙂
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
reason I don't do AWS certification, is all the CF
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
associate or professional?
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
Neither, I never really looked into it tbh, but for sure there will be CF
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
have you ?
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
yea, I had associate architect, but there was no CF whatsoever 🙂 (just a bunch of multiple choice q’s)
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
ah ok, in that case .. 🙂
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
you should do it
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
yeah, will help freelancing a bit maybe
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago(edited)
professional is much more complicated. Has anyone you know got it?
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
@Maciek Strömich what do you have again ?
Maciek Strömich
Maciek Strömichover 7 years ago
wut? 😉
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
aws certification
Maciek Strömich
Maciek Strömichover 7 years ago
saa, dop and sap
Maciek Strömich
Maciek Strömichover 7 years ago
why?
Maciek Strömich
Maciek Strömichover 7 years ago
and why are you asking on #airship? (-:
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
is that associate or professional ?
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
we can chat everywhere about anything
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
and was there cloudformation involved ?
Maciek Strömich
Maciek Strömichover 7 years ago
sys admin associate, devops professional and solutions architect professional
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
oh wow, you are the man @Maciek Strömich
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
any notes on solutions architect professional?
Maciek Strömich
Maciek Strömichover 7 years ago
@Andriy Knysh (Cloud Posse) thanks but I don’t care about the certs. company that I work for is in APN and requires some number of certs
Maciek Strömich
Maciek Strömichover 7 years ago
@Andriy Knysh (Cloud Posse) new or old one?
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
what’s the diff?
Maciek Strömich
Maciek Strömichover 7 years ago
huge
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
you got old?
Maciek Strömich
Maciek Strömichover 7 years ago
the old one was much simpler
Maciek Strömich
Maciek Strömichover 7 years ago
yeah
Maciek Strömich
Maciek Strömichover 7 years ago
pushed in nov to be able to have the old one
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
ok, i guess i’ll try to get the new one 🙂
Maciek Strömich
Maciek Strömichover 7 years ago
the new one is built on the newer AWS offering
Maciek Strömich
Maciek Strömichover 7 years ago
some code* questions
Maciek Strömich
Maciek Strömichover 7 years ago
autoscaling, containers
Maciek Strömich
Maciek Strömichover 7 years ago
and as always building solutions in a highly available, fault tolerant and with cost in mind manner
Maciek Strömich
Maciek Strömichover 7 years ago
the old one was about ec2, s3, opsworks, storage gateways, some hybrid solutions
Maciek Strömich
Maciek Strömichover 7 years ago
and not that much technical
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago(edited)
you talking about the old and new for the same thing, solution architect professional ?
Maciek Strömich
Maciek Strömichover 7 years ago
just theory of cloud concepts
Maciek Strömich
Maciek Strömichover 7 years ago
the new one on the other hand (at least based on the practice exams in cloud academy) is much more technical in general
Maciek Strömich
Maciek Strömichover 7 years ago
including some “simple” questions about API usage
Maciek Strömich
Maciek Strömichover 7 years ago
it gets more in depth on the technical path
Maciek Strömich
Maciek Strömichover 7 years ago
if your aws-fu is okish then with a little bit of effort certs are easily passable
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
yea, thanks
Maciek Strömich
Maciek Strömichover 7 years ago
@Andriy Knysh (Cloud Posse) yeah basically
Maciek Strömich
Maciek Strömichover 7 years ago
@Andriy Knysh (Cloud Posse) i spent a week of going through the faqs and docs on the topics covered by the cert
Maciek Strömich
Maciek Strömichover 7 years ago
and I’m not as fluent in AWS as @Maarten van der Hoef
Maciek Strömich
Maciek Strömichover 7 years ago
or maybe instead of fluency it’s more about exposure to aws services in a different manner
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
You have no wet dreams on AWS ?
Maciek Strömich
Maciek Strömichover 7 years ago
only if you’re setting up my airship cluster 😉
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
😄
Maciek Strömich
Maciek Strömichover 7 years ago
@Andriy Knysh (Cloud Posse) BTW IIRC since beginning of Feb you can only apply for a updated certificate.
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
anyway, I just got myself a new contract without certification 🙂 so ..
Maciek Strömich
Maciek Strömichover 7 years ago
and since Oct last year you can skip associate exam and pass professional
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
🎉
Maciek Strömich
Maciek Strömichover 7 years ago
@Maarten van der Hoef kawabunga 😉 btw, we should go for beer and kickers after me moving back to Berlin
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
let's do !
tamsky
tamskyover 7 years ago
I was hoping to use a sidekick container in ECS and use airship.
https://github.com/blinkist/terraform-aws-airship-ecs-service/issues/16#issuecomment-423129398 makes me think this can't be done:

[ECS TASK [ Container 1 : load data from s3, unzip to /data, sleep or exit ] <--volumes-from mount [ Container 2 : Application server, reads from /data ]]

and the module has eliminated support for multi-container definitions.
Is this true?
tamsky
tamskyover 7 years ago
Or is there another way I can use airship (which I like), to implement a sidekick pattern?
Maarten van der Hoef
Maarten van der Hoefover 7 years ago(edited)
@tamsky not in the current setup. Would take a lot of effort to move to get this multi-container definition working.
tweetyix
tweetyixover 7 years ago
Slightly off topic, how you you build and manage your images, ideally in a pipeline ?
Maciek Strömich
Maciek Strömichover 7 years ago
@tweetyix depends on the platform. For Elastic Beanstalk we’re treating them as dependency only containers with code being mounted inside the container upon execution. For ECS we’re adding everything inside the container which is version tagged and this version tag is being used upon cloudformation stack deployment.
tweetyix
tweetyixover 7 years ago
Do you have a build pipeline for the images?
Maciek Strömich
Maciek Strömichover 7 years ago
yes
tweetyix
tweetyixover 7 years ago
Using Jenkins or gitlab? What's your setup and how do you test those images?
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
ansgar
ansgarover 7 years ago
Hey there 👋 I just noticed today, that Airship at sometime dropped the support for multiple containers in a single task definition.

I'm quite new to Airship & ECS and am now thinking which way I should go for the service I need to deploy (nginx and php are the two images to run).
I don't want to write everything by hand or just copy most of the code and am looking for a "better way" 🙂
Could anyone of you give me a hint how to solve this whilst still using the airship-ecs-service module?
(Maybe I could update the taskdefinition after the initial creation to contain the two images and find a way for Airship to keep the two images in there on later updates?)

tl;dr How to airship with two containers in a single taskdefinition?
tweetyix
tweetyixover 7 years ago(edited)
Awesome project. I'd like to use NLB Setup. Is my understanding correct that this is a two phase deployment currently?
If LB is included from beginning I keep getting LB errors.
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
Correct, for this to work I need to sit down a bit to remove the maps as input and replace them with normal string vars.
tweetyix
tweetyixover 7 years ago
Is there any other workaround to get into a single step deployment or would you find some time soon? I might also crawl through the TF code.
Jamie Nelson (BitFlight)
Jamie Nelson (BitFlight)over 7 years ago
@Maarten van der Hoef i'll take a look at this
Jamie Nelson (BitFlight)
Jamie Nelson (BitFlight)over 7 years ago
I put in a PR for the ecr-cluster repo a few days ago that gave it a few more features