hey everyone! i'm going through the README in the ...
# geodesic
m
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.
e
can you link to the readme you're referring to?
If you use this tutorial, it should work
But it should be cleared up...
also you'll need to run
make init
first
m
e
cc @Andriy Knysh (Cloud Posse)
m
@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
a
e
So as far as
atmos
is concerned, the components must "exist". How they get there is flexible. 1. Copy them in manually and commit to VCS (which is what we do) 2. 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. 3. Use git submodules and make sure to run
git clone --recurse-submodules
🙌 1
m
@Andriy Knysh (Cloud Posse) what am i supposed to pass when running
docker run
?
👀 1
a
nothing to pass, everything is defined in the dockerfile
m
@Andriy Knysh (Cloud Posse) i think i'm missing a step. here's what I get when i run
Copy code
########################################################################################            
# 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
#`
a
do you see the prompt? Execute any shell command
try
docker exec
or
docker attach
https://docs.docker.com/engine/reference/commandline/attach/ (
attach
is what I do in IntelliJ IDEA)
e
@Michael Dizon did you get past your problems?
m
@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!
a
@Michael Dizon let us know if you have any questions
m
@Andriy Knysh (Cloud Posse) def!
@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:
Copy code
│ 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" {
│
atmos.yml
,
stacks
and
components
are in the same directory level
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
a
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
also, we usually deploy account and account-map in
gbl
environment (not in ue1) since those are global and not region-specific
👍 1
m
@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?
a
stack_name_pattern
is just for Spacelift, to name Spacelift stacks (not related to anything else)
what issues are you facing now?
m
a
I think you need to look at
atmos.yaml
config https://github.com/cloudposse/atmos/blob/master/atmos.yaml#L1
m
am i supposed to have a yaml file that follows that naming convention?
my stacks are set up to use directories for tenants and environments eg
tenant1/ue1/dev.yaml
not
tenant1-ue1-dev.yaml
a
``atmos.yaml` is the CLI config (not related to stacks). You need to have it in one of the supported locations
m
yes, i have
atmos.yaml
in the same location as in the example
a
if you run
atmos describe config
, you should see the config defined in your
atmos.yaml
m
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?
here's the output of
atmos describe config
Copy code
{
  "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
  }
}
i appreciate your answering my questions btw 🙂. it's not obvious to me where exactly I'm missing something
a
I see that the
remote-state
module is referencing
0.19.0
is that the correct version for the latest version of atmos?
no, you should use 0.22.1
m
i am thinking of bumping the version of remote-state to 0.22.1
a
you can send me your code (or open a PR), I’ll review
m
ok, i'll be able to work on that tomorrow
a
when bumping to 0.22.1, remove
stack_config_local_path = "../../../stacks"
it gets automatically calculated by atmos using atmos.yaml
m
ok i can try that now. are there any other things i'll need to update?
a
for the remote state, it should be enough (given that the provider can find
atmos.yaml
in one of the supported locations
oh, for the provider… it runs from the component folder
so
atmos.yaml
can’t be in the root of the repo
m
oh..
a
it should be in
/usr/local/etc/atmos/atmos.yaml
m
is that last part a typo?
a
fixed
👍 1
m
I had to create the
atmos
directory in
etc
. After moving
atmos.yaml
to that directory, I'm ran into the following error
Copy code
╷
│ 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" {
i just updated the base_path. looks like that made some progress
i'll be able to continue on this tomorrow. hopefully this was helpful for you guys as well.
a
this is usually what we use
Copy code
# 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"
👍 1
m
my lucky number