π₯ Make videos programmatically with React
documenting alpha, blog, instance limits
Matt McGillivray1c9deffc08c4
diff --git a/packages/docs/blog/2023-06-01-remotion-cloudrun.md b/packages/docs/blog/2023-06-01-remotion-cloudrun.mdnew file mode 100644index 0000000000..8f79abc6ef--- /dev/null+++ b/packages/docs/blog/2023-06-01-remotion-cloudrun.md@@ -0,0 +1,46 @@+---+slug: cloudrun+title: Remotion Cloud Run+author: Matt McGillivray+author_title: Freelance fullstack developer+author_url: https://github.com/umungobungo+author_image_url: https://avatars2.githubusercontent.com/u/22192773?s=460&u=12eb94da6070d00fc924761ce06e3a428d01b7e9&v=4+---++Welcome to the release notes of a new way to render with Remotion on the cloud! With Remotion Cloud Run, you can now easily render within Google Cloud Platform.++## Streamlined Project Setup++It is not uncommon to see developers needing assistance in [Discord](https://remotion.dev/discord) after a few mis-clicks when setting up Remotion Lambda. For Cloud Run, there are only a few clicks to make in the console, before Terraform takes over to automate the setup process - enabling APIs, creating a role with the required permissions, and creating a Service Account to perform the rendering securely. It even creates your .env file to insert straight into your remotion project!++## Robust Rendering++For now, Remotion Cloud Run only supports a single-threaded rendering process. Remotion Lambda can offer greater speed by spinning up multiple functions and rendering chunks in parallel, before stitching them back together. This functionality can often come at a cost of reliability though, and depending on the product you are building, it may be more important to render reliably than to render faster.++## Easier to understand concurrency + instance limit++Does Lambda have zero concurrency?++When using AWS Lambda, you may have the situation of allowing multiple users to render videos at the same time, and need to calculate whether you have concurrency left on your account to allow another render. Remotion Lambda spins up multiple lambdas for rendering of chunks in parallel, and this needs to be taken into consideration for simultaneous render requests. In Remotion Cloud Run, you can easily set the instance limit to 100 (the default) and know that if 99 users request a render at the same time, you still have one service instance left.++## Higher Quota Limits++At the time of writing, here are the quota differences in GCP and AWS, and what that could mean for your product:++|Constraint|AWS Limit|GCP Limit|Outcome|+|---|---|---|---|+|Disk Size|10 GB|32 GB|In GCP, you can render videos with a larger file size. File size increases as a combination of quality and video length. Lambda is further limited here due to distributed rendering requiring (generally speaking) a cop of all the chunks before they are stitched together. [This brings Lambda's output down to 5gb](/docs/lambda#limitations). |+|Minimum Instances| | | |+|Maximum Timeout|15 minutes|60 minutes|This is tricky to compare due to the nature of distributed rendering on Lambda vs. Cloud Run. As Cloud Run is performing all the rendering in one instance, this allows up to 60 minutes for the entire rendering process. For Lambda, each chunk has a maximum timeout of 15 minutes, but also the function that is performing the concatenation needs to be completed within 15 minutes. |++## Node API and CLI++Where possible, the Cloud Run package has aligned naming conventions. For CLI commands, this generally means replacing `lambda` with `cloudrun`, and `function` with `service`.++## Why choose Cloud Run over Lambda?++Where possible++## New documentation++- Cloudrun documentation\ No newline at end of filediff --git a/packages/docs/docs/cloudrun-alpha.md b/packages/docs/docs/cloudrun-alpha.mdnew file mode 100644index 0000000000..0573359f75--- /dev/null+++ b/packages/docs/docs/cloudrun-alpha.md@@ -0,0 +1,60 @@+---+image: /generated/articles-docs-cloudrun-alpha.png+id: cloudrun-alpha+title: Cloud Run Alpha+crumb: "Version Upgrade"+---++Help us shape Remotion Cloud Run!++[Cloud Run](/docs/cloudrun) is an alternative option to [Remotion Lambda](/docs/lambda). Where Lambda offers a cloud-based rendering solution on AWS (Amazon Web Services), Cloud Run makes use of GCP (Google Cloud Platform).++## What to test++We are looking for feedback on the experience of setting up a GCP Project for Remotion Cloud Run, as well as the required components for rendering on the cloud:+- Deploy a rendering service (in Lambda, a service is known as a function).+- Deploy a Remotion project to GCP Cloud Storage (in Lambda, the storage solution is S3).+- Render a composition stored in Cloud Storage on a Cloud Run service.++We are welcoming any bug reports. See a list of [features of Cloud Run here](/blog/cloudrun).++## How to get started++You will need to use a V4.0 Remotion project, follow the [migration steps](/docs/4-0-migration.md) first if you are currently on V3.++See the [changelog](#changelog) to find the latest version.+Upgrade `remotion` and all packages starting with `@remotion` to the latest version, e.g. `4.0.0`:++```diff title="package.json"+- "remotion": "^3.3.87"+- "@remotion/bundler": "^3.3.87"+- "@remotion/eslint-config": "^3.3.87"+- "@remotion/eslint-plugin": "^3.3.87"+- "@remotion/cli": "^3.3.87"+- "@remotion/renderer": "^3.3.87"++ "remotion": "4.1.0-alpha2"++ "@remotion/bundler": "4.1.0-alpha2"++ "@remotion/eslint-config": "4.1.0-alpha2"++ "@remotion/eslint-plugin": "4.1.0-alpha2"++ "@remotion/cli": "4.1.0-alpha2"++ "@remotion/renderer": "4.1.0-alpha2"+```++Make sure the versions don't have a `^` character in front of it.+++## Changelog++### `unreleased`+++| Issue | Resolution |+|---|---|+|When deploying a service, the image didn't exist in Google Artifact Registry. | Added publish script that runs submit.mjs, automatically deploying the image, tagged with the version number. |+|Functions folder wasn't included in dist folder, so no CLI commandswould work. | Removed this from .npmignore, so that it is included. |+|Fails when using the CLI, to request a render without passing a composition name. It fails to list out compositions| |+|Service name structuring clips off alpha version denominator. During alpha, this will make it impossible to deploy multiple services spanning alpha versions.| |++### `4.1.0-alpha2`++Initial cloud run alpha release π.diff --git a/packages/docs/docs/cloudrun/limits.md b/packages/docs/docs/cloudrun/limits.mdnew file mode 100644index 0000000000..b1e572de6b--- /dev/null+++ b/packages/docs/docs/cloudrun/limits.md@@ -0,0 +1,24 @@+---+image: /generated/articles-docs-cloudrun-limits.png+sidebar_label: Limits+title: Cloud Run Limits+slug: /cloudrun/limits+crumb: "Cloud Run"+---++The standard GCP Cloud Run quotas apply ([see here](https://cloud.google.com/run/quotas)), most notably:++- **Concurrency**: By default, Remotion Cloud Run is deployed with 0 concurrency. This means that each request will get its own instance. This can be changed in the GCP Console, however concurrent requests on one instance has not been tested by the Remotion team.+- **Instances**: The number of Cloud Run Service instances that can be created in response to requests. Configurable, limited to 100 at most. It is possible to request a higher quota limit through the GCP console.+- **Memory**: Configurable, limited to 32GB at most+- **Execution limit**: Configurable, at most 60 minutes++## Steps to increase instance quota+Following steps detailed here - [https://cloud.google.com/run/quotas#increase](https://cloud.google.com/run/quotas#increase)++ <img src="/img/cloudrun/quota-increase/1.jpeg" width="800" />+ <img src="/img/cloudrun/quota-increase/2.jpeg" width="500" />+ <img src="/img/cloudrun/quota-increase/3.jpeg" width="500" />+ <img src="/img/cloudrun/quota-increase/4.jpeg" width="500" />+ <img src="/img/cloudrun/quota-increase/5.jpeg" width="500" />+ <img src="/img/cloudrun/quota-increase/6.jpeg" width="500" />\ No newline at end of filediff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex 205184a2e7..cd6d87b974 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -395,6 +395,7 @@ module.exports = {],mainSidebar: ["4-0-alpha",+ "cloudrun-alpha",{type: "category",label: "Getting started",@@ -563,6 +564,7 @@ module.exports = {"cloudrun/checklist","cloudrun/instancecount","cloudrun/multiple-buckets",+ "cloudrun/limits","cloudrun/upgrading","cloudrun/uninstall",],diff --git a/packages/docs/static/img/cloudrun/quota-increase/1.jpeg b/packages/docs/static/img/cloudrun/quota-increase/1.jpegnew file mode 100644index 0000000000..6aa1f66ec5Binary files /dev/null and b/packages/docs/static/img/cloudrun/quota-increase/1.jpeg differdiff --git a/packages/docs/static/img/cloudrun/quota-increase/2.jpeg b/packages/docs/static/img/cloudrun/quota-increase/2.jpegnew file mode 100644index 0000000000..2143f129acBinary files /dev/null and b/packages/docs/static/img/cloudrun/quota-increase/2.jpeg differdiff --git a/packages/docs/static/img/cloudrun/quota-increase/3.jpeg b/packages/docs/static/img/cloudrun/quota-increase/3.jpegnew file mode 100644index 0000000000..8be7f0ff5cBinary files /dev/null and b/packages/docs/static/img/cloudrun/quota-increase/3.jpeg differdiff --git a/packages/docs/static/img/cloudrun/quota-increase/4.jpeg b/packages/docs/static/img/cloudrun/quota-increase/4.jpegnew file mode 100644index 0000000000..08d20fb920Binary files /dev/null and b/packages/docs/static/img/cloudrun/quota-increase/4.jpeg differdiff --git a/packages/docs/static/img/cloudrun/quota-increase/5.jpeg b/packages/docs/static/img/cloudrun/quota-increase/5.jpegnew file mode 100644index 0000000000..c15d8230aeBinary files /dev/null and b/packages/docs/static/img/cloudrun/quota-increase/5.jpeg differdiff --git a/packages/docs/static/img/cloudrun/quota-increase/6.jpeg b/packages/docs/static/img/cloudrun/quota-increase/6.jpegnew file mode 100644index 0000000000..cb9058ece6Binary files /dev/null and b/packages/docs/static/img/cloudrun/quota-increase/6.jpeg differ