#geodesic (2022-03)
Discussions related to https://github.com/cloudposse/geodesic
Archive: https://archive.sweetops.com/geodesic/
2022-03-08
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
hey everyone! i’m going through the README in the atmos repo, and I’m not sure how to run the example using docker. The README mentions going into the example directory and running make all
there’s no make
file in that directory.
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
can you link to the readme you’re referring to?
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
If you use this tutorial, it should work
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
But it should be cleared up…
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
also you’ll need to run make init
first
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
cc @Andriy Knysh (Cloud Posse)
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
@Erik Osterman (Cloud Posse) are we supposed to just clone tf components into the components/terraform directory manually now? i was using vendir with the last version of atmos
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
run this Dockerfile https://github.com/cloudposse/atmos/blob/master/examples/complete/Dockerfile
# Geodesic: <https://github.com/cloudposse/geodesic/>
ARG GEODESIC_VERSION=0.152.2
ARG GEODESIC_OS=debian
# atmos: <https://github.com/cloudposse/atmos>
ARG ATMOS_VERSION=1.3.30
# Terraform
ARG TF_VERSION=1.1.4
FROM cloudposse/geodesic:${GEODESIC_VERSION}-${GEODESIC_OS}
# Geodesic message of the Day
ENV MOTD_URL="<https://geodesic.sh/motd>"
# Some configuration options for Geodesic
ENV AWS_SAML2AWS_ENABLED=false
ENV AWS_VAULT_ENABLED=false
ENV AWS_VAULT_SERVER_ENABLED=false
ENV GEODESIC_TF_PROMPT_ACTIVE=false
ENV DIRENV_ENABLED=false
# Enable advanced AWS assume role chaining for tools using AWS SDK
# <https://docs.aws.amazon.com/sdk-for-go/api/aws/session/>
ENV AWS_SDK_LOAD_CONFIG=1
ENV AWS_DEFAULT_REGION=us-east-2
# Install specific version of Terraform
ARG TF_VERSION
RUN apt-get update && apt-get install -y -u --allow-downgrades \
terraform-1="${TF_VERSION}-*" && \
update-alternatives --set terraform /usr/share/terraform/1/bin/terraform
ARG ATMOS_VERSION
RUN apt-get update && apt-get install -y --allow-downgrades \
atmos="${ATMOS_VERSION}-*"
COPY rootfs/ /
# Geodesic banner message
ENV BANNER="atmos"
WORKDIR /
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
So as far as atmos
is concerned, the components must “exist”. How they get there is flexible.
- Copy them in manually and commit to VCS (which is what we do)
- Use
vendir
to pull them in from remote sources. We want to get there, we will be building this into atmos natively.vendir
is the best alternative today. - Use git submodules and make sure to run
git clone --recurse-submodules
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
@Andriy Knysh (Cloud Posse) what am i supposed to pass when running docker run
?
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
nothing to pass, everything is defined in the dockerfile
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
@Andriy Knysh (Cloud Posse) i think i’m missing a step. here’s what I get when i run
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
########################################################################################
# No filesystem is mounted at /localhost which limits Geodesic functionality.
# EXIT THIS SHELL and on your host computer,
# run the following to install the script that runs
# Geodesic with all its features (the recommended way to use Geodesic):
#
# docker run --rm cloudposse/geodesic:latest-debian init | bash
#
# After that, you should be able to launch Geodesic just by typing
#
# geodesic
#
`
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
do you see the prompt? Execute any shell command
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
try docker exec
or docker attach
https://docs.docker.com/engine/reference/commandline/attach/ (attach
is what I do in IntelliJ IDEA)
![attachment image](https://docs.docker.com/images/docs@2x.png)
docker attach: Use docker attach
to attach your terminal’s standard input, output, and error (or any combination of the three) to a running container using the container’s ID or name….
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
@Michael Dizon did you get past your problems?
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
@Erik Osterman (Cloud Posse) yep! thanks for following up. i have project that I built with the previous atmos release. trying to get it moved over!
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
@Michael Dizon let us know if you have any questions
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
@Andriy Knysh (Cloud Posse) def!
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
@Andriy Knysh (Cloud Posse) running into an issue with the latest version of account-map
in the terraform-aws-components
repo. when i run atmos terraform plan account-map -s tenant1-ue1-dev
i get the following error:
│ Error: open ../../../stacks/tenant1-ue1-dev.yaml: no such file or directory
│
│ with module.accounts.module.backend_config.data.utils_stack_config_yaml.config,
│ on .terraform/modules/accounts/modules/backend/main.tf line 8, in data "utils_stack_config_yaml" "config":
│ 8: data "utils_stack_config_yaml" "config" {
│
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
atmos.yml
, stacks
and components
are in the same directory level
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
it seems like it’s looking for a single yaml file derived from the name_pattern, but my stacks follow the directory/file pattern defined in the examples
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
this looks like an error from the utils
provider which is used in remote-state
- we’ll have to look at terraform-aws-components
component’s files
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
also, we usually deploy account and account-map in gbl
environment (not in ue1) since those are global and not region-specific
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
@Andriy Knysh (Cloud Posse) i just saw the latest release on the atmos repo. will adding stack_name_pattern
to the config for account-map
resolve the issue i’m encountering?
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
stack_name_pattern
is just for Spacelift, to name Spacelift stacks (not related to anything else)
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
what issues are you facing now?
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
the same as above with the utils
provider in remote-state
https://sweetops.slack.com/archives/CB84E9V54/p1648415337485669?thread_ts=1646770874.240219&cid=CB84E9V54
@Andriy Knysh (Cloud Posse) running into an issue with the latest version of account-map
in the terraform-aws-components
repo. when i run atmos terraform plan account-map -s tenant1-ue1-dev
i get the following error:
│ Error: open ../../../stacks/tenant1-ue1-dev.yaml: no such file or directory
│
│ with module.accounts.module.backend_config.data.utils_stack_config_yaml.config,
│ on .terraform/modules/accounts/modules/backend/main.tf line 8, in data "utils_stack_config_yaml" "config":
│ 8: data "utils_stack_config_yaml" "config" {
│
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
I think you need to look at atmos.yaml
config https://github.com/cloudposse/atmos/blob/master/atmos.yaml#L1
# CLI config is loaded from the following locations (from lowest to highest priority):
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
am i supposed to have a yaml file that follows that naming convention?
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
my stacks are set up to use directories for tenants and environments eg tenant1/ue1/dev.yaml
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
not tenant1-ue1-dev.yaml
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
``atmos.yaml` is the CLI config (not related to stacks). You need to have it in one of the supported locations
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
yes, i have atmos.yaml
in the same location as in the example
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
if you run atmos describe config
, you should see the config defined in your atmos.yaml
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
the same level as components
and stacks
, you mentioned last week that it looks like there’s an error in the utils provider, and i’m wondering if that’s still the case. I see that the remote-state
module is referencing 0.19.0
is that the correct version for the latest version of atmos?
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
here’s the output of atmos describe config
{
"base_path": "",
"Components": {
"Terraform": {
"base_path": "./components/terraform",
"apply_auto_approve": false,
"deploy_run_init": true,
"auto_generate_backend_file": true
},
"Helmfile": {
"base_path": "components/helmfile",
"kubeconfig_path": "/dev/shm",
"helm_aws_profile_pattern": "{namespace}-{tenant}-gbl-{stage}-helm",
"cluster_name_pattern": "{namespace}-{tenant}-{environment}-{stage}-eks-cluster"
}
},
"Stacks": {
"base_path": "./stacks",
"included_paths": [
"**/*"
],
"excluded_paths": [
"globals/**/*",
"catalog/**/*",
"**/*globals*"
],
"name_pattern": "{tenant}-{environment}-{stage}"
},
"Workflows": {
"base_path": "./workflows"
},
"Logs": {
"verbose": false,
"colors": true
}
}
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
i appreciate your answering my questions btw . it’s not obvious to me where exactly I’m missing something
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
I see that the remote-state
module is referencing 0.19.0
is that the correct version for the latest version of atmos?
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
no, you should use 0.22.1
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
i am thinking of bumping the version of remote-state to 0.22.1
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
you can send me your code (or open a PR), I’ll review
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
ok, i’ll be able to work on that tomorrow
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
the code i am referencing is here https://github.com/cloudposse/terraform-aws-components/blob/master/modules/account-map/remote-state.tf
module "accounts" {
source = "cloudposse/stack-config/yaml//modules/remote-state"
version = "0.19.0"
component = "account"
privileged = true
stack_config_local_path = "../../../stacks"
context = module.this.context
}
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
when bumping to 0.22.1, remove stack_config_local_path = "../../../stacks"
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
it gets automatically calculated by atmos using atmos.yaml
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
ok i can try that now. are there any other things i’ll need to update?
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
for the remote state, it should be enough (given that the provider can find atmos.yaml
in one of the supported locations
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
oh, for the provider… it runs from the component folder
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
so atmos.yaml
can’t be in the root of the repo
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
oh..
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
it should be in /usr/local/etc/atmos/atmos.yaml
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
is that last part a typo?
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
I had to create the atmos
directory in etc
. After moving atmos.yaml
to that directory, I’m ran into the following error
╷
│ Error:
│ No stack config files found in the provided paths:
│ - /localhost/Code/xxx/testing/components/terraform/account-map/stacks/**/*
│
│
│ Check if `base_path`, 'stacks.base_path', 'stacks.included_paths' and 'stacks.excluded_paths' are correctly set in CLI config files or ENV vars.
│
│ with module.accounts.data.utils_component_config.config,
│ on .terraform/modules/accounts/modules/remote-state/main.tf line 1, in data "utils_component_config" "config":
│ 1: data "utils_component_config" "config" {
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
i just updated the base_path. looks like that made some progress
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
i’ll be able to continue on this tomorrow. hopefully this was helpful for you guys as well.
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
this is usually what we use
# Base path for components and stacks configurations.
# Can also be set using `ATMOS_BASE_PATH` ENV var, or `--base-path` command-line argument.
# Supports both absolute and relative paths.
# If not provided or is an empty string, `components.terraform.base_path`, `components.helmfile.base_path` and `stacks.base_path`
# are independent settings (supporting both absolute and relative paths).
# If `base_path` is provided, `components.terraform.base_path`, `components.helmfile.base_path` and `stacks.base_path`
# are considered paths relative to `base_path`.
base_path: ""
components:
# Settings for all terraform components
terraform:
# Can also be set using `ATMOS_COMPONENTS_TERRAFORM_BASE_PATH` ENV var, or `--terraform-dir` command-line argument
# Supports both absolute and relative paths
base_path: "components/terraform"
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
@Andriy Knysh (Cloud Posse) https://github.com/cloudposse/terraform-aws-components/pull/404
what
• account-map/modules/iam-roles, account-map/remote-state - updated remote-state version to 0.22.1 • added arn_format variable to tfstate-backend, account-map/modules/iam-roles, and account-settings
why
• updating remote state to 0.22.1 from 0.19.0 resolves issue with latest version of atmos • adding arn_format to support deployment in GovCloud regions
![Michael Dizon avatar](https://avatars.slack-edge.com/2021-01-15/1664383757488_b5214d00b8fce4726a7c_72.jpg)
my lucky number
2022-03-09
2022-03-11
2022-03-22
![Release notes from geodesic avatar](https://a.slack-edge.com/80588/img/services/rss_72.png)
v0.152.3 Included Tools Update AWS CLI packages @renovate (<a class=”issue-link js-issue-link” data-error-text=”Failed to load title” data-id=”1160152700” data-permission-text=”Title is private” data-url=”https://github.com/cloudposse/geodesic/issues/776” data-hovercard-type=”pull_request”…
Included Tools Update AWS CLI packages @renovate (#776) This PR contains the following updates: Package Change Age Adoption Passing Confidence awscli (source, changelog) ==1.22.63 -> ==…
renovate has one repository available. Follow their code on GitHub.
This PR contains the following updates: Package Change Age Adoption Passing Confidence awscli (source, changelog) ==1.22.63 -> ==1.22.79 boto3 ==1.21.8 -> ==1.21.24 Release Not…
2022-03-23
2022-03-26
![Release notes from geodesic avatar](https://a.slack-edge.com/80588/img/services/rss_72.png)
v0.152.4 Included Tools Update AWS CLI packages @renovate (<a class=”issue-link js-issue-link” data-error-text=”Failed to load title” data-id=”1181395345” data-permission-text=”Title is private” data-url=”https://github.com/cloudposse/geodesic/issues/778” data-hovercard-type=”pull_request”…
Included Tools Update AWS CLI packages @renovate (#778) This PR contains the following updates: Package Change Age Adoption Passing Confidence awscli (source, changelog) ==1.22.79 -> ==…
renovate has one repository available. Follow their code on GitHub.
This PR contains the following updates: Package Change Age Adoption Passing Confidence awscli (source, changelog) ==1.22.79 -> ==1.22.82 boto3 ==1.21.24 -> ==1.21.27 Release No…