#geodesic - May 2019

Kyle
Kyleover 7 years ago(edited)
hi everyone, I have a question. Do aws-chamber and vault overlap ?
Kyle
Kyleover 7 years ago
aws-vault for securely storing and accessing AWS credentials in an encrypted vault for the purpose of assuming IAM roles
Kyle
Kyleover 7 years ago
chamber for managing secrets with AWS SSM+KMS and exposing them as environment variables
Kyle
Kyleover 7 years ago
seems they're for managing aws secrets 🤔
loren
lorenover 7 years ago
i think chamber is more general purpose
loren
lorenover 7 years ago
aws-vault is specifically for retrieving an aws credential and assuming an IAM role
Josh Larsen
Josh Larsenover 7 years ago
no office hours this week?
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago(edited)
ooops
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
i totally lost track of time
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
sorry everyone!
S
SweetOps #geodesicover 7 years ago
There are no events this week
C
Cloud Posseover 7 years ago
Join us for "Office Hours" every Wednesday 11:30AM (PST, GMT-7).

This is an opportunity to ask us questions about INLINECODE_0, get live demos and learn from others using it. Next one is Mar 20, 2019 11:30AM.

👉️ Add it to your calendar

:zoom: https://zoom.us/j/684901853

:slack: #office-hours (our channel)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
geodesic 0.106.0 adds support for man pages in markdown
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
stick all your documentation in /usr/share/docs and run docs update
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
then using man works as expected
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
try man faq to test
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
or help to search
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
@oscarsullivan_old ☝️
Josh Larsen
Josh Larsenover 7 years ago
anyone using packer at all? i'm curious why packer isn't in the geodesic image.
Josh Larsen
Josh Larsenover 7 years ago
nm, i think i see a solution in the slack archives... thanks @oscarsullivan_old for asking this before me. will do RUN apk add --update packer@cloudposse in Dockerfile
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Ya just trying to reduce the number binaries. Tempted to remove more from the default distribution in the future, since we have packages for most things.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
yes, exactly!
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
it's for custom man pages
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
but we are just piggy backing on the existing linux manpage system by installing the generated man pages to /usr/share/man
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
that means it will wrk with system man pages too
S
SweetOps #geodesicover 7 years ago
There are no events this week
C
Cloud Posseover 7 years ago
Join us for "Office Hours" every Wednesday 11:30AM (PST, GMT-7).

This is an opportunity to ask us questions about INLINECODE_0, get live demos and learn from others using it. Next one is Mar 20, 2019 11:30AM.

👉️ Add it to your calendar

:zoom: https://zoom.us/j/684901853

:slack: #office-hours (our channel)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
office hours starting now https://zoom.us/j/684901853
rohit
rohitover 7 years ago
I tried using s3fs but couldn’t mount sub directories. I saw that you are using it as part of geodesic so posting my question here
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Share what you we’re doing ...
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Not enough to go on
rohit
rohitover 7 years ago
i am just trying to mount S3 bucket using
s3fs bucketname directoryname
rohit
rohitover 7 years ago
when i cd to the directory i don’t see anything
rohit
rohitover 7 years ago
it is trying to fetch all the subdirectories when i run ls command
Alex Siegman
Alex Siegmanover 7 years ago(edited)
s3 is an object store, not a file system. this idea of s3fs confuses me. I've never even thought to use s3 in that way. Though I guess a filesystem is just a specialized object store?
rohit
rohitover 7 years ago
i know but that’s what s3fs does
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
@Alex Siegman using goofys is a nice escape-hatch for using S3 as a filesystem
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
not for databases, but great for "legacy" apps that want to read files
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
in the past, we've used it to store SSH keys and other configuration files.
jla
jlaover 7 years ago(edited)
Could someone help me locate or add aws creds to a built geodesic container? I’m having some issues understanding where geodesic looks for this info, and in what format to provide it. I have no roles yet, and id like to add one for aws so i may assume it.
sarkis
sarkisover 7 years ago
Hi Jesse - been a little bit since I had the pleasure to use geodesic, but I think I have a good idea where you are stuck... have you followed along with the documentation here?
https://docs.cloudposse.com/documentation/getting-started/

The reference architecture should give you a good idea on where/how the roles to be assumed are meant to be used: https://github.com/cloudposse/terraform-root-modules
S
SweetOps #geodesicover 7 years ago
There are no events this week
C
Cloud Posseover 7 years ago
Join us for "Office Hours" every Wednesday 11:30AM (PST, GMT-7).

This is an opportunity to ask us questions about INLINECODE_0, get live demos and learn from others using it. Next one is Mar 20, 2019 11:30AM.

👉️ Add it to your calendar

:zoom: https://zoom.us/j/684901853

