Skip to content

Commit

Permalink
update dockerfile entrypoint and readme (#30)
Browse files Browse the repository at this point in the history
* fix(docker): entrypoint on Dockerfile

* docs: improve readme default docs

* docs(readme): improvements
  • Loading branch information
ekristen committed Jan 30, 2024
1 parent 2455a7b commit bd40150
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 57 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ RUN \
go build -o bin/aws-nuke main.go

FROM base AS goreleaser
ENTRYPOINT ["/usr/local/bin/aws-nuke"]
COPY aws-nuke /usr/local/bin/aws-nuke
USER aws-nuke

FROM base
ENTRYPOINT ["/usr/local/bin/aws-nuke"]
COPY --from=build /src/bin/aws-nuke /usr/local/bin/aws-nuke
USER aws-nuke
84 changes: 27 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/ekristen/aws-nuke)](https://goreportcard.com/report/github.com/ekristen/aws-nuke)
[![Maintainability](https://api.codeclimate.com/v1/badges/bf05fb12c69f1ea7f257/maintainability)](https://codeclimate.com/github/ekristen/aws-nuke/maintainability)

**Forked from [rebuy-de/aws-nuke](https://github.com/rebuy-de/aws-nuke)**

## Overview

Remove all resources from an AWS account.
Expand All @@ -16,8 +14,9 @@ resources and create a Pull Request or to create an [Issue](https://github.com/e

## Documentation

All documentation is in the [docs/](docs/) directory and is built using [MkDocs](https://www.mkdocs.org/). However,
all the documentation is hosted at [https://ekristen.github.io/aws-nuke/](https://ekristen.github.io/aws-nuke/).
All documentation is in the [docs/](docs) directory and is built using [Material for Mkdocs](https://squidfunk.github.io/mkdocs-material/).

It is hosted at [https://ekristen.github.io/aws-nuke/](https://ekristen.github.io/aws-nuke/).

## History of this Fork

Expand All @@ -34,72 +33,43 @@ Azure, but I didn't want to have to maintain multiple copies of the same code, s
[libnuke](https://github.com/ekristen/libnuke) to abstract all the code that was common between the two tools and write
proper unit tests for it.

## Attribution, License, and Copyright

The rewrite of this tool to use [libnuke](https://github.com/ekristen/libnuke) would not have been posssible without the
hard work that came before me on the original tool by the team and contributors over at [rebuy-de](https://github.com/rebuy-de)
and their original work on [rebuy-de/aws-nuke](https://github.com/rebuy-de/aws-nuke).

This tool is licensed under the MIT license. See the [LICENSE](LICENSE) file for more information. The bulk of this
tool was rewritten to use [libnuke](https://github.com/ekristen/libnuke) which was in part originally sourced from
[rebuy-de/aws-nuke](https://github.com/rebuy-de/aws-nuke).

## Contribute

You can contribute to *aws-nuke* by forking this repository, making your changes and creating a Pull Request against
this repository. If you are unsure how to solve a problem or have other questions about a contributions, please create
a GitHub issue.

## Version 3

Version 3 is a rewrite of this tool using [libnuke](https://github.com/ekristen/libnuke) with a focus on improving a
number of the outstanding things that I couldn't get done with the original project without separating out the core
code into a library.
Version 3 is a rewrite of this tool using [libnuke](https://github.com/ekristen/libnuke) with a focus on improving a number of the outstanding things
that I couldn't get done with the original project without separating out the core code into a library. See Goals
below for more.

### Changes

- The root command will result in help now on v3, the primary nuke command moved to `nuke`.
- CloudFormation Stacks now support a hold and wait for parent deletion process.
- Nested CloudFormation Stacks are now eligible for deletion and no longer omitted.
- The root command will result in help now on v3, the primary nuke command moved to `nuke`. **Breaking**
- CloudFormation Stacks now support a hold and wait for parent deletion process. **Quasi-Breaking**
- Nested CloudFormation Stacks are now eligible for deletion and no longer omitted. **Quasi-Breaking**
- The entire resource lister format has changed and requires a struct.
- Context is passed throughout the entire library now, including the listing function and the removal function.
- This is in preparation for supporting AWS SDK Go v2

### Goals

- Adding additional tests
- Adding additional resources
- Adding Documentation for adding resources and using the tool
- Adding documentation for adding resources and using the tool
- Consider adding DAG for dependencies between resource types and individual resources
- This will improve the process of deleting resources that have dependencies on other resources and reduce
errors and unnecessary API calls.

## Documentation

The project is built to have the documentation right alongside the code in the `docs/` directory leveraging
[Material for Mkdocs](https://squidfunk.github.io/mkdocs-material/)

In the root of the project exists mkdocs.yml which drives the configuration for the documentation.

This README.md is currently copied to `docs/index.md` and the documentation is automatically published to the GitHub
pages location for this repository using a GitHub Action workflow. It does not use the `gh-pages` branch.


## Use Cases

- We are testing our [Terraform](https://www.terraform.io/) code with Jenkins. Sometimes a Terraform run fails during development and
messes up the account. With *aws-nuke* we can simply clean up the failed account, so it can be reused for the next
build.
- Our platform developers have their own AWS Accounts where they can create their own Kubernetes clusters for testing
purposes. With *aws-nuke* it is very easy to clean up these account at the end of the day and keep the costs low.


### Feature Flags

There are some features, which are quite opinionated. To make those work for
everyone, *aws-nuke* has flags to manually enable those features. These can be
configured on the root-level of the config, like this:

```yaml
---
feature-flags:
disable-deletion-protection:
RDSInstance: true
EC2Instance: true
CloudformationStack: true
force-delete-lightsail-addons: true
```
## Contact Channels
For now GitHub issues, may open a Slack or Discord if warranted.
## Contribute
You can contribute to *aws-nuke* by forking this repository, making your
changes and creating a Pull Request against our repository. If you are unsure
how to solve a problem or have other questions about a contributions, please
create a GitHub issue.

0 comments on commit bd40150

Please sign in to comment.