#geodesic (2024-02)

geodesic https://github.com/cloudposse/geodesic

Discussions related to https://github.com/cloudposse/geodesic

Archive: https://archive.sweetops.com/geodesic/

2024-02-02

Release notes from geodesic avatar
Release notes from geodesic
07:00:37 AM

v2.8.5 Included Tools

Update AWS CLI packages @renovate (<a class=”issue-link js-issue-link” data-error-text=”Failed to load title” data-id=”2116147343” data-permission-text=”Title is private” data-url=”https://github.com/cloudposse/geodesic/issues/909“…

Release v2.8.5 · cloudposse/geodesicattachment image

Included Tools

Update AWS CLI packages @renovate (#909) This PR contains the following updates:

Package Change Age Adoption Passing Confidence

awscli (source, changelog) ==1.32.30 -> ==…

Update AWS CLI packages by renovate[bot] · Pull Request #909 · cloudposse/geodesicattachment image

This PR contains the following updates:

Package Change Age Adoption Passing Confidence

awscli (source, changelog) ==1.32.30 -> ==1.32.34

boto3 ==1.34.30 -> ==1.34.34

Release No…

2024-02-07

E-Love avatar

Curious if anyone’s used #geodesic with dev containers? It feels like this could be a good match for SweetOps-style repos!

Development containers

Development containers documentation and specification page.

Hans D avatar

Current geodesic is constructed in such a way it cannot be used properly for dev containers (mainly the profile scripts relying on bash instead of sh)

Development containers

Development containers documentation and specification page.

Hans D avatar

We currently add some geodesic magic on top of our tooling container, using build stages this allows for a nice combo

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

I am not familiar with dev containers, but can confirm that Geodesic relies heavily on bash and its specific features and we have no plans to make it work under the POSIX Bourne shell.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Possibly it could be a different release of geodesic without the interactive elements. E.g. a dev-contiainer release.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

It’s interesting though, I need to read up on it. Thanks for the suggestion @E-Love

1
E-Love avatar

@Hans D, can you provide a bit more context around your Bash vs sh comment? I haven’t run into that limitation yet and regularly use Bash as the primary shell in dev containers, but I fear I’m misunderstanding the limitation you’re referencing!

E-Love avatar

FWIW, I mostly use dev containers with Docker locally and Coder remotely, and not regularly with Codespaces.

Coder - Your Self-Hosted Remote Development Platform

Coder - Your Self-Hosted Remote Development Platform

Hans D avatar

I’ve been using it with jetbrains, so it could be implementation specific. Bash itself is not an issue, but the various commands - with jetbrains - arer executed using sh as main shell. The profile scripts will be executed, but in the case of Geodesic these are very bash specific (mainly arrays in variables), which makes it not working. (normally profile scripts are sh compatible).

1
Hans D avatar

Main difference I see is that the geodesic env is more operational focused, while the dev container is more … eh … dev focused. There is some overlap, but the whole wrapping that geodesic does for mounting etc. is handled differently with devcontainers.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

We’ll have @Jeremy White (Cloud Posse) do a quick PoC, and see what we learn from it.

Hans D avatar

he can contact me as well if hee needs more info / my experience

E-Love avatar

same! I currently use dev containers for TF and Helm dev but my team is intrigued by the SweetOps approach and Geodesic feels like it has many of the “batteries included”.

Jeremy White (Cloud Posse) avatar
Jeremy White (Cloud Posse)

I assume that, ideally, I would fork the devcontainers-contrib/templates repo

devcontainers-contrib/templates

Pre-made .devcontainer folders for starting your next project

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Yea, I like the idea of aligning with conventions like this.

E-Love avatar

The Terraform stuff in there uses “features”, which are quite different from the common (and Geodesic) way of building images. Features are a way to work around the single inheritance limitation of container images.

I would recommend using their base image and keeping the existing Dockerfile as similar as possible, instead of trying to replicate it using features.

Alternatively, there could be a “Geodesic feature” that could be applied to any image with proper prereqs, but that sounds like a bigger lift.

Hans D avatar

My experience so far: features are a nice start, but i prefer to roll my own layers. Way more control that way. (and that’s why the tooling container we are using is not build on top of Geodesic, but we import the bits we need). Allowed us to be running Bookworm way earlier (sorry Erik)

1
Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@E-Love Would you please educate me as to what makes dev containers attractive? What do you get with them that you don’t get with Docker or Nix? This would help me understand how we can best meet your needs.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

I confess I still do not understand the use case, but it looks to me like you can get a good start on using Geodesic with dev containers with this configuration (Contents of devcontainer.json)

{
  "name": "Geodesic Dev Container",
  "image": "cloudposse/geodesic:2.9.0-debian",
  "mounts": [
    "source=${localEnv:HOME},target=/localhost,type=bind",
  ],
  "appPort": ["12345:12345"],
  "containerEnv": {
    "SHELL": "/bin/bash",
    "GEODESIC_PORT": "12345",
    "GEODESIC_HOST_CWD": "${localWorkspaceFolder}",
    "GEODESIC_WORKDIR": "${containerWorkspaceFolder}",
    "LOCAL_HOME": "${localEnv:HOME}",
  },
  "remoteEnv": {
    "LOGIN_SHELL": "/bin/bash"
  },
  "settings": {
    "terminal.integrated.defaultProfile.linux": "/bin/bash"
  },
}

Please let me know how it goes, or if you have other feedback.

NOTE: the mount of "source=${localEnv:HOME},target=/localhost is overkill and may cause performance issues, but it is what we currently do in Geodesic for the convenience of mounting all the dotfiles and dotdirectories in $HOME, so we can share configuration. You could pare it down to just the ones you want to use, but my personal list is kind of long:

.aws .bashrc.d .config .emacs.d .geodesic .kube .ssh .terraform.d

This also does not solve the problem for files like .bashrc or .inputrc

E-Love avatar

@Jeremy G (Cloud Posse), are you saying you don’t understand why the spec exists and why so many companies are buying into it? Do you want me to make the case for that?

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@E-Love I am not saying it is not worthwhile, I’m just saying I don’t understand its value because it does not seem to be an improvement in my specific workflow. I don’t like using the terminal from within the IDE. For go development, a container with go is not that helpful because it doesn’t persist all the downloaded modules. None of this is to say that dev containers are not helpful to somebody for something, I am only saying that I don’t really get it yet.

Because I don’t get it yet, I cannot confidently evaluate whether or not Geodesic’s support of dev containers is good or not. So, I’m asking you to try it out and let me know if it works well for you, and if not, why not. I’m not really asking you to make the case for dev containers.

For example, the configuration I posted does not forward the SSH agent on the host. Do you care, or is that adequately handled by your IDE, or do you just not need it? For another example, the configuration assume that ${localEnv:HOME}/ contains configuration directories like .aws and .config. Does that work with remote workspaces? If not, what is the right way to import such configuration?

E-Love avatar

thanks for clarifying and I’m definitely down to try this out :slightly_smiling_face:

your last question is easiest to answer :slightly_smiling_face:

unfortunately, dotfiles support isn’t built into the spec. However, many of the remote environments like Codespaces and Coder have built-in support for them, as do editors like VSCode. For terminal-based dev tools and JetBrains IDEs, I typically use the CLI’s exec command to execute chezmoi (my dotfiles manager of choice), but I’ve been thinking there could be a way to build a postCreateCommand lifecycle script to do something similar.

Developing inside a Container using Visual Studio Code Remote Developmentattachment image

Developing inside a Container using Visual Studio Code Remote Development

Containers and VMs - chezmoi

Manage your dotfiles across multiple machines, securely.

Dev Container metadata reference

The devcontainer.json file contains any needed metadata and settings required to configurate a development container for a given well-defined tool and runtim…

devcontainers/cli

A reference implementation for the specification that can create and configure a dev container from a devcontainer.json.

E-Love avatar

for SSH, there are a number of approaches, but they’re unfortunately host-specific. For local dev, it’s relatively easy. For remote tools, every provider has their own mechanism for accessing exposed ports or, in Codespaces’s case, the gh CLI’s command.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

Yes about SSH, that’s why I punted on that.

1
Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

Looks like chezmoi has a Debian package, but not published in the Debian package repo. Maybe you can lobby them for that, then you can easily install it in Geodesic using apt-get.

E-Love avatar

I suspect installing from the .deb would work in the meantime

E-Love avatar

I’ll block off some time on Friday to try this out

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

I appreciate your effort. To keep things simpler here, please just focus on Geodesic in this thread. I think the above configuration will work for the use case where you are running the IDE and hosting the code on your local machine. I will look into making it easier to run remotely.

1
E-Love avatar

I’m happy to help with the same. My intent with this thread was to start a convo around feasibility, not create a feature request

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

With the above configuration, I was able to use Geodesic as a dev container with IntelliJ EAP. So it’s feasible. TBD is how useful it is and what would make it more useful.

E-Love avatar

I’ll happily provide feedback as I (and hopefully my team soon) work with it. Thanks a bunch!

Hans D avatar

The benefit if having devcontainers is that you can ship the minimal required bits together with the repo. Shipping geodesic as the base for that devcontainer could be done, but given its size might not the option, but multiple devcontainers can be used. Having the container minimal: fast pull, no interference because of special magic, keeping out personal preferences,… (could be added via Chezmoi Dotfile Manager / https://containers.dev/features).

Features

Development containers documentation and specification page.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@Hans D the special magic is a big part of Geodesic. Customized prompt, handling multiple AWS profiles, easy Kubernetes access, etc. If you don’t want that, then you can probably get away with just installing atmos and terraform (and maybe kubectl if you’re using Kubernetes) on your choice of Linux.

Hans D avatar

I know. And we use some of that special magic as well (we inject that from geodesic into our tooling container). But for some dev situation that might be a bit too much or too magical.

2024-02-08

Venkat Sunil Minchala avatar
Venkat Sunil Minchala

Hello team,

I have published an article on “Infrastructure Automation with Geodesic: DevOps Magic in One Click.”. I would like to get your feedback.

https://medium.com/@venkatsunilm/infrastructure-automation-with-geodesic-your-devops-toolbox-made-easy-486ba9784596

Infrastructure Automation with Geodesic: DevOps Magic in One Click.

Geodesic: Your DevOps Toolbox Made Easy, ditch individual tools, leverage Docker containers, and gain efficiency with Geodesic

3
1
2
Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@Erik Osterman (Cloud Posse) public tutorial on Geodesic

Infrastructure Automation with Geodesic: DevOps Magic in One Click.

Geodesic: Your DevOps Toolbox Made Easy, ditch individual tools, leverage Docker containers, and gain efficiency with Geodesic

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Thanks @Venkat Sunil Minchala! We’ll review and bring it up in #office-hours

1
Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
1
Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

(we keep that updated using VHS)

Dan Miller (Cloud Posse) avatar
Dan Miller (Cloud Posse)

This looks great! One note I’d add is that you mention the “active community” but don’t link to it. It would be nice to have a link to this Slack channel included with that bullet point under “What people like about Geodesic” and how readers could get support from the community

And one small nitpick is that “Cloud Posse” is two words, not “CloudPosse”

1
Venkat Sunil Minchala avatar
Venkat Sunil Minchala

@Erik Osterman (Cloud Posse) and @Dan Miller (Cloud Posse) Thanks for the quick input. I have addressed those suggestion and published. :)

1
Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@Venkat Sunil Minchala Thank you for the writeup on Geodesic. I’m so deeply involved with it I cannot possibly see it with fresh eyes, so your article was helpful to me and I’m sure it will be helpful to others, too.

I have a few minor comments: • It would be nice to have an explicit link to the Geodesic GitHub repo near the start of the article • Typo after Docker Primer: you have “Geodesic is based on advance features”, should be “advance_d_ features” • Under “Standalone Geodesic”, we really do not recommend running other commands under Geodesic in standalone mode, and it is not something we validate during our development and testing. So I suggest you remove the example of running terraform via

docker run -it --rm --volume $HOME:/localhost cloudposse/geodesic:latest-debian -c "terraform version"

• I think you want to add a heading before “Create your own Docker Image based on Geodesic”, like you do for the other 2 usage patterns. • Under “How to launch and use Geodesic?”, I think people will get it, but still, I think you should replace “Just type *Geodesic* to use it further” with “Just type geodesic to use it further”. Thank you again for helping to spread the word!

cloudposse/geodesic

Geodesic is a DevOps Linux Toolbox in Docker

Venkat Sunil Minchala avatar
Venkat Sunil Minchala

@Jeremy G (Cloud Posse) Thank you for your feedback! I appreciate the suggestions and have implemented them in the published version. I’m glad my input was helpful.
https://medium.com/@venkatsunilm/infrastructure-automation-with-geodesic-your-devops-toolbox-made-easy-486ba9784596

Infrastructure Automation with Geodesic: DevOps Magic in One Click.attachment image

Geodesic: Your DevOps Toolbox Made Easy, ditch individual tools, leverage Docker containers, and gain efficiency with Geodesic

1

2024-02-09

2024-02-10

Release notes from geodesic avatar
Release notes from geodesic
08:40:38 PM

v2.8.6 Included Tools

Update dependency cryptography to v42 [Security] @renovate (<a class=”issue-link js-issue-link” data-error-text=”Failed to load title” data-id=”2095187862” data-permission-text=”Title is private”…

Release v2.8.6 · cloudposse/geodesicattachment image

Included Tools

Update dependency cryptography to v42 [Security] @renovate (#906) GitHub Vulnerability Alerts CVE-2023-50782 A flaw was found in the python-cryptography package. This issue may …

2024-02-11

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@Matt Gowie I’m looking through old Geodesic issues and had some question about this one you opened. Please respond here or on the issue. Preferably on the issue if you are OK with closing it, or here if you want some back-and-forth on designing the feature.

#798 Add a `destroy` command to the wrapper script to support removing the currently running geodesic container

Describe the Feature

It would be great to have a geodesic destroy or similar command to remove the currently running image.

Use Case

This would help in clearing the existing container in the case that the user no longer wants it around.

Describe Ideal Solution

geodesic destroy would lookup the running geodesic container ID and issue a docker rm $CONTAINER_ID against it.

Alternatives Considered

N/A

Additional Context

N/A

2024-02-12

Release notes from geodesic avatar
Release notes from geodesic
09:40:36 PM

v2.8.7 Build/Release Maintenance

Add OCI annotations @Nuru (<a class=”issue-link js-issue-link” data-error-text=”Failed to load title” data-id=”2129224491” data-permission-text=”Title is private” data-url=”https://github.com/cloudposse/geodesic/issues/917“…

Release v2.8.7 · cloudposse/geodesicattachment image

Build/Release Maintenance

Add OCI annotations @Nuru (#917) what

Add OCI annotations to published images

why

Standard compliance and better support for third-party tooling

references

OCI …

Nuru - Overview

Nuru has 22 repositories available. Follow their code on GitHub.

Add OCI annotations by Nuru · Pull Request #917 · cloudposse/geodesicattachment image

what

Add OCI annotations to published images

why

Standard compliance and better support for third-party tooling

references

OCI annotations Supersedes and closes #915

Release notes from geodesic avatar
Release notes from geodesic
05:40:39 AM

v2.9.0 Update to Debian 12.4 from 11.8 Enhancements

Update to Debian 12.4 and other updates @Nuru (<a class=”issue-link js-issue-link” data-error-text=”Failed to load title” data-id=”2131401462” data-permission-text=”Title is private” data-url=”https://github.com/cloudposse/geodesic/issues/918“…

Release v2.9.0 Update to Debian 12.4 from 11.8 · cloudposse/geodesic

Enhancements

Update to Debian 12.4 and other updates @Nuru (#918) what

Update Google Cloud SDK from 455.0.0 to 463.0.0 Update helm-diff from 3.8.1 to 3.9.4 Updates to Debian-based Geodesic:

Nuru - Overview

Nuru has 22 repositories available. Follow their code on GitHub.

Update to Debian 12.4 and other updates by Nuru · Pull Request #918 · cloudposse/geodesic

what

Update Google Cloud SDK from 455.0.0 to 463.0.0 Update helm-diff from 3.8.1 to 3.9.4 Updates to Debian-based Geodesic:

Update Debian from 11.8 to 12.4 Update Python from 3.11.6 Change archit…

2024-02-13

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Hans D

Hans D avatar

Thanks, and I saw it. (already running bookworm since start of dec)

Release notes from geodesic avatar
Release notes from geodesic
10:30:36 PM

v2.9.0 Update to Debian 12.4 from 11.8 (minor breaking change) In this release we upgrade from Debian 11 (buster) to Debian 12 (bookworm). This introduces a minor breaking change. Debian 12 has symbolic links for /bin, /sbin, and /lib pointing to /usr/bin, /usr/sbin, and /usr/lib respectively. Previously, the Dockerfile command: COPY rootfs/ /

worked fine even if you had /bin, /sbin, or /lib subdirectories under rootfs/. Previous versions of Geodesic did have a rootfs/sbin directory which contained a single file, docker, which was a script that…

Release v2.9.0 Update to Debian 12.4 from 11.8 (minor breaking change) · cloudposse/geodesicattachment image

In this release we upgrade from Debian 11 (buster) to Debian 12 (bookworm). This introduces a minor breaking change. Debian 12 has symbolic links for /bin, /sbin, and /lib pointing to /usr/bin, /us…

2024-02-14

Release notes from geodesic avatar
Release notes from geodesic
09:50:33 PM

v2.9.0 Update to Debian 12.4 from 11.8 (minor breaking change) In this release we upgrade from Debian 11 (buster) to Debian 12 (bookworm). This introduces a minor breaking change. Debian 12 has symbolic links for /bin, /sbin, and /lib pointing to /usr/bin, /usr/sbin, and /usr/lib respectively. This can break certain customizations you may be making in your Dockerfile for your custom image, and can also affect Spacelift users. If you are making a customized version of Geodesic Previously, the Dockerfile command: COPY rootfs/ /

worked fine even if you had…

Release v2.9.0 Update to Debian 12.4 from 11.8 (minor breaking change) · cloudposse/geodesicattachment image

In this release we upgrade from Debian 11 (buster) to Debian 12 (bookworm). This introduces a minor breaking change. Debian 12 has symbolic links for /bin, /sbin, and /lib pointing to /usr/bin, /us…

2024-02-17

Release notes from geodesic avatar
Release notes from geodesic
09:30:40 AM

v2.9.1 Included Tools

Update dependency cryptography to v42.0.3 @renovate (<a class=”issue-link js-issue-link” data-error-text=”Failed to load title” data-id=”2137845612” data-permission-text=”Title is private” data-url=”https://github.com/cloudposse/geodesic/issues/919“…

Release v2.9.1 · cloudposse/geodesicattachment image

Included Tools

Update dependency cryptography to v42.0.3 @renovate (#919) This PR contains the following updates:

Package Change Age Adoption Passing Confidence

cryptography (changelog)…

Update dependency cryptography to v42.0.3 by renovate[bot] · Pull Request #919 · cloudposse/geodesicattachment image

This PR contains the following updates:

Package Change Age Adoption Passing Confidence

cryptography (changelog) ==42.0.2 -> ==42.0.3

Release Notes

pyca/cryptography (cryptography) v…

Michael avatar
Michael

I know that Geodesic tends to lean more into the AWS landscape, but would y’all consider offering some GCP PS1 prompt support for GCP accounts like:

function role_name() { local role_name # Could be a primary or assumed role. If we have assumed a role, cut off the session name. local current_role=$(gcloud auth list --filter=status:ACTIVE --format="value(account)" 2>/dev/null | cut -d '@' -f1) if [[ -z $current_role ]]; then unset ASSUME_ROLE return 0 fi export ASSUME_ROLE="$current_role" } role_name

Looking to incorporate Geodesic into our toolbox @Jeremy G (Cloud Posse)

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

I would be willing to include GCP support (we already ship with the GCP SDK pre-installed), but I am cautious because I do not use GCP and would want to make sure anything we do does not interfere with our AWS support and that GCP users are not bogged down by our AWS support.

For example, we currently display the active AWS role in the prompt. It’s a rather convoluted process that accounts for the possibility that you may have changed roles in a number of ways. To do that, we check the setting of AWS_PROFILE on every prompt, and make further checks when it changes. The check (when it changes) takes about a second to complete, so we do not want to run any of this if you are using GCP.

We have other places where we just assume that ASSUME_ROLE is an AWS role, and I’m not sure what, if anything, needs to be adjusted there.

We have legacy support to help you switch roles via an assume-role command, and we would want that to work for GCP (if changing roles is a normal part of your workday under GCP) or be disabled (if not needed).

If you can help me out with use cases and testing, I can add this kind of support for GCP. Otherwise, I’m not sure exactly what to do or how to test it, even though your role_name prompt is a good start.

To start, • How fast is gcloud auth list? Is it just processing a local file, or does it have to make a remote API call? • Where does gcloud store configuration data? (AWS stores it in $HOME/.aws/

• How do you change roles? How often do you change roles?

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@Michael In addition to :point_up: , on my computer, gcloud auth list takes 0.3s to run. That is too long to run on every prompt. So, like we do with AWS, we will want to have some quick way to cache the results and then check if the cache needs to be invalidated. (With AWS, we check to see if AWS_PROFILE has changed or if the modification timestamp on the AWS Credentials file has changed.) Can you help me out by figuring out what to use to invalidate the cache for gcloud auth list?

Michael avatar
Michael

@Jeremy G (Cloud Posse) Those are great insights and I would love to help out. Thank you for the offer to assist with this feature too. From my understanding, GCP has a few different authentication flows, but when it comes to the credentials used by SDK tools like gcloud or gsutil, they are stored in a DB file located at ~/.config/gcloud/credentials.db . Whenever someone runs gcloud auth login, it appends an entry to this file. I also found credentials inside of access_tokens.db, and was able to extrapolate them using sqlite.

When I look in ~/.config/gcloud/configurations/config_default :

I see:

[core] account = [[email protected]](mailto:[email protected]) project = projectexample

Maybe this is another starting point, because most of the gcloud commands I ran hovered around 0.22s for completion as well

2024-02-18

2024-02-20

Matt Gowie avatar
Matt Gowie

When using Geodesic, I get these errors all the time whenever I start up a new shell and do a terraform init or atmos command:
Could not download module “account” (providers.mixin.tf:13) source code from “git::https://github.com/cloudposse/terraform-yaml-stack-config?ref=0.22.3”: error
│ downloading ‘https://github.com/cloudposse/terraform-yaml-stack-config?ref=0.22.3’: /usr/bin/git exited with 128: fatal: detected dubious ownership in repository at
│ To add an exception for this directory, call:

│ git config –global –add safe.directory /blahblahblah
Is there a suggested way of dealing with this? I’m adding git config --global --add safe.directory \* to my ~/.geodesic/overrides.d/main.sh but wondering if there is a better avenue there.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

You should convert your modules to registry syntax.

module "stack-config" {
  source  = "cloudposse/stack-config/yaml"
  version = "0.22.3"
}
Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

Note also that that version is from June, 2022, so you might want to think about upgrading.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@Matt Gowie Of course, you should also be fixing any underlying file ownership issues. All the files you touch in Geodesic should appear to be owned by root, and the ones that are actually on the host filesystem, when viewed from the host, should appear to be owned by you.

Matt Gowie avatar
Matt Gowie

Huh. That is coming from the registry syntax:

module "account" {
  source  = "cloudposse/stack-config/yaml//modules/remote-state"
  version = "0.22.3"

  component = "account-map"
  stage     = "root"

  context = module.this.context
}
Matt Gowie avatar
Matt Gowie

Can you expand more on the file ownership bit? Not sure what you’re getting at. I see the owner + group as 501 + dialout.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

Inside Geodesic everything should appear to be owned by root:

⨠ ls -l .terraform*
-rw-r--r-- 1 root root 1043 Feb 20 08:58 .terraform.lock.hcl

.terraform:
total 4
drwxr-xr-x 4 root root 4096 Feb 20 21:01 e98s/
Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

If you have done something to avoid running as the root user inside Geodesic, we do not support that.

Matt Gowie avatar
Matt Gowie

Hm… we’re not doing anything special that I know of. I’m only referring to the /localhost/**** volume mount that is owned by “501” (never seen that) and the group “dialout”.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

If you are using BindFS because of not running Docker in rootless mode, you may need to upgrade to Geodesic 2.8.1 or later. See PR 901

1
Matt Gowie avatar
Matt Gowie

Just rebuilt our image using Geodesic 2.9.1 Debian. Still hitting the same issue. I’m running colima and not docker desktop though, so that may have something to do with it.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

Yes, colima is not supported

Matt Gowie avatar
Matt Gowie

Well, I’m not necessarily hitting the same issue, but if I check the owner of a file in /localhost/*** then I get the following:

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

What you are seeing is a failure to map UID and GID from host to container. I expect you are using a Mac because the default UID:GID on Mac is 501:20

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

Docker desktop manages translating UID:GID on host to the container user’s UID:GID inside the container. Apparently Colima does not. Refer to Colima docs about it and LMK what you find.

1
Matt Gowie avatar
Matt Gowie

Yeah, host is mac. I’ll check it out.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

If you are still using our wrapper to launch Geodesic, you might have success with

export GEODESIC_HOST_BINDFS_ENABLED=true

from the host before launching.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@Matt Gowie LMK if this works. (FYI, VirtioFS is the default for Docker Desktop for Mac, but there are still open issues relating to file ownership permissions when using VirtioFS under DD, so I still use gRPC FUSE.)

Matt Gowie avatar
Matt Gowie

Yeah finding the same thing, it seems to be a problem with the default which is sshfs . Will try out your suggestion next time I sit down to my machine.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

Here is just one of many issues with VirtioFS and Docker Desktop for Mac. You may run into the same kinds of things with Colima.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

LMK how you are launching Geodesic. The more I think about it, the more I think that BindFS may be the best solution for Colima users.

Hans D avatar

Orbstack has good results as well on Mac

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@Hans D Thanks for mentioning Orbstack. Potential users should beware that Orbstack will destroy Time Machine backups and effectively prevent other backups if the destination drive is not APFS formatted (such as an HFS+ drive or NAS), unless its data file is immediately excluded from backups. Several people have been affected. For example, pjv .

Comment on #29 Impossibly large file at ~/.orbstack/data/data.img

FWIW, this 8.7 TB sparse file (~/.orbstack/data/data.img) that’s not really taking up that much space on disk caused Time Machine on my mac to delete a year’s worth of historical backups (gone forever) to try to make space on my 4 TB backup disk to back up the mac. Then after trying to back up to the now empty 4 TB backup disk, Time Machine puked and told me there was not enough room to back up my disk which has about 750 GB on it.

I think it would really be a good idea for orbstack to automatically exclude this sparse image from Time Machine backups by default.

Matt Gowie avatar
Matt Gowie

@Jeremy G (Cloud Posse) running coliam with VirtioFS did the trick for correct file permissions. All files are now owned by root.

I am launching Geodesic via the wrapper script.

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

@Matt Gowie Glad that worked. Would you please add a relevant comment to https://github.com/cloudposse/geodesic/issues/594 for other Colima users. I might update the issue title to be more comprehensive about file ownership issues.

Matt Gowie avatar
Matt Gowie

Done Thanks for the pointers + help Jeremy

Jeremy G (Cloud Posse) avatar
Jeremy G (Cloud Posse)

You’re welcome, and thank you for all your support for Cloud Posse open source.

1

2024-02-21

2024-02-23

Release notes from geodesic avatar
Release notes from geodesic
10:00:42 AM

v2.9.0 Update to Debian 12.4 from 11.8 (minor breaking change) In this release we upgrade from Debian 11 (buster) to Debian 12 (bookworm). This introduces a minor breaking change. Debian 12 has symbolic links for /bin, /sbin, and /lib pointing to /usr/bin, /usr/sbin, and /usr/lib respectively. This can break certain customizations you may be making in your Dockerfile for your custom image, and can also affect Spacelift users. If you are making a customized version of Geodesic Previously, the Dockerfile command: COPY rootfs/ /

worked fine even if you had…

Release v2.9.0 Update to Debian 12.4 from 11.8 (minor breaking change) · cloudposse/geodesic

In this release we upgrade from Debian 11 (buster) to Debian 12 (bookworm). This introduces a minor breaking change. Debian 12 has symbolic links for /bin, /sbin, and /lib pointing to /usr/bin, /us…

1

2024-02-27

Release notes from geodesic avatar
Release notes from geodesic
01:20:35 AM

v2.9.2 Enhancements

Fix aws CLI auto-completions, use smaller kubectl package @Nuru (<a class=”issue-link js-issue-link” data-error-text=”Failed to load title” data-id=”2150745434” data-permission-text=”Title is private” data-url=”https://github.com/cloudposse/geodesic/issues/924“…

Release v2.9.2 · cloudposse/geodesicattachment image

Enhancements

Fix aws CLI auto-completions, use smaller kubectl package @Nuru (#924) what

Fix aws auto-completion Only install latest kubectl

why

The aws CLI is provided in 2 versions, v1 an…

Nuru - Overview

Nuru has 22 repositories available. Follow their code on GitHub.

Fix aws CLI auto-completions, use smaller kubectl package by Nuru · Pull Request #924 · cloudposse/geodesicattachment image

what

Fix aws auto-completion Only install latest kubectl

why

The aws CLI is provided in 2 versions, v1 and v2, and which version is in use is managed by update-alternatives. However, each versio…

    keyboard_arrow_up