:slack: #office-hours (our channel)
jober
joberover 7 years ago
Has anyone run across this error when running make root from the reference architectures?
jober
joberover 7 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
@jober not that one in particular
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
but I can maybe help you work through it if you want to zoom
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
jober
joberover 7 years ago
👍️
jober
joberover 7 years ago
Trying to run it on an active account not sure if it is conflicting with something
jober
joberover 7 years ago
I ran on personal account and everything was ok
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
My hunch is this: see that error in the output about copying overrides? I think maybe that's preventing it from completing.
jober
joberover 7 years ago
i was looking at that as well
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
so I makefile will abort on the first failure
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
so i think the module is just not getting initialized and that's maybe causing nothing to be written to SSM
jober
joberover 7 years ago
Like it says their is no overrides
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago(edited)
are you familiar with what we are doing here with overrides?
jober
joberover 7 years ago
No
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
(maybe not this exactly spot, but the pattern itself)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
ok
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
so basically we use the terraform init -from-module=.... pattern everywhere.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
That works great, except for the init will bail if there are any .tf files in the current directory
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
so what we do is stick all those "overrides" (.tf files) in the overrides/ directory
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
then...
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
1. terraform init -from-module=....
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
2. cp overrides/* .
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
3 terraform init -from-module= (null modules so that it it doesn't try to redwnload)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
why do we need overrides?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
...that's so we can have a general root module like a "users" module, but not define any users
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
then we stick the user accounts in overrides/ e.g. overrides/osterman.tf
jober
joberover 7 years ago
ahh ok
jober
joberover 7 years ago
is it required to have overrides?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
i don't think it should be required (fundamentally speaking), but that error is complaining about that.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
@Jeremy G do you recall seeing this error when you recently provisioned "that customer" 😃
jober
joberover 7 years ago
Is this something new? I copied the reference architectures about a month or 2 ago and setup on a personal account and this did not come up
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
hrmmm so actually, it might be "new" in the sense we finally got around to updating the ref arch with our latest customer rollout, but not new in the sense we've been doing it for about 6mo
jober
joberover 7 years ago
gotcha
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago(edited)
basically, every time we do a customer rollout we revise/polish the ref-arch. it's still got it's bugs 😃 (first and foremost it's a device we use to speed up our own engagements)
jober
joberover 7 years ago
makes sense
jober
joberover 7 years ago
i am just looking at the user module and the code to deal with the overrides to try and gain some insight on the implementation
jober
joberover 7 years ago
try and find a work around
jober
joberover 7 years ago
I do not have any users setup in the root.tfvars
jober
joberover 7 years ago
is this required?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Aha, haven't tested it without probably
jober
joberover 7 years ago
ok so i should add it their an try again
jober
joberover 7 years ago(edited)
so if i add my user to here in the root.tfvars:


# Administrator IAM usernames mapped to their keybase usernames for password encryption
users = {
  #  "<mailto:erik@cloudposse.com|erik@cloudposse.com>" = "osterman"
}
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Yes, I believe that should be all it takes.
jober
joberover 7 years ago
ok so then do i need to create an overrides folder and anything in their?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
no, it should get created for you
jober
joberover 7 years ago
ok i will try that
jober
joberover 7 years ago
thanks!
jober
joberover 7 years ago
well that worked, but now i am getting….
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
hrmmm odd
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
that second terraform init should look like:


terraform init -from-module=
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
that empty -from-module= is deliberate
jober
joberover 7 years ago
this is why noobs are the best QA haha
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
🤣 thanks for sticking in there
jober
joberover 7 years ago
Hahaha this will put me miles ahead from where i would be otherwise
jober
joberover 7 years ago
it looks like the exported worked to /artifacts/accounts.tfvars
jober
joberover 7 years ago
btw i am only initializing audit, dev, staging, test and prod
Jeremy G (Cloud Posse)
Jeremy G (Cloud Posse)over 7 years ago
@jober @Erik Osterman (Cloud Posse) It is required to have at least 1 user configured in root.tfvars because that is how you are intended to have long-term access to the organization accounts.
jober
joberover 7 years ago
@Jeremy G thanks! sorry it was not clear that is a requirement. But it makes sense
Jeremy G (Cloud Posse)
Jeremy G (Cloud Posse)over 7 years ago
Unfortunately, the reference architecture is intended to get things started. It is not a full-fledged multi-functional tool.
jober
joberover 7 years ago
Forsure! And its awesome!
jober
joberover 7 years ago
I am still having issues withe the above error. @Jeremy G do you have any suggestions/insight?
Jeremy G (Cloud Posse)
Jeremy G (Cloud Posse)over 7 years ago
You need to do make reset to clear the errored state
jober
joberover 7 years ago
That worked thanks!!!
paul.mortimer
paul.mortimerover 7 years ago
Hi , i'm seeing the same issue as @jober
paul.mortimer
paul.mortimerover 7 years ago
just reading through the notes above ...
paul.mortimer
paul.mortimerover 7 years ago
Tega McKinney
Tega McKinneyover 7 years ago
I saw the same issue above as well…noticed when I ran make root/shell and manually ran cd /conf/accounts direnv exec . make deps in the shell it would initialize but when running make root/provision it would throw error. I was able to get around it however I was not aware of make reset that @Jeremy G mentioned
Tega McKinney
Tega McKinneyover 7 years ago
@Erik Osterman (Cloud Posse) curious to know how you obtain admin user password. I ran reference-architectures however I didn’t pull the password before closing out my shell and deleting my root creds. I have already committed my repos however now I’m not certain proper way to get admin user console password. Any thoughts?
paul.mortimer
paul.mortimerover 7 years ago
@Tega McKinney, thanks , looking at this now
paul.mortimer
paul.mortimerover 7 years ago(edited)
@Tega McKinney, which directory are you running make reset from ?
Tega McKinney
Tega McKinneyover 7 years ago
@paul.mortimer Not sure; I did not run it however it looks like it’s available in /conf/accounts. @jober may have some insight
Jeremy G (Cloud Posse)
Jeremy G (Cloud Posse)over 7 years ago
Each directory under /conf is a Terraform module to install (except for /conf/helmfiles, which are helmfiles). In a Terraform directory, make deps loads the modules and initializes the Terraform state, and as part of loading the modules, loads a module-specific Makefile. After running make deps you can do all the normal Terraform stuff, but as protection against accidentally overwriting something, you cannot run make deps while there is Terraform state in the current directory. If you are sure you want to clear it out, that is when you run make reset, which deletes everything make deps pulled in and any state Terraform stored in the directory.
jober
joberover 7 years ago
@Tega McKinney @paul.mortimer I ran the make reset from the /conf/accounts
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Public/Free Office Hours with Cloud Posse starting now!!

https://zoom.us/j/684901853
paul.mortimer
paul.mortimerover 7 years ago
@Jeremy G @jober, thanks for the info appreciate the pointers.
paul.mortimer
paul.mortimerover 7 years ago
I'm in Australia, so just getting up ... is there any chance i could jump on zoom shortly and walk through this issue with someone?
paul.mortimer
paul.mortimerover 7 years ago
@Erik Osterman (Cloud Posse) ?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
@paul.mortimer best way is to schedule some time here: https://calendly.com/cloudposse
Tega McKinney
Tega McKinneyover 7 years ago
Just curious, when running reference-architecture, i just realized that it does not add users from /config/root.tfvars as admins on the root accounts. That make sense as those users may not be admins. Should it expose a root_admin_user_names and/or root_readonly_user_names var(s) to ensure the ability to administer the account using IAM vs the root email?
S
SweetOps #geodesicover 7 years ago
There are no events this week
C
Cloud Posseover 7 years ago
Join us for "Office Hours" every Wednesday 11:30AM (PST, GMT-7).

This is an opportunity to ask us questions about INLINECODE_0, get live demos and learn from others using it. Next one is Mar 20, 2019 11:30AM.

👉️ Add it to your calendar

:zoom: https://zoom.us/j/684901853

:slack: #office-hours (our channel)
Abel Luck
Abel Luckover 7 years ago
I've followed the reference architecture setup, so i've got an admin group in the root account with users added to it, and the users access sub-accounts by assuming a role
Abel Luck
Abel Luckover 7 years ago
now, in one sub-account I want to enable SSM Session Manager to allow users to create sessions on instances. I've created an appropriate policy, but I'm stuck on where to attach the policy to. I probably should attach this policy to a group, but in the sub-account there are no users/groups of course.
Abel Luck
Abel Luckover 7 years ago
But i can't attach it the group in the root account, because the policy is in the sub-account
Abel Luck
Abel Luckover 7 years ago
anyone know the correct approach here?
Josh Larsen
Josh Larsenover 7 years ago
@Erik Osterman (Cloud Posse) i'm sorry if this has already been asked, but is there a rough timeline on when geodesic will be updated to terraform 0.12?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Working on it as we speak
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Might have it ready by end of day
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Problem is we need to support multiple versions concurrently so introducing a system
For that
Josh Larsen
Josh Larsenover 7 years ago
nice... ok thank you. looking forward to it
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
public #office-hours starting now! join us here: https://zoom.us/j/684901853
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
we've release support for terraform 0.12 in geodesic
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
@Josh Larsen ☝️
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
TL;DR:
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago

apk add --update terraform_0.12@cloudposse
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
and add use terraform 0.12 in your .envrc
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
to support 0.11 as well
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
do apk add --update terraform_0.11@cloudposse and add use terraform 0.12 in the .envrc
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
if you only care about 0.12 and not 0.11
Mat Geist
Mat Geistover 7 years ago
awesome!
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
you can skip the brouhaha with installing terraform_0.x packages