From a new account to a running app
With a database and its own domain. Every step works in the console too; these are the commands.
With a database and its own domain. Every step works in the console too; these are the commands.
de1a Falkenstein the default zone
de1b Nuremberg the recorded deploy ran here
Register at the console. You become the owner of a new organization.
For Linux and macOS. dcloud login shows a code and opens the console in your browser; approve it there, and the CLI holds a key that acts as you for 90 days.
curl -fsSL https://console.platform.deutschecloud.app/api/cli/install.sh | shdcloud logindcloud whoami Any public image works; your own goes to the container registry first. The first deployment also creates the app’s machine: in the recording, that is most of the 80 seconds. The id line of the output is the app id that the later steps ask for.
dcloud deploy apps create --name hello --builder image \ --image-ref docker.io/traefik/whoami:v1.10 --port 80id b903c545-f3c2-49ea-aaad-ca18842ab562dcloud deploy apps deploy hello --wait12:52:28 [provision] Provisioning a new app server12:53:48 [release] Deployment is live dcloud deploy apps create --name hello --builder image \ --image-ref docker.io/traefik/whoami:v1.10 --port 80id b903c545-f3c2-49ea-aaad-ca18842ab562status createdinstanceType performance-1defaultUrl hello.titanom-demo-7091.apps.platform-development.deutschecloud.appdcloud deploy apps deploy hello --waithello: deployment 81909c7a-4364-4411-85d5-e2d97226f641 (generation 3) started12:52:28 [provision] Provisioning a new app server12:52:28 [provision] App server i-337b86bb ready; waiting for the agent to roll out12:53:33 [bootstrap] Machine booted; installing the container runtime12:53:41 [bootstrap] Container runtime and web server are up; installing the machine software12:53:42 [rollout] Machine started rolling out generation 312:53:44 [rollout] Image: pulled traefik/whoami:v1.10 in 1.7s12:53:45 [rollout] The rollout on this machine took 2.2s12:53:48 [release] Deployment is livelive hello generation 3curl https://hello.titanom-demo-7091.apps.platform-development.deutschecloud.appHostname: c8651f717ed8GET / HTTP/1.1Host: hello.titanom-demo-7091.apps.platform-development.deutschecloud.app 80 seconds from the command to live
Counted in the log above, from its first line at 12:52:28 to “Deployment is live” at 12:53:48.
A single node is available in about two minutes and is private to your network. Binding creates a role for the app and hands it DATABASE_URL and the PG* variables at the next rollout. <app id> is the id from step 3; <database id> is in the list the second command prints.
dcloud rds instances create \ --identifier hello-db \ --instance-class performance-2 \ --db-name hellodcloud rds instances listdcloud deploy database bind <app id> \ --db-instance-id <database id> \ --redeploy Either create a CNAME at your DNS provider, or move the domain’s nameservers to a hosted zone here. The certificate follows within about a minute of the name resolving.
dcloud deploy domains add <app id> \ --domain www.example.comdcloud dns zones create \ --name example.com Everything is billed while it exists. Each delete asks first; add --yes in a script. dcloud dns zones list prints the id of the zone.
dcloud deploy apps delete <app id>dcloud rds instances delete \ <database id>dcloud dns zones delete <zone id> The documentation is part of the console and can be read without an account.