-
Notifications
You must be signed in to change notification settings - Fork 363
v3 asynchronous endpoint flow
Chris Selzo edited this page Jun 28, 2018
·
7 revisions
Using AppApplyManifest
as an example:
(Follow along in app_manifests_controller.rb
)
- hit endpoint
/apply_manifest
- construct message from request values
- validations on message
- fetch models required —> the resource, app, and others (space, org)
- raise errors if the resource is not found or if user is not authorized
- initialize the action we want
- initialize the job we want with the action, message, and any other necessary parameters
- record an audit event
- enqueue the job
- this enqueues it in the
Delayed::Job
table, possibly with a timeout, run by the worker process on the scheduler VM —> in contrast to jobs run inline/immediately, which would be run on the worker processes on the API VM
- this enqueues it in the
- build the url using the job guid and return that to the user
(Follow along in app_apply_manifest.rb
)
- load the model needed from the db -
App
, in this case - apply side effects - apply all process updates and scales
- update the model -
AppUpdate.update
- go into a transaction
- update the resource
- save
- record event as necessary
- apply any changes to associated models, eg.
- patch environment variables
- create service bindings if there are services on the message
- return the modified model
-
Pipelines
-
Contributing
- Tips and Tricks
- Cloud Controller API v3 Style Guide
- Playbooks
- Development configuration
- Testing
-
Architectural Details
-
CC Resources
- Apps
- Audit Events
- Deployments
- Labels
- Services
- Sidecars
-
Dependencies
-
Troubleshooting
- Ruby Console Script to Find Fields that Cannot Be Decrypted
- Logging database queries in unit tests
- Inspecting blobstore cc resources and cc packages(webdav)
- How to Use USR1 Trap for Diagnostics
- How to Perf: Finding and Fixing Bottlenecks
- How to get access to mysql database
- How To Get a Ruby Heap Dumps & GC Stats from CC
- How to curl v4 internal endpoints with mtls
- How to access Bosh Director console and restore an outdated Cloud Config
- Analyzing Cloud Controller's NGINX logs using the toplogs script
-
k8s
-
Archive