commit | d985a1b8faf7242a61dd1e289bbddd8e3780c3d0 | [log] [tgz] |
---|---|---|
author | Geoffrey Martin-Noble <gcmn@google.com> | Tue Dec 20 10:06:38 2022 -0800 |
committer | GitHub <noreply@github.com> | Tue Dec 20 10:06:38 2022 -0800 |
tree | 1f5c9f34466f727e7d879e51969752ed4ebde834 | |
parent | 937d1d413e4008a0959aa11301bdf7a13854918f [diff] |
Cloud Run Function for instance self-deletion (#11610) A Cloud Functions proxy enabling GCE VMs in a Managed Instance Group to delete themselves. GCE Managed instance groups don't have any good way to handle autoscaling for long-running workloads. With the autoscaler configured to scale in, instances get only 90 seconds warning to shut down. So we set the autoscaler to only scale out and have the VMs tear themselves down when they're down with their work. This is the approach suggested by the managed instance group team: https://drive.google.com/file/d/1XlwxF_0T7pUnbzhL5ePDoW-Q3GAaLO11. But anything that brings down the VM other than a delete call to the instance group manager API makes the VM get considered "unhealthy", which means it gets recreated in exactly the same configuration, regardless of any update or autoscaling settings. Making the correct API call requires broad permissions on the instance group manager, which we don't want to give the VMs. To scope permissions to individual instances, this proxy service makes use of instance identity tokens to allow an instance to make a call only to delete itself (see https://cloud.google.com/compute/docs/instances/verifying-instance-identity). This makes use of the GCP Cloud Functions serverless offering. It's another level of abstraction on top of Cloud Run, where you don't even need to create your own docker container. I wrote unit tests for this in addition to testing the server locally, but I don't think it's worth adding them to the CI right now because they come with an entire server framework of dependencies and this isn't a part of the project I expect to see active development. Probably more worthwhile would be finding another home for this as a standalone project separate from IREE. skip-ci: not tested by CI
IREE (Intermediate Representation Execution Environment, pronounced as “eerie”) is an MLIR-based end-to-end compiler and runtime that lowers Machine Learning (ML) models to a unified IR that scales up to meet the needs of the datacenter and down to satisfy the constraints and special considerations of mobile and edge deployments.
See our website for project details, user guides, and instructions on building from source.
IREE is still in its early phase. We have settled down on the overarching infrastructure and are actively improving various software components as well as project logistics. It is still quite far from ready for everyday use and is made available without any support at the moment. With that said, we welcome any kind of feedback on any communication channels!
See our website for more information.
IREE is licensed under the terms of the Apache 2.0 License with LLVM Exceptions. See LICENSE for more information.