Adding the Superset client automatically to the
auth.oauth_client_details table is one of the improvements we can make for subsequent implementations of the Reporting Stack instance. There are probably a few ways to do this. In this post I would like to present some suggestions and I hope you will help me choose the most optimal option.
Adding a script with the appropriate insert into the
auth.oauth_client_details table that will be run during redeploy Reporting Stack. The advantage of this solution is that the script will only be called if the specific implementation actually has a reporting stack instance. Unfortunately, connecting to the open_lmis database from the Reporting instance is not possible at this time. This solution requires appropriate configuration on AWS to enable connection to the open_lmis database from the Reporting Stack instance. In addition, the person who would create a Reporting Stack for subsequent implementations would have to remember to add analogous AWS configurations.
An analogous script that adds an appropriate entry to the auth.oauth_client_details table could be placed in the
shared directory and could be called during redeploy an OLMIS instance. In this case, there would be no problem connecting to the database. Unfortunately, we do not know if each subsequent implementation will have a Reporting Stack instance - this means that the person implementing the Reporting Stack will have to remember to add the appropriate entry calling this script.
Create docker image for running initial scripts for Reporting Stack. An entry for the new docker image would be placed in docker-compose.yml file for OLMIS deployment. The advantage of this option is that scripts called for Reporting Stack will be stored in a separate place. There will be no problem with connecting to the database but during implementation you will have to remember to add the appropriate entry in the docker-compose.yml file.
What do you think about the above options? Do you have any objections to the proposed ideas?