Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/cloudposse/geodesic

πŸš€ Geodesic is a DevOps Linux Toolbox in Docker
https://github.com/cloudposse/geodesic

alpine aws containers devops docker dockerfile ec2 elasticbeanstalk helm helmfile infrastructure-as-code infrastructure-management k8s kops kubectl kubernetes kubernetes-cluster shell terraform toolbox

Last synced: 22 days ago
JSON representation

πŸš€ Geodesic is a DevOps Linux Toolbox in Docker

Lists

README

        

Project Banner


Build StatusLatest ReleaseSlack CommunitySlack Archive

Geodesic is a robust Linux toolbox container, crafted to optimize DevOps workflows. This container comes fully loaded with all essential dependencies for a complete DevOps toolchain. It's designed to bring consistency and boost efficiency across development environments. It achieves this without the need for installing additional software on your workstation. Think of Geodesic as a containerized parallel to Vagrant, offering similar functionality within a Docker container context.

## Key Features

- **Unified Toolchain**: By packaging all necessary DevOps tools and dependencies, Geodesic eliminates the "works on my machine" problem, ensuring toolchain uniformity across different machines.
- **Consistent Environment**: Geodesic guarantees that every developer operates in a uniform OS environment with consistent tool versions, sidestepping discrepancies that often arise in diverse development setups.
- **Quick Start for New Developers**: It streamlines the onboarding process for new team members, allowing them to bypass lengthy workstation configurations and dive straight into productivity.
- **Cross-Platform Compatibility**: With native support for Mac OSX, Linux, and [Windows (via WSL)](https://docs.microsoft.com/en-us/windows/wsl/install-win10), Geodesic extends its versatile toolchain to a wide range of operating systems, ensuring broad accessibility and functionality.
- **Version Control for Tools**: Geodesic facilitates easy versioning of tools for different environments, enabling repeatable setups and minimizing compatibility issues.
- **Reusable Base Image for Toolboxes**: Empower teams to create and maintain consistent toolbox images, ensuring a standardized development environment across the board.

## Screenshots

Demo*
Example of running a shell based on the `cloudposse/geodesic` base docker image.*

---
> [!NOTE]
> This project is part of Cloud Posse's comprehensive ["SweetOps"](https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/geodesic&utm_content=) approach towards DevOps.
> Learn More
>
> It's 100% Open Source and licensed under the [APACHE2](LICENSE).
>
>

## Introduction

These days, the typical software application is distributed as a docker image and run as a container. Why should infrastructure be any different? Since everything we write is "Infrastructure as Code", we believe that it should be treated the same way. This is the "Geodesic Way". Use containers+envs instead of unconventional wrappers, complicated folder structures and symlink hacks. Geodesic is the container for all your infrastructure automation needs that enables you to truly achieve SweetOps.

Geodesic is best used in one of these two ways:

1. **Interactive Shell** It is optimized to work as an interactive command-line shell. The shell includes the *ultimate* mashup of cloud orchestration tools all distributed through our [packages](https://github.com/cloudposse/packages). Installation of the shell is as easy as running a docker container or using it as a base image for your own Docker toolbox.
2. **Docker Base Image** You can create your own `Dockerfile` and use `cloudposse/geodesic` as the base image. This way you can rapidly bring up consistent toolboxes.

An organization may chose to leverage all of these components, or just the parts that make their life easier.

We recommend starting by using `geodesic` as a Docker base image (e.g. `FROM cloudposse/geodesic:...` pinned to a release and base OS) in your projects.

> [!IMPORTANT]
> **Note**: Starting with Geodesic 2.0, we distribute Geodesic as a multi-platform (`linux/amd64`, `linux/arm64`) Debian-based Docker image and a single-platform (`linux/amd64`) Alpine-based image.
> We recommend the Debian-based image; consequently the `cloudposse/geodesic:latest` Docker image tag now points to it. (Previously `cloudposse/geodesic:latest` referred to the Alpine image.)
> The Alpine version is deprecated and we make no promises about future support for it.

### What’s New in Geodesic 2.0

Geodesic 2.0 introduces support for Apple Silicon (M1 and later chips), and prioritizes Debian over Alpine as the base OS.
Users new to Geodesic should use the Debian-based version and existing users of the Alpine-based image should switch to
the Debian-based image as soon as is convenient. They each have nearly all the same tools pre-installed, so switching
is mainly a matter of updating how you customize it, replacing Alpine packages with Debian packages.

In order for a tool to be included in Geodesic 2.0, it must be available as both a `linux/amd64` and `linux/arm64` binary.
(In exceptional cases, if a tool is written in the `go` language and distributes source code only, Cloud Posse may build the needed binaries.)
A few tools that were in Geodesic 1.0 had not yet been updated to provide `linux/arm64` binaries and were omitted from Geodesic 2.0.
(See the Geodesic 2.0 [Release Notes](https://github.com/cloudposse/geodesic/releases/tag/2.0.0)
for details on which tools were removed.)

### Docker Tags and Their Evolution

Geodesic Docker images are tagged with `VERSION-BASE_OS`, e.g. `2.0.0-debian` or `2.0.0-alpine`.
The `latest` tag points to the latest Debian-based image, although we recommend pinning to a specific version.

- Prior to Geodesic 2.0, the `latest` tag pointed to the latest Alpine-based image.
- Prior to Geodesic 0.138.0, all Docker images were based on Alpine only and simply tagged `VERSION`.

Want to learn more? [Check out our getting started with Geodesic guide!](https://docs.cloudposse.com/tutorials/geodesic-getting-started/)

## Usage

### Quickstart

#### docker run

Launching Gedoesic is a bit complex, so we recommend you install a launch script by running
```
docker run --rm cloudposse/geodesic:latest-debian init | bash
```
After that, you should be able to launch Geodesic just by typing
```
geodesic
```

### Customizing your Docker image

In general we recommend creating a customized version of Geodesic by creating your own `Dockerfile` starting with
```
ARG VERSION=2.0.0
ARG OS=debian
FROM cloudposse/geodesic:$VERSION-$OS

# Add configuration options such as setting a custom BANNER,
# setting the initial AWS_PROFILE and AWS_DEFAULT_REGION, etc. here

ENV BANNER="my-custom-geodesic"
```

You can see some example configuration options to include in [Dockerfile.options](./Dockerfile.options).

#### Multi-platform gotchas

Although the Geodesic base image is provided in 2 architectures, when you do a local build
of your custom image, it will, by default, only be built for the architecture of the machine you are building on.
This is fine until you want to share it. You need to be aware that if you push just the image you
built with `docker build` you will only be supporting a single architecture. You should use `docker buildx`
to build a multi-platform image and push it to a Docker repository for sharing.

If you intend to support both architectures, you need to be sure that any customizations
you install are properly installed for both architectures. Package managers handle this for you
automatically, but if you are downloading files directly, you need to be careful to select the right one.
See the use of `TARGETARCH` in [Dockerfile.debian](./os/debian/Dockerfile.debian) for some examples.

#### Adding packages

You can also add extra commands by installing "packages". Both Debian and Alpine have a large selection
of packages to choose from. Cloud Posse also provides a large set of packages for installing common DevOps commands
and utilities via [cloudposse/packages](https://github.com/cloudposse/packages), but `linux/arm64` packages
are only provided for Debian, not Alpine. The package repositories are pre-installed in Geodesic,
all you need to do is add the packages you want via `RUN` commands in your Dockerfile. Debian
will automatically select the correct architecture for the package.

#### Installing packages in Debian

Debian uses [`apt`](https://wiki.debian.org/Apt) for package management and we generally recommend using
the [`apt-get`](https://www.debian.org/doc/manuals/apt-guide/ch2.en.html) command to install packages.
In addition to the default repositories, Geodesic pre-installs the Cloud Posse [package](https://github.com/cloudposse/packages) repository
and the Google Cloud SDK package repository. Unlike with `apk`, you do not need to specify a package repository when
installing a package because all repositories will be searched for it.
Also unlike `apk`, `apt-get` does not let you specify a version range on the command line, but they do
allow wildcards. Package versions include a release number (typically "1") at the end, to allow for
updated packages when there is a bug in the package itself. Therefore, best practice is to use a wildcard
for the release number when specifying a package version. For example,
to install the Google Cloud SDK at a version 300.0.0:

```
RUN apt-get update && apt-get install -y google-cloud-sdk="300.0.0-*"
```

Note the `-y` flag to `apt-get install`. That is required for scripted installation, otherwise the command
will ask for confirmation from the keyboard before installing a package.

#### Installing packages in Alpine

Under Alpine, you install a package by specifying a package name and a repository label (if not the default repository).
(You can also specify a version, see [the Alpine documentation](https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Advanced_APK_Usage)
for details). In addition to the default package repository, Geodesic installs 3 others:

| Repository Label | Repository Name|
|------------------|----------------|
| @testing | edge/testing |
| @community | edge/community |
| @cloudposse | cloudposse/packages |

As always, because of Docker layer caching, you should start your command line by updating the repo indexes,
and then add your packages. Alpine uses [`apk`](https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management).
So, to install [Teleport](https://gravitational.com/teleport) support from the Cloud Posse package repository,
pinned to version 4.2.x (which is the last to support Alpine), we can add this to our Dockerfile:

```
RUN apk update && apk add -u teleport@cloudposse=~4.2
```

### Customizing your shell at launch time

After you have built your Docker image, or if you are using a shared Docker image, you can
add further customization at launch time. When Geodesic starts up, it looks for customization
scripts and configuration so you can do things like add command aliases or override preconfigured options.
Detailed information about launch-time configuration is in the [customization](./docs/customization.md)
document, available from within the shell via `man customization`.

## Related Projects

Check out these related projects.

- [Packages](https://github.com/cloudposse/packages) - Cloud Posse installer and distribution of native apps
- [Build Harness](https://github.com/cloudposse/dev) - Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more
- [terraform-aws-components](https://github.com/cloudposse/terraform-aws-components) - Catalog of reusable Terraform components and blueprints for provisioning reference architectures

## ✨ Contributing

This project is under active development, and we encourage contributions from our community.
Many thanks to our outstanding contributors:



### πŸ› Bug Reports & Feature Requests

Please use the [issue tracker](https://github.com/cloudposse/geodesic/issues) to report any bugs or file feature requests.

### πŸ’» Developing

If you are interested in being a contributor and want to get involved in developing this project or help out with Cloud Posse's other projects, we would love to hear from you!
Hit us up in [Slack](https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/geodesic&utm_content=slack), in the `#cloudposse` channel.

In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
1. Review our [Code of Conduct](https://github.com/cloudposse/geodesic/?tab=coc-ov-file#code-of-conduct) and [Contributor Guidelines](https://github.com/cloudposse/.github/blob/main/CONTRIBUTING.md).
2. **Fork** the repo on GitHub
3. **Clone** the project to your own machine
4. **Commit** changes to your own branch
5. **Push** your work back up to your fork
6. Submit a **Pull Request** so that we can review your changes

**NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request!

### 🌎 Slack Community

Join our [Open Source Community](https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/geodesic&utm_content=slack) on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.

### πŸ“° Newsletter

Sign up for [our newsletter](https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/geodesic&utm_content=newsletter) and join 3,000+ DevOps engineers, CTOs, and founders who get insider access to the latest DevOps trends, so you can always stay in the know.
Dropped straight into your Inbox every week β€” and usually a 5-minute read.

### πŸ“† Office Hours

[Join us every Wednesday via Zoom](https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/geodesic&utm_content=office_hours) for your weekly dose of insider DevOps trends, AWS news and Terraform insights, all sourced from our SweetOps community, plus a _live Q&A_ that you can’t find anywhere else.
It's **FREE** for everyone!

## About

This project is maintained by Cloud Posse, LLC.

We are a [**DevOps Accelerator**](https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/geodesic&utm_content=commercial_support) for funded startups and enterprises.
Use our ready-to-go terraform architecture blueprints for AWS to get up and running quickly.
We build it with you. You own everything. Your team wins. Plus, we stick around until you succeed.

Learn More

*Your team can operate like a pro today.*

Ensure that your team succeeds by using our proven process and turnkey blueprints. Plus, we stick around until you succeed.

πŸ“š See What's Included

- **Reference Architecture.** You'll get everything you need from the ground up built using 100% infrastructure as code.
- **Deployment Strategy.** You'll have a battle-tested deployment strategy using GitHub Actions that's automated and repeatable.
- **Site Reliability Engineering.** You'll have total visibility into your apps and microservices.
- **Security Baseline.** You'll have built-in governance with accountability and audit logs for all changes.
- **GitOps.** You'll be able to operate your infrastructure via Pull Requests.
- **Training.** You'll receive hands-on training so your team can operate what we build.
- **Questions.** You'll have a direct line of communication between our teams via a Shared Slack channel.
- **Troubleshooting.** You'll get help to triage when things aren't working.
- **Code Reviews.** You'll receive constructive feedback on Pull Requests.
- **Bug Fixes.** We'll rapidly work with you to fix any bugs in our projects.


## License

License

Preamble to the Apache License, Version 2.0




Complete license is available in the [`LICENSE`](LICENSE) file.
```text
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
```

## Trademarks

All other trademarks referenced herein are the property of their respective owners.
---
Copyright Β© 2017-2024 [Cloud Posse, LLC](https://cpco.io/copyright)

README footer

Beacon