polymath icon indicating copy to clipboard operation
polymath copied to clipboard

Make managing deploying multiple endpoints easier

Open jkomoros opened this issue 2 years ago • 2 comments

If you maintain only a single endpoint, it's easy: just put your libraries directly in libraries/ and put any other libraries you have access to that you want to be able to use locally but don't want to deploy in third_party.

However, if you maintain multiple endpoints, it can be finicky to make sure the layout of your libraries folder is updated for each deploy, and that you've set the right gcloud project.

It could be something like a convention for your libraries folder:

/endpoints
  /gcp-project-id-1
    library1.json
  /gcp-project-id-2
    /access
      /unpublished
        private-library2.json

And then a deploy script that goes through the libraries folder. for each sub-folder in libraries/endpoints it sets the GCP project ID, twiddles some value (perhaps .gcloudignore, or moving directories around) to prevent the other things from being uploaded, and then uploads each one.

jkomoros avatar Jan 22 '23 23:01 jkomoros