You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/get-started/foundations/deployment/index.mdx
+32-15Lines changed: 32 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,38 @@ Alternatively, if you're looking for a simple deployment process, you can use or
30
30
31
31
It's important to know which type of provider you're using, as the configuration options and deployment process will differ between them.
32
32
33
-
Nitric ships with five official providers. The first three are direct deployment providers, and the last two are IaC providers.
33
+
## How Providers Work
34
+
35
+
Nitric providers are plugins that are responsible for deploying your application to a specific target platform. They can be used to deploy your application directly or to generate Infrastructure-as-Code for deployment.
36
+
37
+
### Deployment
38
+
39
+
When you run `nitric up`, the provider plugin is responsible for deploying your application to the target platform. This typically involves the following steps:
40
+
41
+
1.**Build the application**: The Nitric CLI will build the application using the configuration in the `nitric.yaml` file. This includes building container images for each service.
42
+
2.**Run the application in resource collection mode**: Nitric will run the application in a mode where it collects the resources used by the application. This is used to generate the graph of cloud resources required to run the application.
43
+
3.**Run the provider plugin**: Nitric will run the provider plugin to deploy the application to the target platform. The provider plugin will use the resource graph from the previous step and service container images to determine the required cloud resources.
44
+
4.**Result**: The provider plugin will either deploy the application to the target platform directly or generate IaC code for you to deploy. The deployment process will vary depending on the provider you're using.
Provider plugins aren't just about deploying your application. They also provide a runtime adapter that allows your application to interact with cloud services in a cloud-agnostic way.
51
+
52
+
This allows code like `bucket.file('file.txt').read()` to work across platforms, even though the underlying services are different.
53
+
54
+
The runtime adapter acts as a Nitric protocol compliant server, accepting runtime calls made by a Nitric client (such as one of the [Language SDKs](/reference/languages)), for example calling `.read()` on a file in a bucket. The runtime adapter translates these requests into cloud-specific API requests, typically abstracting common boilerplate such as locating SDK credentials for the cloud specific SDK.
55
+
56
+
This allows your services, functions, etc. to be built, tested and run independent of any specific cloud service. The end result is code that's faster to write, easier to test and remains portable between services and cloud providers.
57
+
58
+
It also significantly reduces the burden of writing project-specific Infrastructure as Code and ensures the application and its deployment automation don't drift apart as development continues.
Nitric ships with five pre-built providers. The first three are direct deployment providers, and the last two are IaC providers.
34
65
35
66
### Direct Deployment Providers
36
67
@@ -96,20 +127,6 @@ In the case of IaC providers, the provider plugin will generate IaC code for you
96
127
97
128
The Nitric CLI command to tear down the application is `nitric down`. This command simply runs the provider plugin to tear down the application. This command is only available for direct deployment providers.
98
129
99
-
### Runtime Adaptation
100
-
101
-
Provider plugins aren't just about deploying your application. They also provide a runtime adapter that allows your application to interact with cloud services in a cloud-agnostic way.
102
-
103
-
This allows code like `bucket.file('file.txt').read()` to work across platforms, even though the underlying services are different.
104
-
105
-
The runtime adapter acts as a Nitric protocol compliant server, accepting runtime calls made by a Nitric client (such as one of the [Language SDKs](/reference/languages)), for example calling `.read()` on a file in a bucket. The runtime adapter translates these requests into cloud-specific API requests, typically abstracting common boilerplate such as locating SDK credentials for the cloud specific SDK.
106
-
107
-
This allows your services, functions, etc. to be built, tested and run independent of any specific cloud service. The end result is code that's faster to write, easier to test and remains portable between services and cloud providers.
108
-
109
-
It also significantly reduces the burden of writing project-specific Infrastructure as Code and ensures the application and its deployment automation don't drift apart as development continues.
Since an application can be deployed to multiple environments and cloud providers, Nitric uses stack files to identify these deployment targets. These files can be created by running the `nitric stack new` CLI command.
0 commit comments