This repository has been archived by the owner on Apr 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f86aa61
commit 87b5ad3
Showing
2 changed files
with
83 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 |
---|---|---|
|
@@ -16,3 +16,6 @@ clean: | |
|
||
lint: | ||
golangci-lint run | ||
|
||
test: | ||
go test -v ./... |
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 |
---|---|---|
@@ -1,10 +1,90 @@ | ||
# ECS Toolkit | ||
|
||
## Configuration | ||
|
||
### AWS Credentials | ||
|
||
The AWS SDK used internally uses its default credential chain to find AWS | ||
credentials. The SDK detects and uses the built-in providers automatically, | ||
without requiring manual configuration. For example, if you use IAM roles for | ||
Amazon EC2 instances, it automatically use the instance’s credentials. For more | ||
information on setting up AWS credentials, see "[Configuring the AWS | ||
CLI][aws-configuration-cli]" and "[Configuring the AWS SDK for Go | ||
V2][aws-configuration-sdk]". | ||
|
||
### Config File | ||
|
||
The config file for an application would look like what you see below: | ||
|
||
```yaml | ||
--- | ||
version: v1 | ||
cluster: <name of cluster> | ||
tasks: | ||
- name: <task-definition-1-name> | ||
containers: | ||
- <container-1-name> | ||
- name: <task-definition-2-name> | ||
containers: | ||
- <container-1-name> | ||
- <container-2-name> | ||
# add as many containers as needed | ||
# add as many tasks as needed | ||
services: | ||
- name: <service-1-name> | ||
containers: | ||
- <container-1-name> | ||
- name: <service-2-name> | ||
containers: | ||
- <container-1-name> | ||
- name: <service-3-name> | ||
containers: | ||
- <container-1-name> | ||
# add as many services as needed | ||
``` | ||
|
||
## Usage | ||
|
||
By default, the tool will use the config file located at `.ecs-toolkit.yml` but | ||
you can specify an alternative using the `--config` flag. With that, it's easy | ||
to deploy your application using the `deploy` command: | ||
|
||
```console | ||
$ ecs-toolkit -l debug deploy --image-tag=49779134ca1dcef21f0b5123d3d5c2f4f47da650 | ||
``` | ||
|
||
## Development | ||
|
||
Below instructions are only necessary if you intend to work on the source code. | ||
For normal usage the above instructions should do. | ||
|
||
### Requirements | ||
|
||
1. Ensure that you have a [properly configured][golang-quickstart] Go workspace. | ||
|
||
### Building | ||
|
||
1. Clone the repository. | ||
2. Fetch the dependencies with `go get -v github.com/shipatlas/ecs-toolkit`. | ||
4. Install application dependencies via `make dependencies` (they'll be placed | ||
in `./vendor`). | ||
5. Build and install the binary with `make build`. | ||
6. Run the command e.g. `./bin/ecs-toolkit help` as a basic test. | ||
|
||
### Testing | ||
|
||
1. Install the `golangci-lint`, [see instructions here][golangci-lint-install]. | ||
2. Run linter using `make lint` and test using `make test`. | ||
|
||
## License | ||
|
||
[ShipAtlas][shipatlas] © 2022. The [MIT License bundled therein][license] is a | ||
permissive license that is short and to the point. It lets people do anything | ||
they want as long as they provide attribution and waive liability. | ||
|
||
[aws-configuration-cli]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html | ||
[aws-configuration-sdk]: https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/ | ||
[golang-quickstart]: https://go.dev/doc/tutorial/getting-started | ||
[golangci-lint-install]: https://golangci-lint.run/usage/install/ | ||
[license]: https://raw.githubusercontent.com/shipatlas/ecs-toolkit/main/LICENSE | ||
[shipatlas]: https://www.shipatlas.dev |