#geodesic (2022-01)

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

Discussions related to https://github.com/cloudposse/geodesic Archive: https://archive.sweetops.com/geodesic/

2022-01-28

2022-01-27

Alex Siegman avatar
Alex Siegman

Has anyone done any testing with Geodesic and the new stable release of rancher desktop rather than docker? I plan to give it a try in the next couple days, just curious if anyone has tried already and has any feedback.

Release Rancher Desktop 1.0.0 · rancher-sandbox/rancher-desktop attachment image

This is the 1.0.0 release of Rancher Desktop, an open source desktop application to bring Kubernetes and container management to Mac, Windows, and Linux. The release contains some feature changes a…

Alex Siegman avatar
Alex Siegman

Tested this out briefly today.

At least in my setup, I had issues with atmos inside of geodesic and something to do with the file system. I could not get it to run plans that included modules pulled from git, as it always said there were changes.

I was using the docker backend, not the containerd backend.

I’ll probably poke at it more, but besides those hiccups, it was able to build my customized geodesic just fine and do basic stuff. Only ran into terraform/atmos quirks so far.

Release Rancher Desktop 1.0.0 · rancher-sandbox/rancher-desktop attachment image

This is the 1.0.0 release of Rancher Desktop, an open source desktop application to bring Kubernetes and container management to Mac, Windows, and Linux. The release contains some feature changes a…

2022-01-26

Matan Shavit avatar
Matan Shavit

Hi there, hope this isn’t too simple, but I just started with Geodesic v0.149.1-debian on macOS Catalina (Intel processor), and when I bring up a geodesic container using the installed command, geodesic, my home folder is not mounted to /localhost and I don’t see any erros I have gogoled and don’t see a relevant solution yet, do you have any advice what to try? Thank you ver ymuch

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

How did you start geodesic?

Matan Shavit avatar
Matan Shavit

I used

docker run --rm cloudposse/geodesic:0.149.1-debian init | bash

I am using minikube as a docker server with hyperkit as the driver, if that is helpful

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

ok, so after doing that, it should install a wrapper script

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

then you ran the wrapper script?

Matan Shavit avatar
Matan Shavit

yes, geodesic? it installed to /usr/local/bin/geodesic

Matan Shavit avatar
Matan Shavit
Matan Shavit avatar
Matan Shavit

there were no errors running the wrapper script, but nothing in my home directory gets mounted to /localhost

Mike Crowe avatar
Mike Crowe

