Hi, is there a way to run a script on node creatio...
# general
n
Hi, is there a way to run a script on node creation? This would allow us to configure our nodes without having to maintain custom images
b
probably via cloud init. What provider?
n
bare EC2
b
I don't understand, are you trying to have Rancher spin up a node? Are you provisioning the node manually? Are you using the AWS provider in Rancher to do it?
n
I have a RKE2 cluster managed by rancher. I'd like to be able to configure some kernel parameters (inotify limits) without having to maintain my own custom ubuntu system image.
b
Right, but how was it provisioned?
Are you using the EC2 AWS provisioner or did you do it manually?
The bare part is what confused me.
n
ah sorry, I just meant the EC2 AWS provisioner (bare as opposed to managed, like EKS)
sorry for the confusion
b
It's ok. Doesn't the EC2 AWS provisioner have a cloud init section?
n
I'm not familiar with cloud-init, but I will take a look and report back!
b
makes it easy to install packages and do silly things for customization
n
@bland-article-62755 I can't seem to find docs on how to set the cloud-init script in the rancher UI, unfortunately
b
for harvester (assuming aws is the same) it's here:
image.png
n
It seems like the aws ec2 provider doesn't have those options 😕
You might be able to set up a template with that data instead
We don't use AWS all that much in my shop, but maybe someone else has an idea
n
Thanks again! The article seems to talk mainly about Amazon Linux (which we don't use) but maybe it applies to other distros too.,
b
It does.
n
Im having trouble seeing how I could point rancher to use this template