this pulumi script sets up a number of hcloud hosts using hetzner how to use:
- Edit index.ts to add the machines you need for this tutorial, every machine with a username and a password. off course, don't commit your edits
- Set up pulumi. Make sure you have a recent nodeJS version installed, like 16.14.2 (otherwise you can use the
n
package to update)
# install pulumi
curl -sSL https://get.pulumi.com | sh
# create a local stack (alternative: create pulumi account)
pulumi login --local
# install SDK
npm install
If you get weird errors in the above, check that your nodejs installation is recent (hint: the one that comes with ubuntu IS NOT RECENT. install the official one).
- Go to cloud.hetzner.com, create a project and for this project get an API token.
- Set the token
# change the passphrase if you didn't have it empty
pulumi config set --secret hcloud:token <YOURTOKEN>
- Create the machines
pulumi up
-
Do the tutorial.
-
At the end, destroy everything
pulumi destroy