how do I deploy to a custom service with the appen

2019-08-27 12:34发布

问题:

I have seen all the parameters from the documentation. But none of them allow to override the service parameter from the generated yaml.

I tried using deployables = app.yaml with the app.yaml below but it gives me a 500 error:

runtime: java7
threadsafe: True
api_version: '1.0'
service: backend
handlers:
- url: /.*
  script: unused
  login: optional
  secure: optional
skip_files: app.yaml

Any idea what I'm doing wrong ?

回答1:

The services parameter is what determines the service's name, meaning the service the deployment is directed to.

So there is no way to overwrite the services parameter because as soon as you change it you're simply deploying to a different service.

So if you want to just change a service's name you should:

  • simply deploy with the new name, creating a new service
  • delete the old service using gcloud app services delete:

    $ gcloud app services delete old_service_name
    

The order of the steps may matter for your case, you may want to reverse them.