From f54f042c420514d0867bee8eb7f14aa1141d48f6 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 31 Aug 2024 17:44:10 +0700 Subject: [PATCH 01/10] Update document --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f8ca9ff..f437664 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ ## Getting Started -Use the provided execution script simplifies setup, execution and managing DevOps Toolkit. +The provided execution script `devops-toolkit-cli` simplifies the setup, execution, and management of the DevOps Toolkit. ### 1. Install @@ -63,9 +63,9 @@ devops-toolkit-cli shell - For more commands, use `devops-toolkit-cli help`. -## Use DevOps Toolkit with docker command directly +## Use DevOps Toolkit with Docker Command Directly -Follow this instruction if you would like to use from docker command without the help of the execution script +Follow these instructions if you prefer to use Docker commands without the help of the execution script. ### 1. Quick Start From 56ea9a81c7acb06511630a5daa9bbfacbdc58225 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 31 Aug 2024 17:45:06 +0700 Subject: [PATCH 02/10] Update document.1 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f437664..e7e4cd5 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ docker run -it --name devops-toolkit-ctn \ ### 3. Note +- `.dtc` stands for DevOps Toolkit Configuration - You can replace `$HOME/.dtc` with any desired folder path on your VM. - Remove the `-v $HOME/.dtc:/dtc` option if you do not wish to store configurations on the host (not recommended for configuration reuse). From 0dea1b2eeb14c47a9eaafb394edde668b1bc9307 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 31 Aug 2024 17:51:55 +0700 Subject: [PATCH 03/10] Update document.2 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e7e4cd5..edd7509 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ sudo mv devops-toolkit-cli /usr/local/bin/ ```bash devops-toolkit-cli init -# Run 'devops-toolkit-cli init vX.Y.Z' if you want to use specific version. E.g: devops-toolkit-cli init 1.0.2 +# Run 'devops-toolkit-cli init vX.Y.Z' if you want to use specific version. +# E.g: devops-toolkit-cli init 1.0.2 ``` - Start a shell in new container: From 2fff2c803d0b27dd2a28cf601aa0ce6132709beb Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 31 Aug 2024 18:06:53 +0700 Subject: [PATCH 04/10] Update tool usage --- README.md | 2 +- docs/usage/ansible_usage.md | 32 +++++++++++++++++++++++++------- docs/usage/awscli_usage.md | 27 +++++++++++++++++++++++---- docs/usage/azurecli_usage.md | 28 +++++++++++++++++++++++----- docs/usage/helm_usage.md | 26 ++++++++++++++++++++++---- docs/usage/kubectl_usage.md | 26 ++++++++++++++++++++++---- docs/usage/python_usage.md | 30 ++++++++++++++++++++++++------ docs/usage/terraform_usage.md | 28 ++++++++++++++++++++++------ 8 files changed, 162 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index edd7509..ad70b7c 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ docker pull tungbq/devops-toolkit:1.2.3 docker pull tungbq/devops-toolkit:latest ``` -For more details on versioning, check the [release notes](https://github.com/tungbq/devops-toolkit/releases). +For more details on versioning, check the [**release notes**](https://github.com/tungbq/devops-toolkit/releases). ## User Guide 📖 diff --git a/docs/usage/ansible_usage.md b/docs/usage/ansible_usage.md index 460123f..dc8b52a 100644 --- a/docs/usage/ansible_usage.md +++ b/docs/usage/ansible_usage.md @@ -7,7 +7,25 @@ Some document to help you start with ansible - - -## Note +## Run with devops-toolkit-cli + +### Start the container + +Navigate to your workspace folder, then run: + +```bash +devops-toolkit-cli init +devops-toolkit-cli run + +# You now in the container terminal. Execute the ansible command normally +ansible --version +``` + +It will mount the workspace code to container and you then can execute desired scripts inside the `devops-toolkit` container. + +## Run with Docker command + +### Note To use the existing container instead of creating one, use `docker exec` command instead of `docker run` @@ -15,11 +33,11 @@ To use the existing container instead of creating one, use `docker exec` command docker exec -it my_devops_toolkit /bin/bash ``` -## Common Run Modes +### Common Run Modes For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**](../usage/run_mode.md). -## Use case 1: Run Ansible sample code provided in the container +### Use case 1: Run Ansible sample code provided in the container ```bash docker run --rm --network host -v ~/.dtc:/dtc -it tungbq/devops-toolkit:latest @@ -28,7 +46,7 @@ docker run --rm --network host -v ~/.dtc:/dtc -it tungbq/devops-toolkit:latest ansible-playbook samples/ansible/check_os.yml ``` -## Use case 2: Clone external code inside container +### Use case 2: Clone external code inside container ```bash docker run --rm --network host -v ~/.dtc:/dtc -it tungbq/devops-toolkit:latest @@ -43,7 +61,7 @@ cd ansible-examples ansible-playbook ``` -## Use case 3: Mount external code to container +### Use case 3: Mount external code to container Clone the code to the host then mount to container @@ -53,7 +71,7 @@ docker run --rm -v "$(pwd)":/root/ansible_workspace --network host -v ~/.dtc:/dt # Run the ansible code as usual ``` -## Use case 4: Mount external code to container and use .ssh keys from the host +### Use case 4: Mount external code to container and use .ssh keys from the host Clone the code to the host then mount code and `.ssh` folder to container @@ -63,6 +81,6 @@ docker run --rm -v ~/.ssh:/root/.ssh -v "$(pwd)":/root/ansible_workspace --netwo # Run the ansible code as usual ``` -## Troubleshooting +### Troubleshooting - For any issues, check [this reference](../troubleshooting/TROUBLESHOOTING.md) diff --git a/docs/usage/awscli_usage.md b/docs/usage/awscli_usage.md index 2408b7d..0b34214 100644 --- a/docs/usage/awscli_usage.md +++ b/docs/usage/awscli_usage.md @@ -11,7 +11,26 @@ Some document to help you start with awscli - - -## Note + +## Run with devops-toolkit-cli + +### Start the container + +Navigate to your workspace folder, then run: + +```bash +devops-toolkit-cli init +devops-toolkit-cli run + +# You now in the container terminal. Execute the awscli command normally +awscli --version +``` + +It will mount the workspace code to container and you then can execute desired scripts inside the `devops-toolkit` container. + +## Run with Docker command + +### Note To use the existing container instead of creating one, use `docker exec` command instead of `docker run` @@ -19,11 +38,11 @@ To use the existing container instead of creating one, use `docker exec` command docker exec -it my_devops_toolkit /bin/bash ``` -## Common Run Modes +### Common Run Modes For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**](../usage/run_mode.md). -## Use case 1: Configure credentials and list S3 bucket with awscli +### Use case 1: Configure credentials and list S3 bucket with awscli ```bash docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest @@ -46,6 +65,6 @@ Default region name [None]: xxxxxxxx Default output format [None]: xxxxxxxx ``` -## Troubleshooting +### Troubleshooting - For any issues, check [this reference](../troubleshooting/TROUBLESHOOTING.md) diff --git a/docs/usage/azurecli_usage.md b/docs/usage/azurecli_usage.md index e9c6658..487c377 100644 --- a/docs/usage/azurecli_usage.md +++ b/docs/usage/azurecli_usage.md @@ -10,7 +10,25 @@ Some document to help you start with azurecli - -## Note +## Run with devops-toolkit-cli + +### Start the container + +Navigate to your workspace folder, then run: + +```bash +devops-toolkit-cli init +devops-toolkit-cli run + +# You now in the container terminal. Execute the az command normally +az --version +``` + +It will mount the workspace code to container and you then can execute desired scripts inside the `devops-toolkit` container. + +## Run with Docker command + +### Note To use the existing container instead of creating one, use `docker exec` command instead of `docker run` @@ -18,18 +36,18 @@ To use the existing container instead of creating one, use `docker exec` command docker exec -it my_devops_toolkit /bin/bash ``` -## Common Run Modes +### Common Run Modes For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**](../usage/run_mode.md). -## Use case 1: Az login and run command +### Use case 1: Az login and run command ```bash docker run --rm -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest # Login with AZ CLI az login --use-device-code -## To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code to authenticate +### To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code to authenticate # List all resource groups az group list @@ -55,6 +73,6 @@ root@f097467db632:~# az group list ] ``` -## Troubleshooting +### Troubleshooting - For any issues, check [this reference](../troubleshooting/TROUBLESHOOTING.md) diff --git a/docs/usage/helm_usage.md b/docs/usage/helm_usage.md index bc2be86..2c43924 100644 --- a/docs/usage/helm_usage.md +++ b/docs/usage/helm_usage.md @@ -11,7 +11,25 @@ Some document to help you start with helm - - -## Note +## Run with devops-toolkit-cli + +### Start the container + +Navigate to your workspace folder, then run: + +```bash +devops-toolkit-cli init +devops-toolkit-cli run + +# You now in the container terminal. Execute the helm command normally +helm --version +``` + +It will mount the workspace code to container and you then can execute desired scripts inside the `devops-toolkit` container. + +## Run with Docker command + +### Note To use the existing container instead of creating one, use `docker exec` command instead of `docker run` @@ -19,11 +37,11 @@ To use the existing container instead of creating one, use `docker exec` command docker exec -it my_devops_toolkit /bin/bash ``` -## Common Run Modes +### Common Run Modes For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**](../usage/run_mode.md). -## Use case 1: Deploy an application with Helm +### Use case 1: Deploy an application with Helm ```bash docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest @@ -58,6 +76,6 @@ CHART VERSION: 9.23.0 APP VERSION: 8.0.36 ``` -## Troubleshooting +### Troubleshooting - For any issues, check [this reference](../troubleshooting/TROUBLESHOOTING.md) diff --git a/docs/usage/kubectl_usage.md b/docs/usage/kubectl_usage.md index 8503cfd..f1aa880 100644 --- a/docs/usage/kubectl_usage.md +++ b/docs/usage/kubectl_usage.md @@ -7,7 +7,25 @@ Some document to help you start with kubernetes (k8s) - - -## Note +## Run with devops-toolkit-cli + +### Start the container + +Navigate to your workspace folder, then run: + +```bash +devops-toolkit-cli init +devops-toolkit-cli run + +# You now in the container terminal. Execute the kubectl command normally +kubectl --version +``` + +It will mount the workspace code to container and you then can execute desired scripts inside the `devops-toolkit` container. + +## Run with Docker command + +### Note To use the existing container instead of creating one, use `docker exec` command instead of `docker run` @@ -15,11 +33,11 @@ To use the existing container instead of creating one, use `docker exec` command docker exec -it my_devops_toolkit /bin/bash ``` -## Common Run Modes +### Common Run Modes For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**](../usage/run_mode.md). -## Use case 1: Use kube config from the host +### Use case 1: Use kube config from the host Mount the `.kube/config` file from the host to container @@ -56,6 +74,6 @@ NAME READY UP-TO-DATE AVAILABLE AGE nginx-deployment 2/2 2 2 115s ``` -## Troubleshooting +### Troubleshooting - For any issues, check [this reference](../troubleshooting/TROUBLESHOOTING.md) diff --git a/docs/usage/python_usage.md b/docs/usage/python_usage.md index e00a9c5..97b7e8e 100644 --- a/docs/usage/python_usage.md +++ b/docs/usage/python_usage.md @@ -7,7 +7,25 @@ Some document to help you start with python - - -## Note +## Run with devops-toolkit-cli + +### Start the container + +Navigate to your workspace folder, then run: + +```bash +devops-toolkit-cli init +devops-toolkit-cli run + +# You now in the container terminal. Execute the python command normally +python3 --version +``` + +It will mount the workspace code to container and you then can execute desired scripts inside the `devops-toolkit` container + +## Run with Docker command + +### Note To use the existing container instead of creating one, use `docker exec` command instead of `docker run` @@ -16,11 +34,11 @@ To use the existing container instead of creating one, use `docker exec` command docker exec -it my_devops_toolkit /bin/bash ``` -## Common Run Modes +### Common Run Modes For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**](../usage/run_mode.md). -## Use case 1: Run python sample code provided in the container +### Use case 1: Run python sample code provided in the container ```bash docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest @@ -28,7 +46,7 @@ docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest python3 samples/python/rectangle_area_calculator.py ``` -## Use case 2: Clone external code inside container +### Use case 2: Clone external code inside container ```bash docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest @@ -46,7 +64,7 @@ cd Python python3 Day_of_week.py ``` -## Use case 3: Mount external code to container +### Use case 3: Mount external code to container Clone the code to the host then mount to container @@ -56,6 +74,6 @@ docker run --rm -v "$(pwd)":/root/python_workspace --network host -it -v ~/.dtc: # Run the python code as usual ``` -## Troubleshooting +### Troubleshooting - For any issues, check [this reference](../troubleshooting/TROUBLESHOOTING.md) diff --git a/docs/usage/terraform_usage.md b/docs/usage/terraform_usage.md index f58caec..14617e5 100644 --- a/docs/usage/terraform_usage.md +++ b/docs/usage/terraform_usage.md @@ -7,7 +7,23 @@ Some document to help you start with terraform - - -## Note +### Start the container + +Navigate to your workspace folder, then run: + +```bash +devops-toolkit-cli init +devops-toolkit-cli run + +# You now in the container terminal. Execute the terraform command normally +terraform --version +``` + +It will mount the workspace code to container and you then can execute desired scripts inside the `devops-toolkit` container + +## Run with Docker command + +### Note To use the existing container instead of creating one, use `docker exec` command instead of `docker run` @@ -15,11 +31,11 @@ To use the existing container instead of creating one, use `docker exec` command docker exec -it my_devops_toolkit /bin/bash ``` -## Common Run Modes +### Common Run Modes For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**](../usage/run_mode.md). -## Use case 1: Run terraform sample code provided in the container +### Use case 1: Run terraform sample code provided in the container ```bash docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest @@ -35,7 +51,7 @@ terraform destroy popd ``` -## Use case 2: Clone external code inside container +### Use case 2: Clone external code inside container ```bash docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest @@ -50,7 +66,7 @@ cd terraform-examples # Run terraform here: init-plan-apply,... ``` -## Use case 3: Mount external code to container +### Use case 3: Mount external code to container Clone the code to the host then mount to container @@ -60,6 +76,6 @@ docker run --rm -v "$(pwd)":/root/terraform_workspace -v ~/.dtc:/dtc --network h # Run the terraform code as usual ``` -## Troubleshooting +### Troubleshooting - For any issues, check [this reference](../troubleshooting/TROUBLESHOOTING.md) From 98bc4994f19e12826e96418d603465940b36086c Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 31 Aug 2024 18:07:57 +0700 Subject: [PATCH 05/10] Update tool usage.1 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ad70b7c..8890249 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ sudo mv devops-toolkit-cli /usr/local/bin/ ### 2. Run +Navigate to your workspace folder, then: + - Initialize the docker image, container and configuration directory: ```bash From 0600dd5a2752a0d79d2d2b264dbfef222835b60e Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 31 Aug 2024 18:08:33 +0700 Subject: [PATCH 06/10] Update tool usage.1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8890249..03246ce 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ ## Getting Started -The provided execution script `devops-toolkit-cli` simplifies the setup, execution, and management of the DevOps Toolkit. +The provided execution script simplifies the setup, execution, and management of the DevOps Toolkit. ### 1. Install From 42c3307b1f537e8fba296747757cc4d38915f7d1 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 31 Aug 2024 18:09:48 +0700 Subject: [PATCH 07/10] Update tool usage.2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03246ce..356c794 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ docker run -it --name devops-toolkit-ctn \ ### 3. Note -- `.dtc` stands for DevOps Toolkit Configuration +- `.dtc` stands for **d**evOps **t**oolkit **c**onfiguration - You can replace `$HOME/.dtc` with any desired folder path on your VM. - Remove the `-v $HOME/.dtc:/dtc` option if you do not wish to store configurations on the host (not recommended for configuration reuse). From 980fcf33e58760a1746e7864372a7f06a775c08c Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 31 Aug 2024 18:10:17 +0700 Subject: [PATCH 08/10] Update tool usage.3 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 356c794..4886da5 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ docker run -it --name devops-toolkit-ctn \ ### 3. Note -- `.dtc` stands for **d**evOps **t**oolkit **c**onfiguration +- `.dtc` stands for **D**evOps **T**oolkit **C**onfiguration - You can replace `$HOME/.dtc` with any desired folder path on your VM. - Remove the `-v $HOME/.dtc:/dtc` option if you do not wish to store configurations on the host (not recommended for configuration reuse). From 08082b10981207df61742129ac1e8e0c3ed80cd5 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 31 Aug 2024 18:13:45 +0700 Subject: [PATCH 09/10] Update tool usage.4 --- README.md | 5 ++++- docs/usage/devops_toolkit_cli.md | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 docs/usage/devops_toolkit_cli.md diff --git a/README.md b/README.md index 4886da5..46b9fc9 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,10 @@ devops-toolkit-cli run ls -la devops-toolkit-cli shell ``` -- For more commands, use `devops-toolkit-cli help`. +### 3. Get Help + +- For more commands, run `devops-toolkit-cli help`. +- For detailed `devops-toolkit-cli` document, see: [docs/usage/devops_toolkit_cli](./docs/usage/devops_toolkit_cli.md) ## Use DevOps Toolkit with Docker Command Directly diff --git a/docs/usage/devops_toolkit_cli.md b/docs/usage/devops_toolkit_cli.md new file mode 100644 index 0000000..be4e837 --- /dev/null +++ b/docs/usage/devops_toolkit_cli.md @@ -0,0 +1,2 @@ +# Document for devops-toolkit-cli +- TODO \ No newline at end of file From 3720069de1637f9f52c4d1cf8db7b31951d04c74 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 31 Aug 2024 18:14:06 +0700 Subject: [PATCH 10/10] Update tool usage.5 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 46b9fc9..77a652e 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ devops-toolkit-cli shell ### 3. Get Help - For more commands, run `devops-toolkit-cli help`. -- For detailed `devops-toolkit-cli` document, see: [docs/usage/devops_toolkit_cli](./docs/usage/devops_toolkit_cli.md) +- For detailed `devops-toolkit-cli` document and advanced usage, see: [docs/usage/devops_toolkit_cli](./docs/usage/devops_toolkit_cli.md) ## Use DevOps Toolkit with Docker Command Directly