Service Environments
Service Environments are currently in beta. Contact us to activate them for your service.
Service environments let you create staging
and production
environments under the same service. Each environment can run a different version of your session backend code, letting you test code in one environment (e.g. staging) before deploying it to another (e.g. production). Bring Your Own Compute (BYOC) users can also choose to have staging and production environments spawn to different clusters, each with access to their own resources in separate VPCs.
Usage
Services that use environments will need to include the environment in the connect request URL like so:
POST /v2/service/ACCOUNT/SERVICE/ENVIRONMENT/connect
For example,
POST /v2/service/taylor/hello-world/prod/connect
You can learn more about the HTTP Connect API here.
You may also set which image to use with a service environment using the Jamsocket CLI:
npx jamsocket service use-image SERVICE/ENVIRONMENT -i IMAGE_TAG_OR_DIGEST
For example,
npx jamsocket service use-image hello-world/prod -i sha256:19436b6d2c9082e2aa84e6bae765f92a12dd3bc264a2f05db4c573528e63efff
To see a list of images (along with their tags and digests) that have been pushed to the Jamsocket container registry for your service, you can use the Jamsocket CLI:
npx jamsocket images SERVICE
By default, Jamsocket uses the most recent image with the latest
tag when spawning. If you set a specific image tag with jamsocket service use-image
command, Jamsocket will use the most recent image with that tag. If you set a specific image digest, Jamsocket will use the image with that digest until you run the use-image command with a different image tag or digest.
You can see which image tag/digest each environment is currently set to in the Jamsocket dashboard or with the Jamsocket CLI:
npx jamsocket service info SERVICE
Service Environments are currently in beta. Contact us to activate them for your service.