I’d like to automatically run these steps when a new droplet is created:
Is this possible and how would i be able to accomplish this, say, with your api?
I would also need to work with serverpilots api as well correct?
Perhaps use the two together to create a dashboard of some sorts?
Thanks ahead of time!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
We just released a new feature that sounds like it might help with this use case. Our metadata service allows you to provide “user-data” when you create a new droplet. This data can then be used to allow you to configure the server on first boot. It will run bash scripts or cloud-config files.
Using a cloud-config file, you could run the ServerPilot script automatically on first boot and set a root password. It would look something like:
This would set a root password that had to be changed on first login.
Of course there is a lot more you can do with this, create new users, add ssh keys, etc… For more information, check out these tutorials:
An Introduction to Droplet Metadata
An Introduction to Cloud-Config Scripting
We just released a new feature that sounds like it might help with this use case. Our metadata service allows you to provide “user-data” when you create a new droplet. This data can then be used to allow you to configure the server on first boot. It will run bash scripts or cloud-config files.
Using a cloud-config file, you could run the ServerPilot script automatically on first boot and set a root password. It would look something like:
This would set a root password that had to be changed on first login.
Of course there is a lot more you can do with this, create new users, add ssh keys, etc… For more information, check out these tutorials:
An Introduction to Droplet Metadata
An Introduction to Cloud-Config Scripting
Hello guys, I have been trying to achieve this in PHP but failed so far :( any help would be welcome, I need to connect my droplet when I create it with DO API … Thanks in advance for taking the time to help.
Thanks a lot guys!