@@ -8,12 +8,9 @@ Usage: leverage [OPTIONS] COMMAND [ARGS]...
8
8
Leverage Reference Architecture projects command-line tool.
9
9
10
10
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.
17
14
18
15
Commands:
19
16
aws Run AWS CLI commands in a custom containerized environment.
@@ -31,50 +28,37 @@ Commands:
31
28
Similarly, subcommands provide further information by means of the ` --help ` flag. For example ` leverage tf --help ` .
32
29
33
30
## 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
- ```
49
31
* ` -v ` | ` --verbose ` : Increases output verbosity.
50
32
When running a command in a container, the tool provides a description of the container's configuration before the execution.
51
33
This is specially useful if the user were to to have the need of recreating Leverage's behavior by themselves.
52
34
``` bash
53
35
$ 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:
56
38
{
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)!
58
40
" command" : " " ,
59
41
" stdin_open" : true,
60
42
" environment" : { # (2)!
61
43
" 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,
70
54
" SSH_AUTH_SOCK" : " /ssh-agent"
71
55
},
72
56
" entrypoint" : " /bin/terraform" ,
73
- " working_dir" : " /binbash/security/global/base- identities" ,
57
+ " working_dir" : " /binbash/apps-devstg/us-east-1/k8s-eks/ identities" ,
74
58
" host_config" : {
75
59
" NetworkMode" : " default" ,
76
60
" SecurityOpt" : [
77
- " label: disable"
61
+ " label= disable"
78
62
],
79
63
" Mounts" : [ # (3)!
80
64
{
@@ -84,7 +68,7 @@ Similarly, subcommands provide further information by means of the `--help` flag
84
68
" ReadOnly" : false
85
69
},
86
70
{
87
- " Target" : " /root /tmp/bb" ,
71
+ " Target" : " /home/leverage /tmp/bb" ,
88
72
" Source" : " /home/user/.aws/bb" ,
89
73
" Type" : " bind" ,
90
74
" ReadOnly" : false
@@ -104,11 +88,25 @@ Similarly, subcommands provide further information by means of the `--help` flag
104
88
]
105
89
}
106
90
}
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)!
112
110
...
113
111
```
114
112
0 commit comments