Transition MITxOnline to Serveless Valkey as Redis Replacement
Transition MITxOnline to Serveless Valkey as Redis Replacement
- [x] Create Pulumi ServerlessCache Component
- [ ] Integrate that component into MITx Online in addition to existing redis
- [ ] Deploy in CI and restore from current snapshot
- [ ] Do another deploy removing the old style cache
I am stuck trying to get the Pulumi ec2.ServerlessCache object the list of subnet_ids that it needs. Mike told me I could grab those from the VPC. We're importing the apps_voc stack already in the applications/mitxonline dunder main.py.
I see a zillion other instances where we grab the subnet_ids from a VPC by simply doing: subnet_ids = my_vpc["subnet_ids"] But when I do that subnet_ids is a Pulumi output, not a list of subnet ids. And I've dickered around trying to get apply to enumerate the list for me, but the lambda apply takes whines when I try to do anything iterator like with it. When I get back on Tuesday if someone hasn't moved this ball in the meantime I plan to pin each of @mike and @tmacey into a corner, or in parallel if necessary to resolve this situation in my tiny brain because this is SUUUPER frustrating. AFAICT this is the last piece we need to get the serverless cache built..
(I also just spent another 1/2 hour noticing Mike's comment about the PulumiString hack Claude came up with, but that doesn't peel this onion either.)
What I have so far is at https://github.com/mitodl/ol-infrastructure/pull/3563/
Mike got me unstuck by passing subnet_ids[:3] rather than the entire list.
Today as I was going to wire this in, I realized that they changed the whole authentication scheme over traditional redis. It's now IAM based.
Here are some relevant resources:
Also I tagged the existing work in case the branch gets deleted.