-
-
Notifications
You must be signed in to change notification settings - Fork 121
/
README.yaml
261 lines (201 loc) · 14.7 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
name: Geodesic
license: APACHE2
github_repo: cloudposse/geodesic
# Badges to display
badges:
- name: "Build Status"
image: "https://github.com/cloudposse/geodesic/workflows/docker/badge.svg"
url: "https://github.com/cloudposse/geodesic/actions?query=workflow%3Adocker"
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/geodesic.svg"
url: "https://github.com/cloudposse/geodesic/releases/latest"
- name: "Slack Community"
image: "https://slack.cloudposse.com/badge.svg"
url: "https://slack.cloudposse.com"
- name: "Slack Archive"
image: "https://img.shields.io/badge/slack-archive-blue.svg"
url: "https://archive.sweetops.com/geodesic"
# Screenshots
screenshots:
- name: "Demo"
description: "<br/>Example of running a shell based on the `cloudposse/geodesic` base docker image."
url: "docs/demo.gif"
related:
- name: "Atmos"
description: "Cloud Posse's FOSS DevOps Automation Tool"
url: "https://atmos.tools/"
- name: "Packages"
description: "Cloud Posse installer and distribution of native apps"
url: "https://github.com/cloudposse/packages"
- name: "terraform-aws-components"
description: "Catalog of reusable Terraform components and blueprints for provisioning reference architectures"
url: "https://github.com/cloudposse/terraform-aws-components"
description: |-
Geodesic is a robust Linux toolbox container, crafted to optimize DevOps workflows.
This container comes loaded with essential dependencies for a 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.
Although Geodesic is packed with essentials, it is designed to be extended and customized to suit your specific needs.
Create your own Dockerfile based on Geodesic and add your favorite tools to the mix.
Then share the resulting container with everyone on your team to ensure everyone is working in the same environment.
<img align=right src="docs/geodesic-small.png">
## 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.
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 a powerful set of tools for the DevOps practitioner, with many more available 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, all you need to add are the few of your favorite tools not already installed, and then you have a consistent toolbox for everyone to share.
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 3.0, we distribute Geodesic as a multi-platform (`linux/amd64`, `linux/arm64`) Debian-based Docker image only.
> We no longer publish an Alpine version, but continue to include the `debian` labels for compatibility. As with Geodesic 2.0, the `latest` tag points to the Debian image.
>
> Starting with Geodesic 2.0, we distributed Geodesic as a multi-platform (`linux/amd64`, `linux/arm64`) Debian-based Docker image and a single-platform (`linux/amd64`) Alpine-based image.
> We moved the `cloudposse/geodesic:latest` Docker image tag from the Alpine version to the Debian version at that time.
### What’s Changed in Geodesic 3.0
Rather than bringing new features, Geodesic 3.0 is focused on slimming down the Docker image and removing outdated tools.
Geodesic 3.0 is approximately half the size of Geodesic 2.10!
See the [v3.0.0 release notes](https://github.com/cloudposse/geodesic/releases/tag/3.0.0)
for details on what was removed, but for most users, we expect the impact to be minimal.
This release is intended to set the stage for future improvements, so although we cannot announce a time frame,
be on the lookout for Geodesic 4.0, which will bring many long-requested new features.
Want to learn more? [Check out our getting started with Geodesic guide!](https://docs.cloudposse.com/tutorials/geodesic-getting-started/)
#### Alpine and Terraform dropped
The biggest impacts are that the Alpine-based image has been dropped, and Terraform has been replaced with OpenTofu.
- OpenTofu is installed as a `terraform` alternative using the [Debian alternatives system](https://wiki.debian.org/DebianAlternatives),
so `terraform` commands will still work without modification.
- We have been encouraging users to switch from Alpine to Debian for years, so we hope most people have already done so.
For the rest, switching to Debian should be straightforward, and brings the added advantage of support for Apple Silicon.
#### Highlights from Geodesic 2.11
Since the release of Geodesic 2.0, we have been continuing to improve the Geodesic experience.
- We have added preliminary support for "dark mode" terminals. Your terminal mode should be detected automatically,
but you can force it by running `update-terminal-mode {dark|light}`.
- The `GEODESIC_TF_PROMPT_ENABLED` environment variable has been revived. Set it to `true` and when in a Terraform
or Tofu directory, the prompt will display the currently selected workspace. (We had, for a time, incorrectly suggested
you control this feature via `GEODESIC_TF_PROMPT_ACTIVE`. That environment variable is for internal use and you should
never set 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`.
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
```
# We always recommend pinning versions to avoid surprises and breaking changes.
# We put the version up top here so it is easy to find and update.
# Find the latest version at https://github.com/cloudposse/geodesic/releases
ARG VERSION=3.0.0
# If you don't want to bothered with updating the version, you can use `latest` instead,
# but keep in mind that as long as you have a local image with the `latest` tag,
# it will not be updated by `docker run`. You will have to explicitly pull the latest image.
# ARG VERSION=latest
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.
#### Installing extra packages
You can also add extra commands by installing "packages".
- Debian has 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).
- Google Cloud provides a set of packages for working with GCP
- OpenTofu provides a packge for installing it, too.
Those package repositories are pre-installed in Geodesic, so
all you need to do is add the packages you want via
```Dockerfile
RUN apt-get update && apt-get install -y` commands in your Dockerfile.
```
The package manager will automatically select the correct architecture for the package.
#### Pinning package versions 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.
However, `apt-get` does not let you specify a version range on the command line, but it does
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:
```dockerfile
RUN apt-get update && apt-get install -y google-cloud-sdk="400.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.
Unfortunately, OpenTofu does not follow this convention, so you will need to specify the exact version number
(only) when installing OpenTofu. For example, to install OpenTofu version 1.6.2:
```dockerfile
RUN apt-get update && apt-get install -y tofu=1.6.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`.
# Other files to include in this README from the project folder
include: []
# Contributors to this project
contributors:
- name: "Erik Osterman"
homepage: "https://github.com/osterman"
avatar: "http://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144"
github: "osterman"
- name: "Igor Rodionov"
homepage: "https://github.com/goruha/"
avatar: "http://s.gravatar.com/avatar/bc70834d32ed4517568a1feb0b9be7e2?s=144"
github: "goruha"
- name: "Andriy Knysh"
homepage: "https://github.com/aknysh/"
avatar: "https://avatars0.githubusercontent.com/u/7356997?v=4&u=ed9ce1c9151d552d985bdf5546772e14ef7ab617&s=144"
github: "aknysh"
- name: "Sarkis Varozian"
homepage: "https://github.com/sarkis"
avatar: "https://avatars3.githubusercontent.com/u/42673?s=144&v=4"
github: "sarkis"
- name: "Oscar Sullivan"
homepage: "https://github.com/osulli"
avatar: "https://github.com/osulli.png?size=150"
github: "osulli"