-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transform run directory to current working directory (globally available --cwd
)
#612
base: master
Are you sure you want to change the base?
Conversation
08d3e55
to
3f64a5a
Compare
3f64a5a
to
84fd5d3
Compare
--cwd
)
When I try executing a deployment from another directory I have the following error: (venv) sbaume-consultant01@M093-1309930:~/Documents/tdp/tdp-ops/tdp/tdp-lib$ tdp --env /home/sbaume-consultant01/Documents/tdp/tdp-ops/.env --cwd /home/sbaume-consultant01/Documents/tdp/tdp-ops deploy
2024-07-19 10:48:59,189 - INFO - root - Logging is configured.
[WARNING]: Could not match supplied host pattern, ignoring: kafka_broker
[WARNING]: Could not match supplied host pattern, ignoring: zk_kafka_client
[WARNING]: Could not match supplied host pattern, ignoring: zk_kafka
[WARNING]: Could not match supplied host pattern, ignoring: kafka_client
[WARNING]: Could not match supplied host pattern, ignoring: zk_kafka_edge
[WARNING]: Could not match supplied host pattern, ignoring: airflow
PLAY [jmx-exporter install] ****************************************************
TASK [Gathering Facts] *********************************************************
ok: [sbaum-master-01]
ok: [sbaum-worker-01]
ok: [sbaum-master-03]
ok: [sbaum-worker-02]
ok: [sbaum-master-02]
ok: [sbaum-edge-01]
ok: [sbaum-worker-03]
TASK [tosit.tdp.resolve] *******************************************************
ok: [sbaum-master-01]
ok: [sbaum-master-03]
ok: [sbaum-master-02]
ok: [sbaum-worker-02]
ok: [sbaum-worker-03]
ok: [sbaum-worker-01]
ok: [sbaum-edge-01]
TASK [tosit.tdp.jmx : Ensure "/opt/tdp/jmx-exporter" exists] *******************
ok: [sbaum-master-01]
ok: [sbaum-master-03]
ok: [sbaum-worker-01]
ok: [sbaum-edge-01]
ok: [sbaum-worker-02]
ok: [sbaum-master-02]
ok: [sbaum-worker-03]
TASK [tosit.tdp.jmx : Upload jmx-exporter jar] *********************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [sbaum-master-01]: FAILED! => {
"changed": false
}
MSG:
Could not find or access '/home/sbaume-consultant01/Documents/tdp/tdp-ops/tdp/tdp-lib/files/jmx_prometheus_javaagent-0.16.1.jar' on the Ansible Controller.
If you are using a module and expect the file to exist on the remote, see the remote_src option
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [sbaum-master-02]: FAILED! => {
"changed": false
}
MSG:
Could not find or access '/home/sbaume-consultant01/Documents/tdp/tdp-ops/tdp/tdp-lib/files/jmx_prometheus_javaagent-0.16.1.jar' on the Ansible Controller.
If you are using a module and expect the file to exist on the remote, see the remote_src option
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [sbaum-master-03]: FAILED! => {
"changed": false
}
MSG:
Could not find or access '/home/sbaume-consultant01/Documents/tdp/tdp-ops/tdp/tdp-lib/files/jmx_prometheus_javaagent-0.16.1.jar' on the Ansible Controller.
If you are using a module and expect the file to exist on the remote, see the remote_src option
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [sbaum-worker-01]: FAILED! => {
"changed": false
}
MSG:
Could not find or access '/home/sbaume-consultant01/Documents/tdp/tdp-ops/tdp/tdp-lib/files/jmx_prometheus_javaagent-0.16.1.jar' on the Ansible Controller.
If you are using a module and expect the file to exist on the remote, see the remote_src option
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [sbaum-worker-02]: FAILED! => {
"changed": false
}
MSG:
Could not find or access '/home/sbaume-consultant01/Documents/tdp/tdp-ops/tdp/tdp-lib/files/jmx_prometheus_javaagent-0.16.1.jar' on the Ansible Controller.
If you are using a module and expect the file to exist on the remote, see the remote_src option
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [sbaum-edge-01]: FAILED! => {
"changed": false
}
MSG:
Could not find or access '/home/sbaume-consultant01/Documents/tdp/tdp-ops/tdp/tdp-lib/files/jmx_prometheus_javaagent-0.16.1.jar' on the Ansible Controller.
If you are using a module and expect the file to exist on the remote, see the remote_src option
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [sbaum-worker-03]: FAILED! => {
"changed": false
}
MSG:
Could not find or access '/home/sbaume-consultant01/Documents/tdp/tdp-ops/tdp/tdp-lib/files/jmx_prometheus_javaagent-0.16.1.jar' on the Ansible Controller.
If you are using a module and expect the file to exist on the remote, see the remote_src option
NO MORE HOSTS LEFT *************************************************************
PLAY RECAP *********************************************************************
sbaum-edge-01 : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
sbaum-master-01 : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
sbaum-master-02 : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
sbaum-master-03 : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
sbaum-worker-01 : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
sbaum-worker-02 : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
sbaum-worker-03 : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Error: Deployment failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you specify in which directory your tar.gz are saved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you make the --cwd option optional, as of now it is mandatory thanks
Which issue(s) this PR fixes
Fixes #488
The
--run-directory
option is only applied to the thetdp deploy
command. We should extend it's usage to the whole CLI so that other features can benefit from it.In particular, inventory parsing does not work if
tdp
commands are launched from another location.Additional comments
I needed to implement singleton pattern because of ansible strange way to initialize it's config (when importing a module, creating a class, etc.).
Agreements