Deploy an application
Prerequisites - Install the Spin CLI
Before developing a Spin application, you need to have the Spin CLI installed locally. Here’s a way to install the Spin CLI:
curl -fsSL https://developer.fermyon.com/downloads/install.sh | bash
It’s easier if you move the spin binary somewhere in your path, so it can be accessed from any directory. E.g.,
sudo mv ./spin /usr/local/bin/spin.
You can verify the version of Spin installed by running
Log in to the Fermyon Cloud
Next, you can log in to the Fermyon Cloud, which requires your GitHub account to sign in.
$ spin login Copy your one-time code: XXXXXXXX ...and open the authorization page in your browser: https://cloud.fermyon.com/device-authorization Waiting for device authorization... Device authorized!
This command generates an authentication code for your device to be authorized on the Fermyon Cloud.
Deploy your application
After having signed in to the Fermyon Cloud, you deploy the application, by running the following command in the directory where your applications
spin.toml file is located.
$ spin deploy Uploading cloud_start version 0.1.0+XXXXXXXX... Deploying... Waiting for application to become ready... ready Available Routes: cloud-start: https://cloud-start-XXXXXXXX.fermyon.app (wildcard)
Take a look at the Quickstart article for how to get a pre-built application to deploy.
spin deploy can point to a spin.toml file by using the
Congratulations on deploying your Spin Application! 🥳
- Next, let’s look at how to upgrade an application.