Hi, Im new to root access vps’s etc so please bare that in mind.
I’m trying to setup a reusable droplet. I want to be able to spin up droplets with LEMP Stack, Wordpress & Varnish preinstalled. I’ve done this already using snapshots but the MySQL Password is the same on every droplet. Is there anyway I can get them auto generated so their different on every preset droplet I spin up?
All responses are appreciated
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey Jake - Currently you can’t run post droplet creation scripts that I know of. Booting up a snapshot on a new droplet is similar to waking up your computer from sleep mode, it’s just a point in time that the machine resumes operations from.
What I’d recommend though is to add that as the last part of your droplet creation from your control panel. You can use a tool like Ansible to generate the login details for you and report them back or have them emailed to you. For the control panel you can issue the API commands to create the droplet and then run the Ansible tasks that you need with ansible-playbook to set the new MySQL login and create a new SFTP login.
Related links:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.