Notification When Pod Is Deployed

Hello, I'm an admin of a research group which uses runpod. I would like to receive a notification anytime a pod is deployed, along with it's specs (most importantly the GPU type, num GPUs, storage info, community or secure cloud, the image which is being used, and the account which launched it). My hope is to then automate some admin things and run commands (such as automatically terminating the pod) after init. What's the best way to do this?
Solution:
@muddyfootprints. we don't currently offer notifications for when a new pod is created, however I have taken note of this thread for feedback for the team which will be reviewed by leadership tomorrow.
Jump to solution
27 Replies
nerdylive
nerdylive•7mo ago
You can set the startup command to a script if you want to Or from the template itself
muddyfootprints.
muddyfootprints.OP•7mo ago
The thing which I'd be checking is if people are using the correct template
nerdylive
nerdylive•7mo ago
Not sure if there is a notification for everytime pod is deployed
muddyfootprints.
muddyfootprints.OP•7mo ago
So that wouldn't work
nerdylive
nerdylive•7mo ago
just deploy from graphql api if you want Or a tech guy should deploy it
muddyfootprints.
muddyfootprints.OP•7mo ago
??
nerdylive
nerdylive•7mo ago
The pods
muddyfootprints.
muddyfootprints.OP•7mo ago
I think youre misunderstanding my use case
nerdylive
nerdylive•7mo ago
hmm? You are using teams on runpod, allowing other users to create pods using their own configuration and you need the platform to report to you automatically? Also you need to run commands inside the pod after initializing From runpod itself, the notification available is for outage, billings, and some other but there is no notification for every each pod created i think so you would have to query them via the graphql api and check the pods deployed, template, gpu type, etc ( by polling ) Oh wait, there is another way. by using a startup script on the pod, it has to hit a webhook endpoint with the data of the pod are those good enough?
muddyfootprints.
muddyfootprints.OP•7mo ago
The thing is that I don't have guarantees that any script I write will be executed by the pod because there's no way to enforce that through runpod.
nerdylive
nerdylive•7mo ago
Using templates
muddyfootprints.
muddyfootprints.OP•7mo ago
I can't enforce a user to use a templste
nerdylive
nerdylive•7mo ago
Yeah you'll have to communicate them through your team Or make a simple web ui for them to create pods Using predefined templates Check the graphql reference on the docs
muddyfootprints.
muddyfootprints.OP•7mo ago
Yes, that's the whole issue of it. I can communicate and I can set up interfaces but people can (and prob will) still set up pods without it, and what I'm looking for is an enforcement mechanism. The hacky way around it is setting up a cronjob on a server which periodically checks the pods deployed, which seems like is what I'll need to do. It's just a pain to do so and I wish runpod had better admin infrastructure in place
nerdylive
nerdylive•7mo ago
Well don't invite them to runpod as administrator Just as basic to connect only
muddyfootprints.
muddyfootprints.OP•7mo ago
But then someone has to be I charge of deploying pods
nerdylive
nerdylive•7mo ago
With the interfaces you can enforce which template to use and not let them modify the value right? Save the API keys on the back end, not in the front end So you can just put a fixed value under the Templateid on the graphql api
muddyfootprints.
muddyfootprints.OP•7mo ago
Yeah, I guess that could work instead of periodically checking. That still requires me to put up a server which I'd have to separately manage, but I can just byte the bullet if need be.... I'll have to do some thinking on which exactly is the right call. Thanks
nerdylive
nerdylive•7mo ago
Yeah or a light cronjob would do but it cant enforce as much as the interface
muddyfootprints.
muddyfootprints.OP•7mo ago
I thought about it and the cronjob is the way to go. Having a separate server is too large of a security liability. The poor user experience of getting booted is only there for people who don't follow the recs, so I'm okay with that. Is there any chance my cronjob would get perceived as spam? Not sure what throttling guidelines runpod has on its backend
nerdylive
nerdylive•7mo ago
Use a good smtp What throttling?
digigoblin
digigoblin•7mo ago
You can use something like this for sending mails: https://www.mailjet.com/
Mailjet
Email Delivery Service for Marketing & Developer Teams | Mailjet
Streamline your emailing and boost your sales with Mailjet. We serve all your email and SMS needs with one simple and powerful service.
digigoblin
digigoblin•7mo ago
They have a free tier and then after that you have to start paying. You get 6000 emails per month/200 emails per day on free tier, which is probably more than enough for this. Rate limiting. Like Serverless has an IP rate limit so you can't send too many /status requests or your IP gets rate limited. I am not sure whether GraphQL API also has rate limiting in place.
nerdylive
nerdylive•7mo ago
i thought you would run cronjob inside the pod and check for env variables huh there will be no throttling there
muddyfootprints.
muddyfootprints.OP•7mo ago
No, the service wouldn't be coming from a pod. I can draw a systems diagram later on if that helps
nerdylive
nerdylive•7mo ago
Ooh its fine no need to do extra for me 🙂
Solution
haris
haris•7mo ago
@muddyfootprints. we don't currently offer notifications for when a new pod is created, however I have taken note of this thread for feedback for the team which will be reviewed by leadership tomorrow.
Want results from more Discord servers?
Add your server