Cloud deployment
Once your project is ready, you can deploy it to the cloud with a single command:
spai deploy
If your project is in another directory, you can specify the path to the project directory:
spai deploy "path-to-directory"
Run the --help
flag to see all the available options:
spai deploy --help
If your project uses global variables that you want to share across services, use -v
:
spai deploy -v A=1 -v B=2
However, we recommend you define them in the spai.vars.json
file.
We don’t recommend this mechanism to share environment variables. For that, use the
.env
file instead.
You will get a URL to check the status of your deployment, but you can always visit your Projects to manage all your deployments.
Retrieving the logs
You can retrieve the logs of a particular service with the following command:
spai logs "project-name" "service-type" "service-name"
For example, to retrieve the logs of an API named “analytics” from a project named “my-project”:
spai deploy -v A=1 -v B=2
Use this command to retrieve the logs of a “script”, “api”, “ui” or “notebook”.
Retrieving your projects
You can retrieve a complete list of your projects running in the cloud with:
spai list projects
To retrieve the services of a particular project, use:
spai list services "project-name"
Stopping a project
To stop a project, use the following command:
spai stop "project-name"
You can stop a service with:
spai stop "project-name" "service-type" "service-name"
See other available options with:
spai stop --help
For example, you can stop all your projects with:
spai stop -a
Stopping a project will NOT delete it, so you can restart it later. It will stop running services and free up resources, but your storage layer will remain intact.
Deleting a project
To delete a project, use the following command:
spai delete "project-name"
If you have running services, you will be asked to stop them first.
Deleting a project will remove all its services and storage layer. This action is irreversible.
Troubleshooting
If you encounter any issues during the installation of SPAI, please get in touch with use through our Discord server.
Back to top