I'm using nodejs flexible environment documented here
Nothing fancy in the config
runtime: nodejs
vm: true
service: SimpleExpressService
health_check:
enable_health_check: False
automatic_scaling:
min_num_instances: 1
max_num_instances: 4
cool_down_period_sec: 120
cpu_utilization:
target_utilization: 0.5
Here is my deployment command
gcloud app deploy -q --promote --version $VER
Whenever I deploy a new version, almost everything goes really fast. However, the step 'Updating service [SimpleExpressServer]' takes several minutes.
Is there anyway to optimize this step?
When firing of gcloud preview app deploy the whole process takes ~8 minutes, most of which is "updating service".
Deploy your application to App Engine using the gcloud app deploy command. This command automatically builds a container image by using the Cloud Build service and then deploys that image to the App Engine flexible environment.
This error occurs if the account that you used to deploy your app does not have permission to deploy apps for the current project. To resolve this issue, grant the App Engine Deployer ( roles/appengine.deployer) role to the account. To see which account you used to deploy, do one of the following:
To deploy an application to App Engine, use the following steps: Create a Cloud Build configuration file named cloudbuild.yaml or cloudbuild.json. Note: Do not store the config file in the same directory as the source code because the gcloud tool may interpret that you want to deploy the app using Docker via Cloud Build.
Add a build timeout value of more than 10 minutes. Start the build, where SOURCE_DIRECTORY is the path or URL to the source code: You can automate the deployment of your software to App Engine by creating Cloud Build triggers. You can configure your triggers to build and deploy images whenever you update your source code.
This error occurs if you use the gcloud app deploy command from an account that does not have the Cloud Build Editor ( roles/cloudbuild.builds.editor) role. To resolve this issue, grant the Cloud Build Editor role to the service account that you are using to deploy your app.
From Deploying your program:
By default the deploy command automatically generates a new version ID each time that you use it and will route any traffic to the new version.
To override this behavior, you can specify the version ID with the version flag:
gcloud app deploy --version myID
You can also specify not to send all traffic to the new version immediately with the --no-promote flag:
gcloud app deploy --no-promote
So your deployment includes overwriting the specified app version and switching traffic to the newly deployed version.
When you re-deploy a certain version there's a pile of additional stuff to be done compared to the 1st deployment of that version, which includes at least:
/_ah/stop
requestIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With