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.

Hi everyone,
I’m trying to write a provisioning and deployment script for a java application on debian 9.
My provisioning .sh script looks like this :
doctl compute droplet create DocumentationApplicationDroplet --image debian-9-x64 --region sfo2 --size 512mb --ssh-keys 9c:00:ec:04:9a:ed:74:fc:63:da:97:56:36:cb:88:8a --format ID > result.txt
export DROPLET_ID=`tail -1 result.txt`
export DROPLET_IP=`doctl compute droplet get $DROPLET_ID --format PublicIPv4 | tail -1`
ssh root@$DROPLET_IP "apt-get update"
When I run this script it creates a Debian-9 droplet that I can see on the website. But once the droplet is made and the apt-get command gets executed I get ssh: connect to host 159.65.103.157 port 22: Connection timed out The IP you can see is the correct IP that I can also see on the website.
I have also created a new .sh script that looks like this : ssh root@IP_of_my_droplet “apt-get update”
where the IP_of_my_droplet is the same as the one I can see on the website and DROPLET_ID.
When I run this script, it works and apt-get update command gets executed on my droplet.
Any idea what the problem is here?
Kind regards, Simon
SandyLightCyanSubmarine
cos+digitalocean
yyz20002008
Applebane
Bren
sethh
8374a2e23a1b41f68cd667622f7d59
Bruno Buiret
a8be47857c284f679e8b69d47d
Zachary Uram
saliebrahim2003
mdfulk