emcp
09/04/2021, 3:37 PMsudo -u ubuntu meltano config target-postgres set postgres_host $db_host
I am executing this via bash upon an LXD container .. using a tool called Juju. if I ssh into the LXD container and run this command manually with the IP Address .. as the ubuntu user.. it works
but my bash script via juju doesn't seem to affect the meltano.yml
at all.. causing me to be unable to easily update the ip address of the postgresql.
I can work around this using sed
in bash.. but wondered if this is possibly something that can be fixed?
Edit: I'll try adding --log-level=debug
and see if it reveals anything useful
Here's what it looks like when I manually SSH into the image and do it myself (and I can see it does indeed update the yml)
ubuntu@juju-2dd159-160:~/meltano_proj_repo$ meltano --log-level=debug config target-postgres set postgres_host MY_NEW_IP
[2021-09-04 15:39:36,680] [2186|MainThread|root] [DEBUG] Creating engine <meltano.core.project.Project object at 0x7ffa5a74fdc0>@sqlite:////home/ubuntu/meltano_proj_repo/.meltano/meltano.db
[2021-09-04 15:39:36,725] [2186|MainThread|urllib3.connectionpool] [DEBUG] Starting new HTTPS connection (1): <http://www.meltano.com:443|www.meltano.com:443>
[2021-09-04 15:39:37,295] [2186|MainThread|urllib3.connectionpool] [DEBUG] <https://www.meltano.com:443> "GET /discovery.yml HTTP/1.1" 200 115895
Loader 'target-postgres' setting 'postgres_host' was set in `meltano.yml`: 'MY_NEW_IP'
douwe_maan
09/04/2021, 4:20 PMemcp
09/04/2021, 5:17 PMsed
likely will be easier.. but for the password I know I must set that as an environment variable. I will test this idea.. the issue is, Juju utilizes bash hooks in a way that.. basically you have different states.. so I will have to test if say.. in the hook which relates meltano to my database.. if I set the environment variable there.. does it persist when I say.. go back to the start.. does it get picked up by meltano or do I have to reboot etc.. Thanks as always Douweemcp
09/04/2021, 5:18 PMemcp
09/04/2021, 5:20 PMemcp
09/04/2021, 5:20 PMemcp
09/04/2021, 5:23 PMemcp
09/04/2021, 6:53 PMsed
working great on everything.. my last piece is.. getting the TAP_POSTGRES_PASSWORD
set correctly.. I am wondering do I need to reboot / restart meltano ui
or .. is it just used somehow with the linux system at some level.. I am guessing I would need to set the env var.. then start meltano uiemcp
09/04/2021, 6:54 PMemcp
09/04/2021, 6:57 PMemcp
09/04/2021, 6:58 PMemcp
09/04/2021, 7:04 PMbraulio_gonzalez
08/09/2022, 12:40 AM