Start geodesic from your project folder, not your $HOME folder. I think because you fired it up from Users/matan, it only mapped the workdir. If you start from /Users/matan/terraform/tutorials (say where ~/terraform/tutorials is where you downloaded the CloudPosse tutorials repo, then you would see: • /Users/matan -> /localhost(workdir) -> ~/terraform/tutorials/ -> /localhost/terraform/tutorials (I think…)

Matan Shavit avatar
Matan Shavit

Good thought, trying

Matan Shavit avatar
Matan Shavit

Hm that resulted in a new message, it is red but I’m not sure it’s an error

Matan Shavit avatar
Matan Shavit
# No configured working directory is accessible:                                
#    GEODESIC_WORKDIR is ""
#    GEODESIC_HOST_CWD is "/Users/matan/projects/example"
# Defaulting initial working directory to "/conf"

 ✗ . [none] ~ ⨠ ls -a /localhost
.  ..  .aws  .geodesic

 ✗ . [none] ~ ⨠ ls -a /conf
.  ..  .aws  .emacs  .envrc  .gitconfig  .inputrc  .kube

2022-01-14

2022-01-13

Jeremy avatar
Jeremy

Am I missing it or does the latest default geodesic image not include atmos? I see the tutorial image added it in it’s Dockerfile. If that’s the case then I assume I just need to generate my own custom image.

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

this is what we do in Dockerfile

ARG VERSION=0.147.11
ARG OS=debian
ARG ATMOS_VERSION=1.3.17

FROM cloudposse/geodesic:$VERSION-$OS

# Install atmos (<https://github.com/cloudposse/atmos>)
ARG ATMOS_VERSION
RUN apt-get update && apt-get install -y atmos="${ATMOS_VERSION}-*"
Jeremy avatar
Jeremy

Okay so you do just build another image off the cloudposse/geodesic base image. Easy enough

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

yes we do

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

the Dockerfile is in each infrastructure repo

Jeremy avatar
Jeremy

oh okay… the infrastructure repo

Jeremy avatar
Jeremy

as in the archive *.cloudposse.co repos?

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

that’s very old. We usually create infrastructure repo with all the stacks and components in it, then in the Dockerfile we use the code above. Same structure as in https://github.com/cloudposse/atmos/tree/master/examples/complete + the Dockerfile

atmos/examples/complete at master · cloudposse/atmos attachment image

Universal Tool for DevOps and Cloud Automation (works with terraform, helm, helmfile, etc) - atmos/examples/complete at master · cloudposse/atmos

Jeremy avatar
Jeremy

yeah I thought I’d heard Erik say the *.cloudposse.co was old and used envdir that was no longer your recommended way. I hadn’t looked at geodesic or atmos previously until it was discussed during the office hours this week

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

we use both in all client engagements (atmos is lacking good docs, we are working on it)

Jeremy avatar
Jeremy

I liked the functionality with the first blush exposure during the zoom call. I’ve been looking at how to restructure my workflow going forward. I’d already been moving everything to Terraform and getting away from manual changes. Though I was still using Terraform Cloud for remote state

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
GitHub - cloudposse/tutorials attachment image

Contribute to cloudposse/tutorials development by creating an account on GitHub.

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

Some live tutorials here

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

these are more current

Jeremy avatar
Jeremy

@Erik Osterman (Cloud Posse) I was actually running through that repo and executing them and ran into issues with the AWS environment example and the s3-cdn module

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

can you share the error?

Jeremy avatar
Jeremy
03-first-aws-environment component/terraform/static-site fails to deploy · Issue #10 · cloudposse/tutorials attachment image

What When following along through the tutorial and executing atmos terraform deploy static-site –stack uw2-dev files with the following error message: Error: expected viewer_certificate.0.ssl_supp…

Jeremy avatar
Jeremy

the fix there allowed the plan to succeed and apply but the end result was not visible using the cloudfront distribution. I suspect due to changes in S3/cloudfront and the policy assigned via the s3-cdn module without extra values being set

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

aha, I think this is actually changes in the AWS provider

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
feat: add origin-shield by syphernl · Pull Request #207 · cloudposse/terraform-aws-cloudfront-s3-cdn attachment image

what Add variables to enable the Origin Shield for the CloudFront distribution why Using Origin Shield can help reduce the load on your origin. references https://registry.terraform.io/provide

Jeremy avatar
Jeremy

Yeah that’s possible

2022-01-12

Jeremy avatar
Jeremy

Checking out geodesic and running into a curious situation and not sure if someone else has already encountered it before and got a fix. My workstation is running Windows 10 Pro so I run Ubuntu 20.04 LTS under WSL2. I was impressed my ssh agent forwarding worked (Yubikey on Win 10 through to Linux WSL passed to geodesic); however the AWS config isn’t making it through. $HOME/.aws under WSL is actually a symlink back to the Windows user home directory and is where Leapp is putting the credentials so under geodesic that mount point doesn’t exist

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

I will say WSL has been difficult for us to support since we don’t use it ourselves. Support was contributed by multiple different community members.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
geodesic/wrapper at master · cloudposse/geodesic attachment image

Geodesic is a DevOps Linux Distro. We use it as a cloud automation shell. It&#39;s the fastest way to get up and running with a rock solid Open Source toolchain. ★ this repo! https://slack.cloud

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

If you look at this section, you’ll see some of the nasty hacks we had to do to figure out directory mounting on WSL

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

and the behavior changes with different versions of WSL

Jeremy avatar
Jeremy

I was digging into the geodesic script and saw some of the WSL mount bits. I tried executing the commands myself manually and they didn’t seem to behave as I think the script expected them to. Maybe those are WSL compatible and WSL2 is not. I’ll dig into it a bit more and if I find something put a PR together

Jeremy avatar
Jeremy

I found a solution, someone can tell me if it’s not the best but it seems to work. I just simply added export GEODESIC_DOCKER_EXTRA_ARGS="--volume /mnt:/mnt" to my WSL2 shell so it mounted the extra volume that points back to the Windows drives. Looking at lines commented above I determined it likely wouldn’t have worked on my workstation as my Windows home drive is on H: which is mounted as /mnt/h and the code never accounts for that. It does appear that changing L124 to use findmnt -S 'C:\' -t 9p -no target does find the /mnt path which the allows L126 to function but then L127 fails because it doesn’t have a path for cmd.exe. All that seemed for naught though as LOCAL_HOME was set so it never appeared to ender that elif block.

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

that seems like an elegant fix

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

let me run it by some WSLers

Jeremy avatar
Jeremy

A bit investigation, it looks like the WSL support that is in the wrapper is for WSL-1 and does not work with WSL-2. • $mount_path/c/Users/${windows_user_name}/AppData/Local/lxss/ does not exist with WSL-2 on L132 • On L39 the /LocalState/rootfs${HOME} path doesn’t exist. In my case the only thing under /LocalState/ is ext4.vhdx

Jeremy avatar
Jeremy

Also the way it’s written it would have only picked up Ubuntu WSL not any other like Debian

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

Yes, that sounds familiar

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

is WSL-1 EOL now?

Jeremy avatar
Jeremy

I don’t know if it’s EOL yet but WSL-2 is definitely the recommended as it provides a better environment overall. There are some things that still work easier between Windows and the WSL guest when using v1 vs v2.

Jeremy avatar
Jeremy

Biggest difference as I’m aware is that v1 was more of a Linux overlay running on Windows; while v2 is more of a full fledge virtual machine environment with it’s own boot kernel, etc

1

2022-01-07

2022-01-06

stephen avatar
stephen

Hey All

Atmos arrived in my inbox (great newsletter BTW) and it looks great but the readme looks like it’s not up to date. Is there somewhere else I can read through?

Andy Miguel (Cloud Posse) avatar
Andy Miguel (Cloud Posse)
Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

we are working on a new README now

stephen avatar
stephen

Thanks, will check back when you are done

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

thanks @stephen! yes, @Andriy Knysh (Cloud Posse) will have the updated readme soon. The public docs are pretty up to date though and we have a repo with examples as well https://github.com/cloudposse/tutorials

GitHub - cloudposse/tutorials attachment image

Contribute to cloudposse/tutorials development by creating an account on GitHub.

2022-01-05

rb avatar

@Mike Crowe would you be willing to share?

Mike Crowe avatar
Mike Crowe

I will, might need a few more days to get it polished

2

2022-01-02

rb avatar

Hello #geodesic :wave: - Love the work! New to Geodesic, not new to IaC, so forgive my n00b questions that have probably been asked and answered many times.

First, is there a recipe for the BindFS issue that may not be fully baked, but I could leverage for myself? I’ve working through the process of adding a user with the correct gid:uid and am having issues with the environment (e.g. bash: kube_ps1: command not found at every prompt) and am thinking that that route may be an anti-pattern, and that the BindFS solution could offer a more conformant, and simple path forward. But I don’t know. Which brings me to the second question: what is the best way to adapt Geodesic so it won’t step on my local permissions?

I’ve built several iterations of containerized tool delivery systems, and am dying to feel comfortable using Geodesic. But I have to know when and where a process is writing into my home directory without the correct bits, and Geodesic set off several alarms when I fired it up. I run Arch Linux and use Zsh as my default shell, if that makes a difference.

Anyway, I’m going to continue learning the tools on the assumption that I’ll figure permission bits later, hopefully with your help

Here’s my Dockerfile:

# syntax=docker/dockerfile:1

FROM cloudposse/geodesic:latest-debian

ENV PROMPT_STYLE="unicode"

RUN apt-get update -y && \
  groupadd -g 1234 rbellamy && \
  useradd -d /conf -G sudo -g rbellamy -u 1234 rbellamy && \
  sed -i 's/sudo[[:space:]]ALL=(ALL:ALL) ALL/sudo ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers

USER rbellamy
Files Written to Mounted Linux Home Directory Owned by Root User · Issue #594 · cloudposse/geodesic attachment image

what The user&#39;s shell inside Geodesic runs as root The script that launches Geodesic bind-mounts the host user&#39;s $HOME to /localhost to provide access to configuration files and allow for e…

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

For issue 594, @Mike Crowe has a potential fix

1
    keyboard_arrow_up