-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial public release of ssm-helpers tools
- Loading branch information
0 parents
commit 4615e8d
Showing
20 changed files
with
1,307 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Set up Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.x | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v1 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist/* | ||
cmd/ssm-run/ssm-run | ||
cmd/ssm-session/ssm-session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
release: | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- id: ssm-run | ||
main: ./cmd/ssm-run/main.go | ||
binary: ssm-run | ||
goos: | ||
- windows | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
env: | ||
- CGO_ENABLED=0 | ||
- id: ssm-session | ||
main: ./cmd/ssm-session/main.go | ||
binary: ssm-session | ||
goos: | ||
- windows | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
env: | ||
- CGO_ENABLED=0 | ||
|
||
archives: | ||
- builds: | ||
- ssm-run | ||
- ssm-session | ||
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
amd64: x86_64 | ||
format: tar.gz | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
#brews: | ||
# - github: | ||
# owner: disneystreaming | ||
# name: homebrew-ssm-helpers | ||
# homepage: "https://github.com/disneystreaming/ssm-helpers" | ||
# description: "Help manage systems with AWS Systems Manager with management helpers." | ||
# dependencies: | ||
# - awscli | ||
# | ||
#dockers: | ||
# - binaries: | ||
# - ssm-run | ||
# goos: linux | ||
# dockerfile: Dockerfile.ssm-run | ||
# image_templates: | ||
# - "disneystreaming/ssm-run:latest" | ||
# - "disneystreaming/ssm-run:{{ .Tag }}" | ||
# - "disneystreaming/ssm-run:{{ .Major }}" | ||
# - "disneystreaming/ssm-run:{{ .Major }}.{{ .Minor }}" | ||
# - binaries: | ||
# - ssm-session | ||
# goos: linux | ||
# dockerfile: Dockerfile.ssm-session | ||
# image_templates: | ||
# - "disneystreaming/ssm-session:latest" | ||
# - "disneystreaming/ssm-session:{{ .Tag }}" | ||
# - "disneystreaming/ssm-session:{{ .Major }}" | ||
# - "disneystreaming/ssm-session:{{ .Major }}.{{ .Minor }}" | ||
|
||
nfpms: | ||
- license: MIT | ||
maintainer: Disney Streaming Services | ||
description: Helper tools for AWS Systems Manager. | ||
homepage: https://github.com/disneystreaming/ssm-helpers | ||
suggests: | ||
- awscli | ||
- session-manager-plugin | ||
formats: | ||
- rpm | ||
- deb | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM scratch | ||
COPY ssm-run / | ||
ENTRYPOINT ["/ssm-run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM debian:10-slim as downloader | ||
|
||
RUN apt update && apt install -y \ | ||
ca-certificates \ | ||
curl \ | ||
python \ | ||
python-pip \ | ||
python-setuptools | ||
|
||
# Extract the session-manager-plugin | ||
RUN pip install awscli --upgrade --user \ | ||
&& curl -L "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "session-manager-plugin.deb" \ | ||
&& dpkg -x session-manager-plugin.deb /tmp | ||
|
||
FROM debian:10-slim | ||
|
||
RUN apt update && apt install -y \ | ||
python \ | ||
ca-certificates \ | ||
jq \ | ||
locales \ | ||
tmux \ | ||
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ | ||
&& locale-gen | ||
|
||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 | ||
|
||
COPY --from=downloader /root/.local/lib /root/.local/lib | ||
COPY --from=downloader /root/.local/bin/aws /usr/local/bin/aws | ||
COPY --from=downloader /tmp/usr/local/sessionmanagerplugin/bin/session-manager-plugin /usr/local/sessionmanagerplugin/bin/session-manager-plugin | ||
RUN ln -s /usr/local/sessionmanagerplugin/bin/session-manager-plugin /usr/local/bin/session-manager-plugin | ||
|
||
COPY ssm-session /usr/local/bin/ssm-session | ||
|
||
ENTRYPOINT ["/usr/local/bin/ssm-session"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# SSM Helpers | ||
|
||
Helpers to manage you systems with [AWS Systems Manager](https://aws.amazon.com/systems-manager/) suite of management tools. | ||
|
||
![](/img/ssm-helpers.gif) | ||
|
||
## Tools in this repo | ||
|
||
* [`ssm-session`](cmd/ssm-session/README.md) - Interactive shell with an instance via AWS Systems Manager Session Manager (`ssh` and `cssh` replacement) | ||
* [`ssm-run`](cmd/ssm-run/README.md) - Run a command on multiple instances based on instance tags or names (`mco` and `knife` replacement) | ||
|
||
If you would like more information about the tools, see the README for each in `./cmd/<tool-name>/`. | ||
|
||
## Install | ||
|
||
![goreleaser](https://github.com/disneystreaming/ssm-helpers/workflows/goreleaser/badge.svg) | ||
|
||
### Homebrew | ||
|
||
Install the tools via homebrew with | ||
|
||
``` | ||
brew tap disneystreaming/ssm-helpers | ||
brew install ssm-helpers | ||
``` | ||
|
||
For more information on Homebrew taps please see the [tap documentation](https://docs.brew.sh/Taps) | ||
|
||
### Manually | ||
|
||
You can find tagged releases for Windows, macOS, and Linux on the [releases page](https://github.com/disneystreaming/ssm-helpers) | ||
|
||
### Latest from master | ||
|
||
To install the packages from git you can install them individually via: | ||
|
||
``` | ||
go get github.com/disneystreaming/cmd/ssm-session | ||
go get github.com/disneystreaming/cmd/ssm-run | ||
``` | ||
|
||
## Build | ||
|
||
``` | ||
go build -o ssm-run ./cmd/ssm-run/main.go | ||
go build -o ssm-session ./cmd/ssm-session/main.go | ||
``` |
Oops, something went wrong.