Question

How to create custom reusable vps

  • Posted August 16, 2014

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

Subscribe
Share

just a note. The end result once this is setup correctly is planned to be a control panel where I can spin up a Wordpress droplet with everything set, get emailed the ssh login, as well as the PHPMyAdmin, and SFTP details and its ready to go.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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: