yc is the command-line interface (CLI) tool for deploying your serverless functions on Vivgrid.
It provides a convenient way to manage your deployments and serverless instances globally.
Installation
To installyc, you can use the following command:
Usage
yc --help to see all sub-commands.
General Options:
--app-key: The application key of your Vivgrid project.--app-secret: The application secret of your Vivgrid project.--sfn-name: The name of your serverless function calling service.--zipper: The URL of the Vivgrid Zipper Service endpoint, the default value iszipper.vivgrid.com.--env: The environment variables for your serverless function. you can pass multiple--envoptions likeyc deploy app.go --env OPENWEATHERMAP_API_KEY=token --env GITHUB_API_KEY=token.
yc.yml file in the root of your project to configure the deployment settings instead of passing the options every time.
yc deploy [FILE]…
This command will deploy your serverless function to Vivgrid hosting.Manage serverless deployment
Your serverless code will be uploaded to Vivgrid and compiled byyc upload command, after that, you can create the deployments by yc create command.
yc upload
This command will compile your serverless function after uploading to Vivgrid hosting.yc create
This command will create the deployments.yc remove
This command will delete the deployments.Manage serverless state
Once the deployment is created, you can manage its state. Requests will be automatically routed to the nearest region through the Vivgrid Geo-distributed Network.yc status
This command will show the status of the deployments.yc help
This command displays all available sub-commands and their usage.Observability
yc logs
This command will show the real-time logs of serverless instances across all regions.Ctrl + C.
yc.yml Configuration File
You can create a yc.yml file in the root of your project to configure the deployment settings.
zipper(optional): The URL of the Vivgrid Zipper Service endpoint, the default value iszipper.vivgrid.com:9000.secret: The application secret of your Vivgrid project.tool: The name of your serverless function calling service.
Set Environment Variables
You can set environment variables for your serverless function by passing the--env option.