Skip to content

Commit 95cd612

Browse files
Remove flags from basic usage and update verbose output
1 parent 95b670e commit 95cd612

File tree

1 file changed

+38
-40
lines changed

1 file changed

+38
-40
lines changed

docs/user-guide/leverage-cli/basic-features.md

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ Usage: leverage [OPTIONS] COMMAND [ARGS]...
88
Leverage Reference Architecture projects command-line tool.
99

1010
Options:
11-
-f, --filename TEXT Name of the build file containing the tasks
12-
definitions. [default: build.py]
13-
-l, --list-tasks List available tasks to run.
14-
-v, --verbose Increase output verbosity.
15-
--version Show the version and exit.
16-
--help Show this message and exit.
11+
-v, --verbose Increase output verbosity.
12+
--version Show the version and exit.
13+
--help Show this message and exit.
1714

1815
Commands:
1916
aws Run AWS CLI commands in a custom containerized environment.
@@ -31,50 +28,37 @@ Commands:
3128
Similarly, subcommands provide further information by means of the `--help` flag. For example `leverage tf --help`.
3229

3330
## Global options
34-
* `-f` | `--filename`: Name of the file containing the tasks' definition. Defaults to `build.py`
35-
* `-l` | `--list-tasks`: List all the tasks defined for the project along a description of their purpose (when available).
36-
```
37-
Tasks in build file `build.py`:
38-
39-
clean Clean build directory.
40-
copy_file
41-
echo
42-
html Generate HTML.
43-
images [Ignored] Prepare images.
44-
start_server [Default] Start the server
45-
stop_server
46-
47-
Powered by Leverage 1.9.0
48-
```
4931
* `-v` | `--verbose`: Increases output verbosity.
5032
When running a command in a container, the tool provides a description of the container's configuration before the execution.
5133
This is specially useful if the user were to to have the need of recreating Leverage's behavior by themselves.
5234
``` bash
5335
$ leverage -v tf plan
54-
[18:23:22.222] DEBUG Found config file /home/user/binbash/le-tf-infra-aws/build.env
55-
[18:23:22.239] DEBUG Container configuration:
36+
[20:27:44.758] DEBUG Found config file /home/user/binbash/le-tf-infra-aws/build.env
37+
[20:27:44.812] DEBUG Container configuration:
5638
{
57-
"image": "binbash/leverage-toolbox:1.2.7-0.1.7", #(1)!
39+
"image": "binbash/leverage-toolbox:1.5.0-0.2.3-1000-1000", #(1)!
5840
"command": "",
5941
"stdin_open": true,
6042
"environment": { #(2)!
6143
"COMMON_CONFIG_FILE": "/binbash/config/common.tfvars",
62-
"ACCOUNT_CONFIG_FILE": "/binbash/security/config/account.tfvars",
63-
"BACKEND_CONFIG_FILE": "/binbash/security/config/backend.tfvars",
64-
"AWS_SHARED_CREDENTIALS_FILE": "/root/tmp/bb/credentials",
65-
"AWS_CONFIG_FILE": "/root/tmp/bb/config",
66-
"SRC_AWS_SHARED_CREDENTIALS_FILE": "/root/tmp/bb/credentials",
67-
"SRC_AWS_CONFIG_FILE": "/root/tmp/bb/config",
68-
"AWS_CACHE_DIR": "/root/tmp/bb/cache",
69-
"SSO_CACHE_DIR": "/root/tmp/bb/sso/cache",
44+
"ACCOUNT_CONFIG_FILE": "/binbash/apps-devstg/config/account.tfvars",
45+
"BACKEND_CONFIG_FILE": "/binbash/apps-devstg/config/backend.tfvars",
46+
"AWS_SHARED_CREDENTIALS_FILE": "/home/leverage/tmp/bb/credentials",
47+
"AWS_CONFIG_FILE": "/home/leverage/tmp/bb/config",
48+
"SRC_AWS_SHARED_CREDENTIALS_FILE": "/home/leverage/tmp/bb/credentials",
49+
"SRC_AWS_CONFIG_FILE": "/home/leverage/tmp/bb/config",
50+
"AWS_CACHE_DIR": "/home/leverage/tmp/bb/cache",
51+
"SSO_CACHE_DIR": "/home/leverage/tmp/bb/sso/cache",
52+
"SCRIPT_LOG_LEVEL": 3,
53+
"MFA_SCRIPT_LOG_LEVEL": 3,
7054
"SSH_AUTH_SOCK": "/ssh-agent"
7155
},
7256
"entrypoint": "/bin/terraform",
73-
"working_dir": "/binbash/security/global/base-identities",
57+
"working_dir": "/binbash/apps-devstg/us-east-1/k8s-eks/identities",
7458
"host_config": {
7559
"NetworkMode": "default",
7660
"SecurityOpt": [
77-
"label:disable"
61+
"label=disable"
7862
],
7963
"Mounts": [ #(3)!
8064
{
@@ -84,7 +68,7 @@ Similarly, subcommands provide further information by means of the `--help` flag
8468
"ReadOnly": false
8569
},
8670
{
87-
"Target": "/root/tmp/bb",
71+
"Target": "/home/leverage/tmp/bb",
8872
"Source": "/home/user/.aws/bb",
8973
"Type": "bind",
9074
"ReadOnly": false
@@ -104,11 +88,25 @@ Similarly, subcommands provide further information by means of the `--help` flag
10488
]
10589
}
10690
}
107-
[18:23:22.274] DEBUG Checking for layer /home/user/binbash/le-tf-infra-aws/security/global/base-identities...
108-
[18:23:22.279] DEBUG Checking layer /home/user/binbash/le-tf-infra-aws/security/global/base-identities...
109-
[18:23:22.282] DEBUG Running command: sh -c 'cat $SSO_CACHE_DIR/token'
110-
[18:23:22.901] DEBUG Running with entrypoint: /root/scripts/aws-sso/aws-sso-entrypoint.sh -- /bin/terraform
111-
[18:23:22.903] DEBUG Running command: plan -var-file=/binbash/config/common.tfvars -var-file=/binbash/security/config/account.tfvars -var-file=/binbash/security/config/backend.tfvars #(4)!
91+
[20:27:44.825] INFO Checking for local docker image, tag: 1.5.0-0.2.3-1000-1000...
92+
[20:27:44.851] INFO ✔ OK
93+
94+
[20:27:44.853] DEBUG Checking for layer /home/user/binbash/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks/identities...
95+
[20:27:44.875] DEBUG Checking layer /home/user/binbash/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks/identities...
96+
[20:27:44.876] DEBUG Running command: sh -c 'cat $SSO_CACHE_DIR/token'
97+
[20:27:47.469] INFO Attempting to get temporary credentials for shared account.
98+
[20:27:47.471] DEBUG Token expiration time: 1740094585.0
99+
DEBUG Token renewal time: 1740182267.470991
100+
[20:27:47.472] DEBUG Retrieving role credentials for DevOps...
101+
[20:27:48.558] INFO Writing binbash-shared-devops profile
102+
[20:27:48.564] INFO Credentials for shared account written successfully.
103+
[20:27:48.567] INFO Attempting to get temporary credentials for apps-devstg account.
104+
[20:27:48.570] DEBUG Token expiration time: 1740094584.0
105+
[20:27:48.571] DEBUG Token renewal time: 1740182268.5704691
106+
[20:27:48.572] DEBUG Retrieving role credentials for DevOps...
107+
[20:27:49.171] INFO Writing binbash-apps-devstg-devops profile
108+
[20:27:49.177] INFO Credentials for apps-devstg account written successfully.
109+
[20:27:49.182] DEBUG Running command: plan -var-file=/binbash/config/common.tfvars -var-file=/binbash/apps-devstg/config/account.tfvars -var-file=/binbash/apps-devstg/config/backend.tfvars #(4)!
112110
...
113111
```
114112

0 commit comments

Comments
 (0)