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
A Netlify Build Plugin that extends Netlify Sites with support for portable and stateful serverless functions using [Nimbella Cloud](https://nimbella.com/product/platform).
9
+
A Netlify Build Plugin that extends Netlify Sites with support for portable and stateful serverless functions using [Nimbella](https://nimbella.com/product/platform). The add-on enables Netlify developers to deploy serverless functions and stateful APIs to the Nimbella cloud 1) with more programming language choices, 2) easier packaging, 3) customizable runtimes and durations, and 4) cloud portability.
10
10
11
11
Learn more about Nimbella's integration for Netlify from [here](https://nimbella.com/integrations/netlify).
-[Use Nimbella Projects with Netlify Sites](#Use-Nimbella-Projects-with-Netlify-Sites)
19
-
-[Deploy Netlify Functions on Nimbella Cloud](#Deploy-Netlify-Functions-on-Nimbella-Cloud)
18
+
-[Use Nimbella Projects with Netlify Sites](#use-nimbella-projects-with-netlify-sites)
19
+
-[Deploy Netlify Functions on Nimbella Cloud](#deploy-netlify-functions-on-nimbella-cloud)
20
20
-[Examples](#examples)
21
21
-[Support](#support)
22
22
-[License](#license)
23
23
24
-
## Setup
24
+
## Add-On Setup
25
25
26
-
> **Note:** Build Plugins are not available on the legacy "Ubuntu Trusty 14.04" build image. Update your Netlify build image to "Ubuntu Xenial 16.04".
26
+
> **Note:**Netlify Build Plugins are not available on the legacy "Ubuntu Trusty 14.04" build image. Update your Netlify build image to "Ubuntu Xenial 16.04".
27
27
28
28
### New to Nimbella
29
29
30
-
Use Netlify addon `nimbella` to connect your Netlify site to Nimbella.
31
-
32
-
1.**Add the Nimbella Add-on for Netlify**
33
-
34
-
Run the below at the base of your local project directory linked to your Netlify site.
35
-
36
-
```sh
37
-
$ netlify addons:create nimbella
38
-
```
39
-
The addon will create a namespace where your resources reside. You can claim the namespace by running `netlify addons:auth nimbella`.
40
-
41
-
2.**Add Nimbella Build Plugin to Your Netlify Site**
42
-
43
-
Append the below to your `netlify.toml`.
44
-
45
-
```toml
46
-
[[plugins]]
47
-
package = "netlify-plugin-nimbella"
48
-
```
30
+
Add the Nimbella add-on for Netlify to connect your Netlify site to Nimbella.
31
+
To do that, run the following command from the base of your local project directory which is linked to your Netlify site.
32
+
```sh
33
+
netlify addons:create nimbella
34
+
```
49
35
50
-
### Existing Nimbella User
36
+
The addon will create a Nimbella namespace where your resources are allocated. Your Nimbella namespace includes your serverless functions, a dedicated key-value store, and access to an integrated object store.
51
37
52
-
Existing users need to create a Netlify Build environment variable so the plugin can deploy the resources under their account. Follow the steps below to use your existing account with the plugin.
38
+
You may claim the namespace and login to your Nimbella account by running `netlify addons:auth nimbella`.
53
39
54
-
1.**Create Netlify Build Environment Variable**
40
+
### Existing Nimbella Developer
55
41
56
-
Make sure you have the [Nimbella CLI `nim`](https://nimbella.io/downloads/nim/nim.html) installed. You can do that from the CLI web page or by visiting [`nimbella.com/login`](https://nimbella.com/login)to login.
42
+
You can use the Nimbella add-on for Netlify with your existing Nimbella account. This is accomplished by creating a Netlify Build environment variable so the plugin can deploy the resources to the Nimbella namespace of your choosing.
57
43
58
-
Generate a token using the CLI by running the following command:
59
-
```bash
60
-
nim auth export --non-expiring
61
-
```
44
+
1. You will need to you the [Nimbella CLI `nim`](https://nimbella.io/downloads/nim/nim.html) or the [Nimbella Workbench](https://nimbella.io/wb) to export a login token to run the command shown below. If you want to sign up for a free Nimbella account or to login, visit [`nimbella.com/login`](https://nimbella.com/login)) to get started.
62
45
63
-
Next, visit [`https://app.netlify.com/sites/<your-site-name>/settings/deploys#environment`](https://app.netlify.com/sites/<your-site-name>/settings/deploys#environment) to create an environment variable named `NIMBELLA_LOGIN_TOKEN` with your the token you just obtained.
46
+
```sh
47
+
nim auth export --non-expiring
48
+
```
64
49
65
-
2.**Add Nimbella Build Plugin to Your Netlify Site**
50
+
2.Next, visit [`https://app.netlify.com/sites/<your-site-name>/settings/deploys#environment`](https://app.netlify.com/sites/<your-site-name>/settings/deploys#environment)to create an environment variable named `NIMBELLA_LOGIN_TOKEN` and provide the the token you just obtained as its value.
66
51
67
-
Append the below to your `netlify.toml`.
52
+
### Minimal Netlify TOML Configuration
68
53
69
-
```toml
70
-
[[plugins]]
71
-
package = "netlify-plugin-nimbella"
72
-
```
54
+
Once your add-on is configured, you need to add the Nimbella Build Plugin to Your Netlify Site. This is done by appending the section below to your `netlify.toml` file.
73
55
74
-
## Inputs
56
+
```toml
57
+
[[plugins]]
58
+
package = "netlify-plugin-nimbella"
59
+
```
75
60
76
-
This section describes the possible inputs that the plugin can accept.
61
+
You may provide additional configuration in the `netlify.toml` file to configure the resources available to your serverless functions, or to configure the API path for your functions. Here is an example.
77
62
78
63
```toml
79
64
[nimbella]
@@ -85,15 +70,15 @@ path = "/.netlify/functions/" # The prefix path to access your deployed packages
85
70
86
71
## Usage
87
72
88
-
Learn how to structure your repository and `netlify.toml` for this plugin to deploy your functions on Nimbella Cloud.
73
+
In this section, you will learn how to structure your repository and `netlify.toml` for this plugin to deploy your functions on Nimbella Cloud.
89
74
90
75
#### Use Nimbella Projects with Netlify Sites
91
76
92
-
> Learn about Nimbella projects[here](https://nimbella.io/downloads/nim/nim.html#overview-of-nimbella-projects-actions-and-deployment)
77
+
The Nimbella add-on for Netlify allows you to use [Nimbella projects](https://nimbella.io/downloads/nim/nim.html#overview-of-nimbella-projects-actions-and-deployment) to automate packaging and deployment. We suggest reading the documentation about [Nimbella projects](https://nimbella.io/downloads/nim/nim.html#overview-of-nimbella-projects-actions-and-deployment) at some point. We provide a quick introduction here.
93
78
94
-
All we need is a directory named `packages` at the base of your repository. The plugin will automatically deploy the packages inside `packages` and will also create redirect rules so all requests to `/.netlify/functions/*`will be redirected to functions (actions) deployed on Nimbella.
79
+
Nimbella projects inspect a directory named `packages` at the base of your repository. The contents of this directory dictate the serverless functions that are deployed. The plugin will automatically deploy the functions inside `packages` and will also create redirect rules so all requests to `/.netlify/functions/*`are redirected to functions (also called actions) deployed on Nimbella.
95
80
96
-
For example, let's imagine the following structure:
81
+
For example, for the following project structure:
97
82
98
83
```
99
84
site
@@ -111,9 +96,9 @@ site
111
96
└── index.html
112
97
```
113
98
114
-
To invoke the function `login`, we would make a request to `https://your-site.com/.netlify/functions/auth/login` (i.e. we need to prefix the package name `auth` to invoke the function `login`.)
99
+
You will invoke the function `auth/login.js` via the API end point `https://your-site.com/.netlify/functions/auth/login`.
115
100
116
-
If you're using Netlify Functions, you need to change the base prefix `/.netlify/functions/` to something different (e.g. `/api/`) in `netlify.toml` so Netlify Functions can be accessed using `/.netlify/functions/`route and Nimbella Functions can be accessed using `/api/` route.
101
+
If you're using Netlify Functions, you need to change the base prefix `/.netlify/functions/` to something different (e.g. `/api/`) in `netlify.toml` so Netlify Functions can be accessed using `/.netlify/functions/` and Nimbella Functions can be accessed using `/api/` route.
117
102
118
103
```toml
119
104
[nimbella]
@@ -143,15 +128,15 @@ All enviroment variables present in the build runtime during Netlify build (exce
143
128
144
129
These are few sites that use `netlify-plugin-nimbella` to deploy frontend content to Netlify and functions on Nimbella.
-[Combining Netlify with Nimbella and Fauna](https://github.com/nimbella/netlify-faunadb-example)
133
+
-[Optical character recognition using Nimbella key-value and object stores](https://github.com/nimbella/netlify-nimbella-ocr)
149
134
150
135
Look at `netlify.toml` of these repositories to get an idea on how the plugin is used.
151
136
152
137
## Support
153
138
154
-
We're always happy to help you with any issues you encounter. You may want to [join our Slack community](https://nimbella-community.slack.com) to engage with us for a more rapid response.
139
+
We're always happy to help you with any issues you encounter. You may want to [join our Slack community](https://nimbella-community.slack.com) to engage with us for a more rapid response. Otherwise, open an issue and provide us with details about your situation so we can respond adequately.
0 commit comments