From 47ff51a9909af6edfba28007a75dcfdf8192e76c Mon Sep 17 00:00:00 2001 From: Tung Leo Date: Sun, 17 Mar 2024 13:28:43 +0700 Subject: [PATCH 1/2] doc: add awscli usage --- docs/usage/README.md | 4 +++ docs/usage/awscli_usage.md | 59 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 docs/usage/awscli_usage.md diff --git a/docs/usage/README.md b/docs/usage/README.md index c70bb23..519e133 100644 --- a/docs/usage/README.md +++ b/docs/usage/README.md @@ -22,6 +22,10 @@ This guide us how to use the `devops-toolkit` with serveral usecases - Check [**helm_usage**](./helm_usage.md) +## AWSCli + +- Check [**awscli_usage**](./awscli_usage.md) + ## Troubleshooting - For any issues, check [this document](../troubleshooting/TROUBLESHOOTING.md) diff --git a/docs/usage/awscli_usage.md b/docs/usage/awscli_usage.md new file mode 100644 index 0000000..ac9eafa --- /dev/null +++ b/docs/usage/awscli_usage.md @@ -0,0 +1,59 @@ +# Use awscli in the devops-toolkit + +## Prerequisite + +An AWS account + +## awscli document + +Some document to help you start with awscli + +- +- + +## Note + +To use the existing container instead of creating one, use `docker exec` command instead of `docker run` + +```bash +docker exec -it my_devops_toolkit /bin/bash +``` + +## Use case 1: Configure credentials and list S3 bucket with awscli + +```bash +docker run --rm --network host -it devops-toolkit:latest +############################################### +# Now we are in the docker container terminal # +############################################### +# Configure credentials +aws configure +# List S3 buckets +aws s3 ls +``` + +Sample Result + +```bash +root@docker-desktop:~# aws configure +AWS Access Key ID [None]: xxxxxxxx +AWS Secret Access Key [None]: xxxxxxxx +Default region name [None]: xxxxxxxx +Default output format [None]: xxxxxxxx + + +``` + +## Use case 2: Using AWS config from the host + +Mount the `.aws` when running toolkit container + +```bash +docker run --rm --network host -it -v ~/.aws:/root/.aws devops-toolkit:latest +# List bucket +aws s3 ls +``` + +## Troubleshooting + +- For any issues, check [this reference](../troubleshooting/TROUBLESHOOTING.md) From e92323e6d542c8a14fd94392e1714df750eaf432 Mon Sep 17 00:00:00 2001 From: Tung Leo Date: Sun, 17 Mar 2024 13:31:25 +0700 Subject: [PATCH 2/2] doc: add awscli usage.v1 --- docs/usage/awscli_usage.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/usage/awscli_usage.md b/docs/usage/awscli_usage.md index ac9eafa..3a1dd53 100644 --- a/docs/usage/awscli_usage.md +++ b/docs/usage/awscli_usage.md @@ -8,7 +8,7 @@ An AWS account Some document to help you start with awscli -- +- - ## Note @@ -40,8 +40,6 @@ AWS Access Key ID [None]: xxxxxxxx AWS Secret Access Key [None]: xxxxxxxx Default region name [None]: xxxxxxxx Default output format [None]: xxxxxxxx - - ``` ## Use case 2: Using AWS config from the host