Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions docs/usage/ansible_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ docker exec -it my_devops_toolkit /bin/bash
## Use case 1: Run Ansible sample code provided in the container

```bash
docker run --rm --network host -it devops-toolkit:latest
docker run --rm --network host -it tungbq/devops-toolkit:latest

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

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

# Now run your cloned script
Expand All @@ -45,7 +45,17 @@ 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 -it devops-toolkit:latest
docker run --rm -v "$(pwd)":/root/ansible_workspace --network host -it tungbq/devops-toolkit:latest
# Run the ansible code as usual
```

## 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

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

Expand Down
4 changes: 2 additions & 2 deletions docs/usage/awscli_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ 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
docker run --rm --network host -it tungbq/devops-toolkit:latest
###############################################
# Now we are in the docker container terminal #
###############################################
Expand All @@ -47,7 +47,7 @@ Default output format [None]: xxxxxxxx
Mount the `.aws` when running toolkit container

```bash
docker run --rm --network host -it -v ~/.aws:/root/.aws devops-toolkit:latest
docker run --rm --network host -it -v ~/.aws:/root/.aws tungbq/devops-toolkit:latest
# List bucket
aws s3 ls
```
Expand Down
6 changes: 3 additions & 3 deletions docs/usage/azurecli_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ docker exec -it my_devops_toolkit /bin/bash
## Use case 1: Az login and run command

```bash
docker run --rm -it devops-toolkit:latest
docker run --rm -it tungbq/devops-toolkit:latest
## To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code <SHOWN_IN_SCREEN> to authenticate
az login
# List all resource groups
Expand All @@ -33,7 +33,7 @@ az group list
Mount the `.azure` folder from host when running toolkit container

```bash
docker run --rm -it -v ~/.azure:/root/.azure devops-toolkit:latest
docker run --rm -it -v ~/.azure:/root/.azure tungbq/devops-toolkit:latest
###############################################
# Now we are in the docker container terminal #
###############################################
Expand All @@ -44,7 +44,7 @@ az group list
Sample Result

```bash
➜ ~ docker run --rm -it -v ~/.azure:/root/.azure devops-toolkit:latest
➜ ~ docker run --rm -it -v ~/.azure:/root/.azure tungbq/devops-toolkit:latest
root@f097467db632:~# az group list
[
{
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 @@ -24,7 +24,7 @@ docker exec -it my_devops_toolkit /bin/bash
Mount the `.kube/config` file from the host to container (or other kubeconfig files you had)

```bash
docker run --rm --network host -it -v ~/.kube/config:/root/.kube/config devops-toolkit:latest
docker run --rm --network host -it -v ~/.kube/config:/root/.kube/config tungbq/devops-toolkit:latest
###############################################
# Now we are in the docker container terminal #
###############################################
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/kubectl_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ docker exec -it my_devops_toolkit /bin/bash
Mount the `.kube/config` file from the host to container

```bash
docker run --rm --network host -it -v ~/.kube/config:/root/.kube/config devops-toolkit:latest
docker run --rm --network host -it -v ~/.kube/config:/root/.kube/config tungbq/devops-toolkit:latest
###############################################
# Now we are in the docker container terminal #
###############################################
Expand All @@ -38,7 +38,7 @@ kubectl get deployment
Sample Result

```bash
➜ ~ docker run --rm --network host -it -v ~/.kube/config:/root/.kube/config devops-toolkit:latest
➜ ~ docker run --rm --network host -it -v ~/.kube/config:/root/.kube/config tungbq/devops-toolkit:latest
root@docker-desktop:~# kubectl get nodes
NAME STATUS ROLES AGE VERSION
kind-control-plane Ready control-plane 21m v1.29.2
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 @@ -19,15 +19,15 @@ docker exec -it my_devops_toolkit /bin/bash
## Use case 1: Run python sample code provided in the container

```bash
docker run --rm --network host -it devops-toolkit:latest
docker run --rm --network host -it 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 devops-toolkit:latest
docker run --rm --network host -it tungbq/devops-toolkit:latest
# You now in the container terminal
# Clone code
mkdir python_workspace
Expand All @@ -48,7 +48,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 devops-toolkit:latest
docker run --rm -v "$(pwd)":/root/python_workspace --network host -it tungbq/devops-toolkit:latest
# Run the python code as usual
```

Expand Down
6 changes: 3 additions & 3 deletions docs/usage/terraform_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ docker exec -it my_devops_toolkit /bin/bash
## Use case 1: Run terraform sample code provided in the container

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

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

# Now run your cloned script
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/terraform_workspace --network host -it devops-toolkit:latest
docker run --rm -v "$(pwd)":/root/terraform_workspace --network host -it tungbq/devops-toolkit:latest
# Run the terraform code as usual
```

Expand Down
2 changes: 1 addition & 1 deletion samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Start and dive into the container

```bash
docker run -it --rm devops-toolkit:latest
docker run -it --rm tungbq/devops-toolkit:latest
```

Congrats! You now in the container and able to run the tooling sample inside toolkit, the console will look like:
Expand Down