Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am creating a droplet from a snapshot. The droplet contains a folder called youtube-uploader in the root directory. My cloud config looks like this:
#cloud-config
runcmd:
- touch test.txt
- node /root/youtuber-uploader/index.js ID-1234
- touch hello.txt
The droplet is created successfully but the node command is never executed. Both test.txt and hello.txt is created at /. If I ssh into the droplet and run the node command, everything works as expected.
I am making the call to the DO api through a node script and the axios package. The request looks like the following
axios('https://api.digitalocean.com/v2/droplets', {
method: 'POST',
headers: {
Authorization: 'xxxxxx'
},
'Content-Type': 'application/json',
data: {
"name": 'testing'
"region": "nyc3",
"size": "s-6vcpu-16gb",
"image": "45281496",
"ssh_keys": [
24240690
],
"backups": false,
"ipv6": false,
"user_data": `#cloud-config
runcmd:
- touch test.txt
- node /root/youtuber-uploader/index.js ${snap.id}
- touch hello.txt`,
"private_networking": null,
"volumes": null,
"tags": [
"web"
]
}
}
Is there any obvious mistake here? It might be that the script is being called but the id is not being passed so the script is not doing the work its supposed to. Is there anyway I can check for this?
jeffs
0621335d663b4b699a60eb27e28153
accesstrax
Dwight Trumbower
admin
yimprogramming
samunyi90
1d6ce141ab5444dfb1ea2dd29cf4b1
Matt Fricker
joel9b158e40551b15093f213f
EmilJacobs