Skip to content

Commit

Permalink
Improve the configuration path name.guide
Browse files Browse the repository at this point in the history
  • Loading branch information
tungbq committed Aug 17, 2024
1 parent 4a4e72e commit 8deef3b
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions docs/usage/ansible_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**]
## Use case 1: Run Ansible sample code provided in the container

```bash
docker run --rm --network host -v ~/.dtc:/config -it tungbq/devops-toolkit:latest
docker run --rm --network host -v ~/.dtc:/dtc -it tungbq/devops-toolkit:latest

# You now in the container terminal
ansible-playbook samples/ansible/check_os.yml
Expand All @@ -31,7 +31,7 @@ ansible-playbook samples/ansible/check_os.yml
## Use case 2: Clone external code inside container

```bash
docker run --rm --network host -v ~/.dtc:/config -it tungbq/devops-toolkit:latest
docker run --rm --network host -v ~/.dtc:/dtc -it tungbq/devops-toolkit:latest
# You now in the container terminal

# Now run your cloned script
Expand All @@ -49,7 +49,7 @@ Clone the code to the host then mount to container

```bash
# Given that we have code somewhere in you machine
docker run --rm -v "$(pwd)":/root/ansible_workspace --network host -v ~/.dtc:/config -it tungbq/devops-toolkit:latest
docker run --rm -v "$(pwd)":/root/ansible_workspace --network host -v ~/.dtc:/dtc -it tungbq/devops-toolkit:latest
# Run the ansible code as usual
```

Expand All @@ -59,7 +59,7 @@ Clone the code to the host then mount code and `.ssh` folder to container

```bash
# Given that we have code somewhere in you machine
docker run --rm -v ~/.ssh:/root/.ssh -v "$(pwd)":/root/ansible_workspace --network host -v ~/.dtc:/config -it tungbq/devops-toolkit:latest
docker run --rm -v ~/.ssh:/root/.ssh -v "$(pwd)":/root/ansible_workspace --network host -v ~/.dtc:/dtc -it tungbq/devops-toolkit:latest
# Run the ansible code as usual
```

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/awscli_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**]
## Use case 1: Configure credentials and list S3 bucket with awscli

```bash
docker run --rm --network host -it -v ~/.dtc:/config tungbq/devops-toolkit:latest
docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest
###############################################
# Now we are in the docker container terminal #
###############################################
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/azurecli_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**]
## Use case 1: Az login and run command

```bash
docker run --rm -it -v ~/.dtc:/config tungbq/devops-toolkit:latest
docker run --rm -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest

# Login with AZ CLI
az login --use-device-code
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/helm_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**]
## Use case 1: Deploy an application with Helm

```bash
docker run --rm --network host -it -v ~/.dtc:/config tungbq/devops-toolkit:latest
docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest
###############################################
# Now we are in the docker container terminal #
###############################################
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/kubectl_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**]
Mount the `.kube/config` file from the host to container

```bash
docker run --rm --network host -it -v ~/.dtc:/config tungbq/devops-toolkit:latest
docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest
###############################################
# Now we are in the docker container terminal #
###############################################
Expand Down
6 changes: 3 additions & 3 deletions docs/usage/python_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**]
## Use case 1: Run python sample code provided in the container

```bash
docker run --rm --network host -it -v ~/.dtc:/config tungbq/devops-toolkit:latest
docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest
# You now in the container terminal
python3 samples/python/rectangle_area_calculator.py
```

## Use case 2: Clone external code inside container

```bash
docker run --rm --network host -it -v ~/.dtc:/config tungbq/devops-toolkit:latest
docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest
# You now in the container terminal
# Clone code
mkdir python_workspace
Expand All @@ -52,7 +52,7 @@ Clone the code to the host then mount to container

```bash
# Given that we have code somewhere in you machine
docker run --rm -v "$(pwd)":/root/python_workspace --network host -it -v ~/.dtc:/config tungbq/devops-toolkit:latest
docker run --rm -v "$(pwd)":/root/python_workspace --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest
# Run the python code as usual
```

Expand Down
4 changes: 2 additions & 2 deletions docs/usage/run_mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Command: `docker run <RUN_OPTS> tungbq/devops-toolkit:<TAG>`, some of the common
- `--rm`: Remove the container after it completes (Ctrl + C or container exit event).
- `--network host`: Use the host (VM) network.
- `--name <CONTAINER_NAME>`: Assign a name to the container (e.g: `--name demo001`).
- `-v <ABS_PATH_ON_THE_HOST>:/config`: Mount a config folder on the host to the container. This allows reusing configurations in the container, like AWS and Azure login sessions (e.g: `-v ~/.dtc:/config`, `-v /tmp/devops-toolkit-config-01:/config`).
- `-v <ABS_PATH_ON_THE_HOST>:/config`: Mount a config folder on the host to the container. This allows reusing configurations in the container, like AWS and Azure login sessions (e.g: `-v ~/.dtc:/dtc`, `-v /tmp/devops-toolkit-config-01:/config`).

## Example

Expand Down Expand Up @@ -48,5 +48,5 @@ docker run --network host -it --name demo001 tungbq/devops-toolkit:latest

```bash
mkdir -p ~/.dtc # or other location you want to store the configuration
docker run --network host -it --rm -v ~/.dtc:/config tungbq/devops-toolkit:latest
docker run --network host -it --rm -v ~/.dtc:/dtc tungbq/devops-toolkit:latest
```
6 changes: 3 additions & 3 deletions docs/usage/terraform_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ For instructions on common run modes, visit [**DevOps Toolkit Common Run Mode**]
## Use case 1: Run terraform sample code provided in the container

```bash
docker run --rm --network host -it -v ~/.dtc:/config tungbq/devops-toolkit:latest
docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest
# You now in the container terminal
# Navigate to Terraform sample
pushd samples/terraform/basic
Expand All @@ -38,7 +38,7 @@ popd
## Use case 2: Clone external code inside container

```bash
docker run --rm --network host -it -v ~/.dtc:/config tungbq/devops-toolkit:latest
docker run --rm --network host -it -v ~/.dtc:/dtc tungbq/devops-toolkit:latest
# You now in the container terminal

# Now run your cloned script
Expand All @@ -56,7 +56,7 @@ Clone the code to the host then mount to container

```bash
# Given that we have code somewhere in you machine
docker run --rm -v "$(pwd)":/root/terraform_workspace -v ~/.dtc:/config --network host -it tungbq/devops-toolkit:latest
docker run --rm -v "$(pwd)":/root/terraform_workspace -v ~/.dtc:/dtc --network host -it tungbq/devops-toolkit:latest
# Run the terraform code as usual
```

Expand Down

0 comments on commit 8deef3b

Please sign in to comment.