Unable to run the ansible script to deploy commcare-sync due to the following error ‘public_host’ is undefined error as below:
Following the steps in the production deployment the following configuration files have already been updated as follows:
Any help pointing where else the Public Host in stated in the error also needs to be defined?
I would have thought the definition in the vars file would be sufficient. How are you running the ansible script? Is it possible that it's not pointing at the right environment?
Below is the folder I'm executing the script from and the script as per the instructions followed here:
Production Environments — CommCare Sync Ansible documentation (commcare-sync-ansible.readthedocs.io)
the path for each of the files are as follows:
It looks like you have invalid directory structure. Perhaps by a mistake you might have copied the example configuration directory to
inventories/myproject/example instead of
inventories/myproject. If you move all the files in
example directory to
inventories/myproject, delete the
examples subdirectory and run the commands, it should work.
Please review the documentation which states below command
cp -r inventories/example inventories/myproject
Thanks for pointing that out, however it looks like the docs have been updated from the time i was initially trying to deploy the commcare-sync to date.
When i tried running the script after moving the file locations it found the correct configuration file and was able to proceed with the deployment however i was then presented with this error:
Referencing the docs shows that the vault file now requires these two additional lines that were not there previously:
I appended these to my vault.yml file but now the script fails during the task Run superset database migrations:
It looks like an error running
superset db upgrade related to Superset
Can you please share rest of the traceback and I will see if I can help?
alright sure, i'll send you the rest via email as its quite a long output
It looks like the error is
"ModuleNotFoundError: No module named 'werkzeug.wrappers.etag
It looks like an issue with Superset itself. Please see the resolution at ModuleNotFoundError: No module named 'werkzeug.wrappers.etag' · Issue #20723 · apache/superset · GitHub and ModuleNotFoundError on fresh Superset 2.0.0 install · Issue #20717 · apache/superset · GitHub
You will need to do those steps with the virtualenv located at
Sorry for the late feedback, I was tasked to other assignments in the interim but that did the trick and we were able to run the deploy successfully.
One addition we had to make was to also add the following to the vault.yml file:
which doesn't appear to be documented in the install instructions currently but is necessary for a successful deploy
Thanks for the help Sravan