-
Notifications
You must be signed in to change notification settings - Fork 372
feat(cpflow): add ordered renderer workload #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8f0b0a9
106fe5e
372e490
ea63606
8116e70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,11 +20,35 @@ aliases: | |
| default_location: aws-us-east-2 | ||
| # Configure the workload name used as a template for one-off scripts, like a Heroku one-off dyno. | ||
| one_off_workload: rails | ||
|
|
||
| # Templates used when bootstrapping review, staging, or production apps. | ||
| # Keep node-renderer before rails so first-time setup matches deploy_order. | ||
| setup_app_templates: | ||
| # GVC template contains the identity and shared environment. | ||
| - app | ||
|
|
||
| # Resources | ||
| - postgres | ||
| - redis | ||
|
|
||
| # Workloads, like Dyno types on Heroku | ||
| - daily-task | ||
| - node-renderer | ||
| - rails | ||
|
Comment on lines
+34
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor inconsistency worth a one-line clarifying comment: |
||
|
|
||
| # Like the entries in the Heroku Procfile that get deployed when the application code changes | ||
| # and the application image updates. | ||
| app_workloads: | ||
| - node-renderer | ||
| - rails | ||
| - daily-task | ||
|
|
||
| # Deploy the separate React on Rails renderer first, wait for it to become | ||
| # ready, then deploy Rails and cron workloads that share the same image. | ||
| deploy_order: | ||
| - [node-renderer] | ||
| - [rails, daily-task] | ||
|
|
||
| # Additional workloads that are not affected by deploy-image and promote-app-from-upstream | ||
| # These workloads apply to the ps commands | ||
| additional_workloads: | ||
|
|
@@ -54,21 +78,9 @@ apps: | |
| <<: *common | ||
| # QA Apps are like Heroku review apps, but they use `prefix` so you can run a command like | ||
| # this to create a QA app for the tutorial app. | ||
| # `cpflow setup gvc postgres redis rails -a qa-react-webpack-rails-tutorial-1234` | ||
| # `cpflow setup-app -a qa-react-webpack-rails-tutorial-1234` | ||
| qa-react-webpack-rails-tutorial: | ||
| <<: *common | ||
| # Order matters! | ||
| setup_app_templates: | ||
| # GVC template contains the identity | ||
| - app | ||
|
|
||
| # Resources | ||
| - postgres | ||
| - redis | ||
|
|
||
| # Workloads, like Dynos types on Heroku | ||
| - daily-task | ||
| - rails | ||
| # match_if_app_name_starts_with is used to identify these "qa" apps. | ||
| match_if_app_name_starts_with: true | ||
| image_retention_days: 5 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,16 +24,26 @@ spec: | |
| # set to a secure random value using: openssl rand -hex 64 | ||
| # Production apps should configure this manually after app creation via a secret. | ||
| value: 'placeholder_secret_key_base_for_test_apps_only' | ||
| # Pro Node renderer settings. The renderer process runs in the same | ||
| # container as Rails (see .controlplane/Dockerfile CMD). | ||
| # Pro Node renderer settings. Control Plane runs the renderer in the | ||
| # separate node-renderer workload and Rails reaches it over same-GVC DNS. | ||
| - name: RENDERER_PORT | ||
| value: '3800' | ||
| - name: RENDERER_LOG_LEVEL | ||
| value: info | ||
| - name: RENDERER_WORKERS_COUNT | ||
| value: '2' | ||
| # One worker keeps the separate tutorial renderer at minimum baseline cost. | ||
| value: '1' | ||
|
justin808 marked this conversation as resolved.
|
||
| - name: RENDERER_SERVER_BUNDLE_CACHE_PATH | ||
| # Shared by the boot-seed rake task and the Node renderer process. | ||
| value: /app/renderer/.node-renderer-bundles | ||
| - name: RENDERER_URL | ||
| value: http://localhost:3800 | ||
| # Internal same-GVC endpoint for the separate React on Rails Pro Node Renderer workload. | ||
| value: http://node-renderer.{{APP_NAME}}.cpln.local:3800 | ||
| - name: RENDERER_HOST | ||
| value: 0.0.0.0 | ||
| - name: ROLLING_DEPLOY_PREVIOUS_URLS | ||
| # The renderer boot seed pulls the still-live bundle manifest before Rails rolls. | ||
| value: https://{{APP_NAME}}.cpln.app/react_on_rails_pro/rolling_deploy | ||
| # Enable the artificial Suspense demo delay so the streaming fallback is | ||
| # visible on the review-app. Off by default in production deployments. | ||
| - name: RSC_SUSPENSE_DEMO_DELAY | ||
|
|
@@ -46,6 +56,8 @@ spec: | |
| # pull request code, so every mounted secret must be review-safe. | ||
| - name: RENDERER_PASSWORD | ||
| value: cpln://secret/{{APP_SECRETS}}.RENDERER_PASSWORD | ||
|
Comment on lines
57
to
58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When this template is applied to an existing app whose secret dictionary does not yet contain |
||
| - name: ROLLING_DEPLOY_TOKEN | ||
| value: cpln://secret/{{APP_SECRETS}}.ROLLING_DEPLOY_TOKEN | ||
| - name: REACT_ON_RAILS_PRO_LICENSE | ||
| value: cpln://secret/{{APP_SECRETS}}.REACT_ON_RAILS_PRO_LICENSE | ||
| # Part of standard configuration | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.