#airship - November 2018

November 2018
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
@Maarten van der Hoef has joined the channel
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
set the channel description: Home of Airship ECS Modules ( https://github.com/blinkist/terraform-aws-airship-ecs-service )
erik
erikalmost 8 years ago
@Erik Osterman (Cloud Posse) has joined the channel
Jamie Nelson (BitFlight)
Jamie Nelson (BitFlight)almost 8 years ago
@Jamie Nelson (BitFlight) has joined the channel
jonboulle
jonboullealmost 8 years ago
@jonboulle has joined the channel
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
@Andriy Knysh (Cloud Posse) has joined the channel
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago(edited)
Hi Everyone, welcome to the channel, thanks @Erik Osterman (Cloud Posse) ! Happy to help out Airship module users and to also discuss upcoming changes to the module here.
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago(edited)
And happy to announce that the latest ECS Service 0.8.0 supports Cognito authentication, http to https redirection. and it can deal with ever changing task definitions by any external pipeline and still allows Terraform to modify the Environment Variables and/or cpu and mem.
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
@Nikola Velkovski has joined the channel
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
That’s really cool! Like the cognito integration. Should make it easier to expose staging apps
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Exactly and drop nginx services with the sole purpose of providing a simple htaccess
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Need some ideas here:

https://github.com/blinkist/terraform-aws-airship-ecs-service/blob/966757509ca42a0b4d3af541d7b5f864e8ff8ac4/modules/live_task_lookup/output.tf#L33

So I've added a lambda for live task lookup to overcome the bootstrapping issue. But it seems that a lambda_invocation datasource works differently from a regular datasource.

We create a Taskdefinition with an image coming from the live_lookup module, when using a normal datasource, it will figure out that when the taskdefinition is the same as the current one and will not create a new one.
But when using the lambda invocation as datasource for getting the current image, the plan already describes it will create a new task_definition no matter what. UGH!
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
pfew, found the problem
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
I had a depends_on in the datasource to the lambda_function..
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
depends_on in datasources always force recreation..
jonboulle
jonboullealmost 8 years ago(edited)
so it all works now?
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
yeah 😄
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Do you think you can get Anatoli to take a look at the nodejs, if not I'll have to find someone else
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
also, currently i'm creating the iam resources for the lambda in modules/iam, shall we leave it there or move it to the live_task_lookup
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Maybe you can take another look at the logic itself in js
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
PR is out Jon, sorry that you need to go through Javascript code .. I've asked in the node subreddit and one guy with unknown seniority said the code was fine 😎.
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Fellas! I'm adding Scheduled jobs to the module, callable with simple list block of multiple jobs. Cloudwatch event triggers an event which hits a lambda, lambda figures out what the current task definition of the service is and will run the command on there. Let me know if you have ideas or concerns.

I think I leave out the container env vars override as it's too much hassle now, same with placement constraints, as they can be added later.

I'm currently creating a different iam role for this lambda, but I'm opting for using one role defined in the iam module instead.




    ecs_scheduled_tasks = [{
      job_name                           = "vacuum"
      schedule_expression        = "cron(0 12 * * ? *)"
      command                           = "python vacuum_db.py"
      container_envvars_override = "A=B;VAR2=C"
    }]


Work in progress : https://github.com/blinkist/terraform-aws-airship-ecs-service/blob/ecs_scheduled_tasks/modules/ecs_scheduled_tasks/main.tf
rss
rssalmost 8 years ago
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
hehe thanks @Erik Osterman (Cloud Posse) 🙂
jonboulle
jonboullealmost 8 years ago
funky
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
so every time someone clicks on the word variables.tf on slack 🙂
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago(edited)
If I drop the redirect I can probably just banner it annoyingly
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Hahjaha
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Good one Martin
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
airship.tf
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
need to find out what slack gets and what not
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Are you going to build a Jekyll site?
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
what's that ?
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
"Transform your plain text into static websites and blogs. "
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
variables.tf is probably a good site for a blog
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
But for airship, a nice project site would be nice with some samples
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
It’s the predominant way static sites for projects in GitHub are generated
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Hundreds of templates out there
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Do you have a favourite example of a project ?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
It’s on my list of things to research. Plan to use our readme spec to generate static sites for all of our modules.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
nice, i'll have a look.. First have to find a way to get the README.md a bit more attractive in general
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
funnily enough readme.md does not trick slack
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Is there a .md TLD?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Looks like there is!
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
yea, that one is nice
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
@jonboulle we now have merge commit set by default, shall we make it squash & merge ?
jonboulle
jonboullealmost 8 years ago
no strong opinion... I like merge commits for auditability and reverts but that only works with extremely strict commit diligence anyway 🙃
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
still no gif support here
rss
rssalmost 8 years ago
0.8.2: Adding lambda_ecs_task_scheduler (#25)
Init commit scheduled tasks


wip


ecs_scheduled_tasks update


small fixes



ecs_task_scheduler



ecs_scheduled_tasks clean up


Readme updates


fmt


Fix after PR Review
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
yeah this can be better
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
After going through tons of jekyll examples, I think https://vuepress.vuejs.org which is what is powering https://www.runatlantis.io looks to be the least time intensive with the most powerful layout there.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
if considering just static site generation, did you consider Hugo?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
main reason to use Jekyll is it's supported by GitHub without any CI/CD systems
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
(30K stars - very popular)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
yeah but CICD is really the least of our problems, so it's not a decision maker. I was looking for a simple DOC Layout, with a side bar etc. and this looks I don't need to spend much time on it which is exactly what I want : https://github.com/runatlantis/atlantis/tree/master/runatlantis.io
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
@jonboulle @Jamie Nelson (BitFlight) replied to your pr comments, if you have time to take a look ❤️.
Jamie Nelson (BitFlight)
Jamie Nelson (BitFlight)almost 8 years ago
Hi, thanks. Ill look later today.
jonboulle
jonboullealmost 8 years ago
requires awsvpc 😱
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
think we built that in 🙂 if there now only would be instances with a bit more eni capability ..
davidvasandani
davidvasandanialmost 8 years ago
@davidvasandani has joined the channel
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Hi @davidvasandani !
geertn
geertnalmost 8 years ago
@geertn has joined the channel
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
@Jamie Nelson (BitFlight) Do you have that initial setup of the service registry again for me, slack history doesn't show it anymore.
Also in your original PR there are some things volume related which I will cover after service discovery.
rss
rssalmost 8 years ago
0.8.3: NLB Services (#26)
Network Load Balancing Support added for the ECS Module. The parameter load_balancing_type can be set to either "none", "network" or "application" and takes care of attaching the related LB type.
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
@Jamie Nelson (BitFlight) and another question, for a service to connect to other services in the service registry, it does not need to be registered to the registry itself, correct ?
Jamie Nelson (BitFlight)
Jamie Nelson (BitFlight)almost 8 years ago
correct
erik
erikalmost 8 years ago
set the channel topic: :airship:
No earlier messagesBrowse by dateDecember 2018