Waiting for whole blueprint to be ready before going live

I have a Rails application that use the default managed environment, and a private service that is based on a rather large Docker image that take over half an hour to build.

When the blueprint is deployed, the Rails application goes live very quickly, but it takes a while before the new version of the Sidekiq image does.

The problem is that until the Sidekiq private service is deployed, my main application is at version 2 while the Sidekiq image is at version 1. This could be problematic, especially if I have schema changes between the two versions. How can I put all new instances “on hold” until the whole blueprint is ready?

Hi there,

We don’t have a native way of doing this - dependent services like this have been discussed though.

A kind of cheating way to implement this is to have the service that is the faster one set an environment variable that is accessed from the slower one, eg

  envVars: - key: SIDEKIQ_SOMETHING fromService: type: pserv name: sidekiq-service-name envVarKey: SOME_ENV_VAR_ON_SIDEKIQ_SERVICE

this means that the faster service will wait to deploy until the environment variable is available and can be set on the faster service - it doesn’t matter what the var is, it could just be a RENDER_ var or anything. It just creates a dependency that means it will wait for the slower service.

John B
Render Support, UTC+1 :uk:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.