The Deployer

The deployer can be seen as a set of commands in nuv, namely the devel and project commands. With the former you can run some development-related tasks.

  • nuv devel detect: to check if a project folder satisfies the conditions to be deployed as a project;

  • nuv devel scan: to generate the manifest.yaml file that describes the project (required for deployment) if you don’t wanna write it yourself;

  • nuv devel deploy: to quickly run the previous 2 commands and then nuv project deploy so you can do the entire procedure in one go.

Meanwhile nuv project deploy is the actual deployment operation that can be applied on a folder with at least the packages sub-folder and a manifest.yaml inside.

Scanning a Project

The "packages" Folder

When using nuv devel scan and the packages folder is found, nuv will proceed to build a manifest file where each sub-folder of packages will be a Nuvolaris package and each file at this level will be a Single File Action under the default package, which is present in every Nuvolaris deployment.

Entering a Package

For each of the "package" folders if nuv finds files, they will be Single File Actions under the package corresponding to the folder’s name. If it finds sub-folders, they will Multi File Actions instead. In this latter case, the sub-folder will be compressed into a .zip file (MFA are deployed as zips).

Inner web Folders

There can be a special web sub-folder that will be used to deploy a static frontend under the relative package name, so in this case, it is not an MFA.

Single File Actions

nuv considers a Single File Action any file that ends with the extension of a supported runtime. When the deployer deploys these actions, it practically invokes the nuv action create command for each of these files with the flag --kind nodejs:default, --kind python:default, --kind go:default and --kind java:default depending on the relative runtime.

The possible runtimes are described by runtime.json which can be downloaded from the configured API host.

If the extension is in format: .<version>.<extension>, the command will have --kind <language>:<version>.

Multi File Actions

Multi File Actions consist of a folder with a main file inside together with other files, which could also be libraries or other dependencies (think of node_modules for Javascript actions).

These kind of actions are deployed as zips, so the deployer will create a zip archive of the folder and then add its path to the manifest file.

To chose the right runtime for the action, nuv will look for the extension of the main file and create a corresponding zip as follows:

  • <action-name>.js.zip if there is a main.js

  • <action-name>.py.zip if there is a main.py

  • <action-name>.go.zip if there is a main.go

  • <action-name>.java.zip if there is a Main.java

If no main is found, it will be just .zip.

As for the Single File Action, the extension will determine the runtime version.