Go Deploy process
Application artefact​
When the build phase is finished, the application artefact is stored in the internal Zerops storage and the build container is deleted.
If you triggered the deploy pipeline manually using Zerops CLI, the application artefact is also uploaded to the internal Zerops storage.
Zerops uses the stored artefact to deploy the identical version of your application each time a new container is started:
- when a new application version is deployed
- when the application scales horizontally
- when a runtime container fails and a new container is started automatically
First deploy​
When your application is deployed for the first time, Zerops will start one or more runtime containers based on the service auto scaling settings.
Zerops performs following actions for each new container:
- Installs the runtime environment
- Downloads the application artefact from the internal storage
- Optionally runs the init commands
- Starts your application using the start command
- Optionally waits until the readiness check succeeds
- The container is now active and receives incoming requests.
Services with multiple containers are deployed in parallel.
If your application needs to be initialized in each runtime container, add init commands to zerops.yml
.
Do not use the initCommands
for customising your runtime environment. See how to customise the runtime environment.
Further deploys​
When a previous version of your application is already running, Zerops will start new containers. The count of new containers will be the same as the count of existing containers.
Zerops performs the identical actions for each new container as the first deployment. When all new containers are started your service contains both new and old versions for a short period of time.
The old containers are then removed from the project balancer so they don't receive new requests. The Go process inside each of the old containers is terminated and all old containers are gradually deleted.