zuplo 7.8.7 → 7.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/ai-gateway/custom-policies.mdx +2 -1
- package/docs/ai-gateway/usage-limits.mdx +2 -2
- package/docs/api-management/overview.md +2 -2
- package/docs/articles/add-api-to-backstage.mdx +4 -3
- package/docs/articles/api-key-consumer-bucket-portal-ui.mdx +1 -1
- package/docs/articles/api-key-management.mdx +1 -1
- package/docs/articles/migrate-from-apigee.md +3 -3
- package/docs/articles/migrate-from-aws-api-gateway.md +3 -3
- package/docs/articles/migrate-from-azure-apim.md +3 -3
- package/docs/articles/migrate-from-kong.md +3 -3
- package/docs/articles/source-control-setup-github.mdx +2 -2
- package/docs/cli/create-zuplo-api.mdx +4 -4
- package/docs/cli/openapi-merge.mdx +1 -1
- package/docs/cli/openapi-merge.partial.mdx +1 -1
- package/docs/concepts/ai-gateway.mdx +1 -1
- package/docs/concepts/mcp.mdx +4 -4
- package/docs/dedicated/architecture.mdx +1 -1
- package/docs/errors/not-found.mdx +1 -1
- package/docs/getting-started/ai-gateway/portal.mdx +181 -0
- package/docs/getting-started/dev-portal/agent.mdx +148 -0
- package/docs/getting-started/dev-portal/index.mdx +26 -0
- package/docs/getting-started/dev-portal/local.mdx +213 -0
- package/docs/getting-started/dev-portal/portal.mdx +146 -0
- package/docs/{articles/step-3-add-api-key-auth.mdx → getting-started/gateway/add-api-key-auth/index.mdx} +30 -24
- package/docs/{articles/step-3-add-api-key-auth-local.mdx → getting-started/gateway/add-api-key-auth/local.mdx} +26 -21
- package/docs/{articles/step-2-add-rate-limiting.mdx → getting-started/gateway/add-rate-limiting/index.mdx} +20 -14
- package/docs/{articles/step-2-add-rate-limiting-local.mdx → getting-started/gateway/add-rate-limiting/local.mdx} +22 -15
- package/docs/getting-started/gateway/agent.mdx +198 -0
- package/docs/{articles/step-4-deploying-to-the-edge.mdx → getting-started/gateway/deploy-to-the-edge/index.mdx} +36 -27
- package/docs/{articles/step-4-deploying-to-the-edge-local.mdx → getting-started/gateway/deploy-to-the-edge/local.mdx} +46 -18
- package/docs/{articles/step-5-dynamic-rate-limiting.mdx → getting-started/gateway/dynamic-rate-limiting/index.mdx} +21 -12
- package/docs/{articles/step-5-dynamic-rate-limiting-local.mdx → getting-started/gateway/dynamic-rate-limiting/local.mdx} +21 -12
- package/docs/getting-started/gateway/index.mdx +24 -0
- package/docs/{articles/step-1-setup-basic-gateway.mdx → getting-started/gateway/setup-a-basic-gateway/index.mdx} +31 -22
- package/docs/{articles/step-1-setup-basic-gateway-local.mdx → getting-started/gateway/setup-a-basic-gateway/local.mdx} +22 -16
- package/docs/getting-started/index.mdx +25 -0
- package/docs/getting-started/mcp-gateway/agent.mdx +161 -0
- package/docs/getting-started/mcp-gateway/index.mdx +25 -0
- package/docs/{mcp-gateway/quickstart-local.mdx → getting-started/mcp-gateway/local.mdx} +35 -31
- package/docs/{mcp-gateway/quickstart.mdx → getting-started/mcp-gateway/portal.mdx} +64 -48
- package/docs/getting-started/mcp-server/agent.mdx +152 -0
- package/docs/getting-started/mcp-server/index.mdx +25 -0
- package/docs/{articles/mcp-quickstart-local.mdx → getting-started/mcp-server/local.mdx} +24 -13
- package/docs/{articles/mcp-quickstart.mdx → getting-started/mcp-server/portal.mdx} +35 -15
- package/docs/getting-started/migrate/agent.mdx +129 -0
- package/docs/getting-started/migrate/index.mdx +25 -0
- package/docs/getting-started/migrate/local.mdx +141 -0
- package/docs/getting-started/migrate/portal.mdx +129 -0
- package/docs/home.mdx +6 -0
- package/docs/mcp-gateway/connect-clients/chatgpt.mdx +2 -1
- package/docs/mcp-gateway/connect-clients/claude-code.mdx +2 -1
- package/docs/mcp-gateway/connect-clients/claude-desktop.mdx +2 -1
- package/docs/mcp-gateway/connect-clients/cursor.mdx +2 -1
- package/docs/mcp-gateway/connect-clients/vs-code.mdx +2 -1
- package/docs/mcp-gateway/how-it-works.mdx +2 -2
- package/docs/mcp-gateway/how-to/connect-upstream-api-key.mdx +4 -3
- package/docs/mcp-gateway/how-to/curate-tools.mdx +3 -2
- package/docs/mcp-gateway/overview.mdx +3 -3
- package/docs/policies/ai-gateway-smart-router-inbound/doc.md +14 -0
- package/docs/policies/akamai-ai-firewall-v2-inbound/doc.md +7 -0
- package/package.json +5 -5
- package/docs/ai-gateway/getting-started.mdx +0 -307
- package/docs/dev-portal/local-development.mdx +0 -72
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
category: API Management
|
|
3
|
+
showLastModified: false
|
|
4
|
+
suggestEdit: false
|
|
5
|
+
title: Add rate limiting - Portal
|
|
6
|
+
description:
|
|
7
|
+
Protect the gateway you just built by adding a rate limiting policy to a route
|
|
8
|
+
and watching it reject requests over the limit in the Zuplo Portal.
|
|
4
9
|
---
|
|
5
10
|
|
|
11
|
+
<WizardSteps build="gateway" method="portal" step="add-rate-limiting" />
|
|
12
|
+
|
|
13
|
+
<MethodTabs build="gateway" method="portal" step="add-rate-limiting" />
|
|
14
|
+
|
|
6
15
|
In this guide we'll add simple Rate Limiting to a route. If you don't have one
|
|
7
|
-
ready, complete [Step 1](
|
|
16
|
+
ready, complete [Step 1](../setup-a-basic-gateway/index.mdx) first.
|
|
8
17
|
|
|
9
18
|
Rate Limiting is one of our most popular **policies** - you should never ship an
|
|
10
19
|
API without rate limiting because your customers or internal developers **will**
|
|
@@ -12,10 +21,10 @@ accidentally DoS your API; usually with a rogue `useEffect` call in React code.
|
|
|
12
21
|
|
|
13
22
|
:::info{title="What's a Policy?"}
|
|
14
23
|
|
|
15
|
-
[Policies](
|
|
16
|
-
incoming request or outgoing response. Zuplo offers a wide range of
|
|
17
|
-
built-in (including rate limiting) to save you time. You can check out
|
|
18
|
-
[the full list](
|
|
24
|
+
[Policies](../../../articles/policies.mdx) are modules that can intercept and
|
|
25
|
+
transform an incoming request or outgoing response. Zuplo offers a wide range of
|
|
26
|
+
policies built-in (including rate limiting) to save you time. You can check out
|
|
27
|
+
[the full list](../../../policies/overview.mdx).
|
|
19
28
|
|
|
20
29
|
:::
|
|
21
30
|
|
|
@@ -36,7 +45,7 @@ limiter.
|
|
|
36
45
|
|
|
37
46
|
<ModalScreenshot>
|
|
38
47
|
|
|
39
|
-

|
|
40
49
|
|
|
41
50
|
</ModalScreenshot>
|
|
42
51
|
|
|
@@ -44,7 +53,7 @@ limiter.
|
|
|
44
53
|
|
|
45
54
|
<ModalScreenshot>
|
|
46
55
|
|
|
47
|
-

|
|
48
57
|
|
|
49
58
|
</ModalScreenshot>
|
|
50
59
|
|
|
@@ -53,7 +62,7 @@ limiter.
|
|
|
53
62
|
(`requestsAllowed`) every 1 minute (`timeWindowMinutes`). You can explore the
|
|
54
63
|
rest of the policy's documentation and configuration in the right panel.
|
|
55
64
|
|
|
56
|
-

|
|
57
66
|
|
|
58
67
|
To apply the policy, click **OK**. Then, save your changes to redeploy.
|
|
59
68
|
|
|
@@ -64,7 +73,7 @@ limiter.
|
|
|
64
73
|
|
|
65
74
|
<ModalScreenshot>
|
|
66
75
|
|
|
67
|
-

|
|
68
77
|
|
|
69
78
|
</ModalScreenshot>
|
|
70
79
|
|
|
@@ -72,6 +81,3 @@ limiter.
|
|
|
72
81
|
echo API.
|
|
73
82
|
|
|
74
83
|
</Stepper>
|
|
75
|
-
|
|
76
|
-
**NEXT** Try
|
|
77
|
-
[Step 3 - Add API Key Authentication](./step-3-add-api-key-auth.mdx).
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
category: API Management
|
|
3
|
+
showLastModified: false
|
|
4
|
+
suggestEdit: false
|
|
5
|
+
title: Add rate limiting - Editor
|
|
6
|
+
description:
|
|
7
|
+
Protect the gateway you just built by adding a rate limiting policy to a route
|
|
8
|
+
and watching it reject requests over the limit with the Zuplo CLI and your
|
|
9
|
+
editor.
|
|
4
10
|
---
|
|
5
11
|
|
|
12
|
+
<WizardSteps build="gateway" method="local" step="add-rate-limiting" />
|
|
13
|
+
|
|
14
|
+
<MethodTabs build="gateway" method="local" step="add-rate-limiting" />
|
|
15
|
+
|
|
6
16
|
In this guide we'll add simple Rate Limiting to a route. If you don't have one
|
|
7
|
-
ready, complete [Step 1](
|
|
17
|
+
ready, complete [Step 1](../setup-a-basic-gateway/local.mdx) first.
|
|
8
18
|
|
|
9
19
|
Rate Limiting is one of our most popular **policies** - you should never ship an
|
|
10
20
|
API without rate limiting because your customers or internal developers **will**
|
|
@@ -12,10 +22,10 @@ accidentally DoS your API; usually with a rogue `useEffect` call in React code.
|
|
|
12
22
|
|
|
13
23
|
:::info{title="What's a Policy?"}
|
|
14
24
|
|
|
15
|
-
[Policies](
|
|
16
|
-
incoming request or outgoing response. Zuplo offers a wide range of
|
|
17
|
-
built-in (including rate limiting) to save you time. You can check out
|
|
18
|
-
[the full list](
|
|
25
|
+
[Policies](../../../articles/policies.mdx) are modules that can intercept and
|
|
26
|
+
transform an incoming request or outgoing response. Zuplo offers a wide range of
|
|
27
|
+
policies built-in (including rate limiting) to save you time. You can check out
|
|
28
|
+
[the full list](../../../articles/policies.mdx).
|
|
19
29
|
|
|
20
30
|
:::
|
|
21
31
|
|
|
@@ -23,8 +33,8 @@ Zuplo offers a programmable approach to rate limiting that allows you to vary
|
|
|
23
33
|
how rate limiting is applied for each customer or request.
|
|
24
34
|
|
|
25
35
|
In this example, we'll add a simple IP-based rate limiter, but you should also
|
|
26
|
-
explore [dynamic rate limiting](
|
|
27
|
-
|
|
36
|
+
explore [dynamic rate limiting](../dynamic-rate-limiting/local.mdx) to see the
|
|
37
|
+
full power of the world's best rate limiter.
|
|
28
38
|
|
|
29
39
|
<Stepper>
|
|
30
40
|
|
|
@@ -39,7 +49,7 @@ the full power of the world's best rate limiter.
|
|
|
39
49
|
|
|
40
50
|
<BrowserScreenshot url="http://localhost:9100/?path=routes.oas.json">
|
|
41
51
|
|
|
42
|
-

|
|
43
53
|
|
|
44
54
|
</BrowserScreenshot>
|
|
45
55
|
|
|
@@ -47,7 +57,7 @@ the full power of the world's best rate limiter.
|
|
|
47
57
|
|
|
48
58
|
<ModalScreenshot>
|
|
49
59
|
|
|
50
|
-

|
|
51
61
|
|
|
52
62
|
</ModalScreenshot>
|
|
53
63
|
|
|
@@ -56,7 +66,7 @@ the full power of the world's best rate limiter.
|
|
|
56
66
|
(`requestsAllowed`) every 1 minute (`timeWindowMinutes`). You can explore the
|
|
57
67
|
rest of the policy's documentation and configuration in the right panel.
|
|
58
68
|
|
|
59
|
-

|
|
60
70
|
|
|
61
71
|
To apply the policy, click **Create Policy**, then save your changes.
|
|
62
72
|
|
|
@@ -90,6 +100,3 @@ the full power of the world's best rate limiter.
|
|
|
90
100
|
your API.
|
|
91
101
|
|
|
92
102
|
</Stepper>
|
|
93
|
-
|
|
94
|
-
**NEXT** Try
|
|
95
|
-
[Step 3 - Add API Key Authentication](./step-3-add-api-key-auth-local.mdx).
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: API Management
|
|
3
|
+
showLastModified: false
|
|
4
|
+
suggestEdit: false
|
|
5
|
+
title: Getting Started with API Gateway - Agent
|
|
6
|
+
description:
|
|
7
|
+
Create a Zuplo API gateway project, configure its coding agent, then review
|
|
8
|
+
and deploy the agent's changes.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<WizardSteps build="gateway" method="agent" />
|
|
12
|
+
|
|
13
|
+
<MethodTabs build="gateway" method="agent" />
|
|
14
|
+
|
|
15
|
+
Put a managed gateway in front of any REST API. This path builds it with an AI
|
|
16
|
+
coding agent.
|
|
17
|
+
|
|
18
|
+
## Create your project
|
|
19
|
+
|
|
20
|
+
:::note{title="Requirements"}
|
|
21
|
+
|
|
22
|
+
[Node.js](https://nodejs.org/en/download) 24.0.0 or higher, a
|
|
23
|
+
[Zuplo account](https://portal.zuplo.com), and an installed coding agent.
|
|
24
|
+
|
|
25
|
+
:::
|
|
26
|
+
|
|
27
|
+
<Stepper>
|
|
28
|
+
|
|
29
|
+
1. **Create a local and hosted project**
|
|
30
|
+
|
|
31
|
+
Run:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx create-zuplo-api@latest example-project
|
|
35
|
+
cd example-project
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
When prompted, choose **Yes** to create a matching Portal project, complete
|
|
39
|
+
sign-in, and select your Zuplo account. Select the coding agent you use when
|
|
40
|
+
asked. The CLI creates a project in the Portal and links your local
|
|
41
|
+
`example-project` directory to its working copy. The hosted project stores
|
|
42
|
+
the API key consumers and receives your deployment. If the CLI reports that
|
|
43
|
+
project creation failed, run
|
|
44
|
+
`npx zuplo project create --name example-project` from this directory. If
|
|
45
|
+
linking failed, or after creating the hosted project, run `npx zuplo link`
|
|
46
|
+
and select its working copy before continuing.
|
|
47
|
+
|
|
48
|
+
:::tip{title="Zuplo skills"}
|
|
49
|
+
|
|
50
|
+
The scaffold installs Zuplo skills in this project for Codex and Cursor and
|
|
51
|
+
configures the Claude Code plugin. If setup fails, follow
|
|
52
|
+
[Agent Skills](../../build-with-ai.mdx#agent-skills) from this directory
|
|
53
|
+
before starting your agent. The project's `.mcp.json` also configures the
|
|
54
|
+
Zuplo docs MCP server.
|
|
55
|
+
|
|
56
|
+
:::
|
|
57
|
+
|
|
58
|
+
2. **Start the gateway**
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm run dev
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Leave this running. The agent edits `config/` and `modules/`, and the dev
|
|
65
|
+
server hot-reloads.
|
|
66
|
+
|
|
67
|
+
</Stepper>
|
|
68
|
+
|
|
69
|
+
## Hand it to the agent
|
|
70
|
+
|
|
71
|
+
One prompt covers the whole editor tutorial - forwarding, rate limiting, API key
|
|
72
|
+
authentication, and dynamic limits. Paste it into Claude Code, Cursor, or Codex
|
|
73
|
+
from inside your project directory.
|
|
74
|
+
|
|
75
|
+
<Stepper>
|
|
76
|
+
|
|
77
|
+
1. **Copy the prompt**
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
Read this project's agent instructions and the bundled docs in node_modules/zuplo/docs before writing code.
|
|
81
|
+
|
|
82
|
+
Build a Zuplo API gateway in this project:
|
|
83
|
+
1. Keep the default todo routes in config/routes.oas.json, but forward them to ${env.BASE_URL} and add BASE_URL=https://echo.zuplo.io to .env.zuplo.
|
|
84
|
+
2. Add the rate-limiting inbound policy (rateLimitBy: ip, 2 requests / 1 minute) to every route.
|
|
85
|
+
3. Add the api-key-inbound policy to every route, ordered before rate limiting.
|
|
86
|
+
4. Make rate limiting dynamic: create modules/rate-limit.ts exporting rateLimit() that returns 1000 req/min for user.data.customerType === "premium", 5 for "free", 30 otherwise, and switch the policy to rateLimitBy: "function".
|
|
87
|
+
5. Run npm run dev and verify with curl that GET /todos returns 401 without a key. I will create the free and premium keys in the Portal afterward; leave key-based tests for me.
|
|
88
|
+
|
|
89
|
+
Explain each config change in one line and stop before pushing to git.
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
1. **Review what it changed**
|
|
93
|
+
|
|
94
|
+
Expect edits to `config/routes.oas.json`, `config/policies.json`, a new
|
|
95
|
+
`modules/rate-limit.ts`, and `.env.zuplo`. Open the local
|
|
96
|
+
[Route Designer](../../articles/local-development-routes-designer.mdx) at
|
|
97
|
+
http://localhost:9100 to see the policies on each route.
|
|
98
|
+
|
|
99
|
+
:::tip
|
|
100
|
+
|
|
101
|
+
Ask the agent to explain any policy option you do not recognize. It has the
|
|
102
|
+
policy reference in `node_modules/zuplo/docs/policies/`.
|
|
103
|
+
|
|
104
|
+
:::
|
|
105
|
+
|
|
106
|
+
</Stepper>
|
|
107
|
+
|
|
108
|
+
## Create an API key and test
|
|
109
|
+
|
|
110
|
+
The API key policy rejects everything until a consumer exists. Consumers live in
|
|
111
|
+
the Zuplo Portal, not in code.
|
|
112
|
+
|
|
113
|
+
<Stepper>
|
|
114
|
+
|
|
115
|
+
1. **Create two consumers**
|
|
116
|
+
|
|
117
|
+
In the portal, open
|
|
118
|
+
[**Services**](https://portal.zuplo.com/+/account/project/services) › **API
|
|
119
|
+
Keys › Consumers › Create Consumer**. Create `free-consumer` with metadata
|
|
120
|
+
`{ "customerType": "free" }` and `premium-consumer` with
|
|
121
|
+
`{ "customerType": "premium" }`.
|
|
122
|
+
|
|
123
|
+
:::warning
|
|
124
|
+
|
|
125
|
+
Select the environment your local project is linked to with the **Dev /
|
|
126
|
+
Preview / Prod** switcher. With a single environment, pick **Prod**.
|
|
127
|
+
|
|
128
|
+
:::
|
|
129
|
+
|
|
130
|
+
1. **Test both limits**
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# no key -> 401
|
|
134
|
+
curl -i http://localhost:9000/todos
|
|
135
|
+
|
|
136
|
+
# free key -> 429 on the 6th request within one minute
|
|
137
|
+
for i in 1 2 3 4 5 6; do
|
|
138
|
+
curl -i http://localhost:9000/todos \
|
|
139
|
+
--header 'Authorization: Bearer FREE_CONSUMER_KEY'
|
|
140
|
+
done
|
|
141
|
+
|
|
142
|
+
# premium key -> 1000 requests per minute
|
|
143
|
+
curl http://localhost:9000/todos \
|
|
144
|
+
--header 'Authorization: Bearer PREMIUM_CONSUMER_KEY'
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Replace `FREE_CONSUMER_KEY` and `PREMIUM_CONSUMER_KEY` with the keys from the
|
|
148
|
+
Portal. The premium request should succeed; its limit is 1000 requests per
|
|
149
|
+
minute, so a single request doesn't test the threshold.
|
|
150
|
+
|
|
151
|
+
</Stepper>
|
|
152
|
+
|
|
153
|
+
## Deploy
|
|
154
|
+
|
|
155
|
+
Zuplo deploys from Git. The agent can do the push; the connection happens in the
|
|
156
|
+
portal.
|
|
157
|
+
|
|
158
|
+
<Stepper>
|
|
159
|
+
|
|
160
|
+
1. **Ask the agent to push**
|
|
161
|
+
|
|
162
|
+
```text
|
|
163
|
+
Commit everything, create an empty GitHub repo called example-project with gh, add it as origin and push main.
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
1. **Connect the repository in Zuplo**
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npx zuplo info
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Open the source-control link from the output, or **Settings › Source
|
|
173
|
+
Control** in the portal. Click **Connect to GitHub**, then **Connect** on
|
|
174
|
+
your repository. Zuplo deploys `main` immediately. Run `zuplo info` again to
|
|
175
|
+
confirm.
|
|
176
|
+
|
|
177
|
+
:::tip{title="Branch environments"}
|
|
178
|
+
|
|
179
|
+
Every branch you push gets its own isolated environment. See
|
|
180
|
+
[Branch-Based Deployments](../../articles/branch-based-deployments.mdx).
|
|
181
|
+
|
|
182
|
+
:::
|
|
183
|
+
|
|
184
|
+
</Stepper>
|
|
185
|
+
|
|
186
|
+
## Wrapping up
|
|
187
|
+
|
|
188
|
+
You have built an API protected by API key authentication, dynamically rate
|
|
189
|
+
limited, deployed to the edge, and documented in your developer portal - with an
|
|
190
|
+
agent doing the configuration while you reviewed each change.
|
|
191
|
+
|
|
192
|
+
### Next steps
|
|
193
|
+
|
|
194
|
+
- Customize your [developer portal](../../dev-portal/overview.mdx) or explore
|
|
195
|
+
[integrations](https://zuplo.com/integrations)
|
|
196
|
+
- [Grab time](https://zuplo.com/meeting) with the Zuplo team
|
|
197
|
+
- Start generating revenue with the
|
|
198
|
+
[monetization tutorial](../../articles/monetization/index.mdx)
|
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
category: API Management
|
|
3
|
+
showLastModified: false
|
|
4
|
+
suggestEdit: false
|
|
5
|
+
title: Deploy to the edge - Portal
|
|
6
|
+
description:
|
|
7
|
+
Connect your project to Git and deploy the gateway to more than 300 edge
|
|
8
|
+
locations, with an environment for every branch in the Zuplo Portal.
|
|
4
9
|
---
|
|
5
10
|
|
|
11
|
+
<WizardSteps build="gateway" method="portal" step="deploy-to-the-edge" />
|
|
12
|
+
|
|
13
|
+
<MethodTabs build="gateway" method="portal" step="deploy-to-the-edge" />
|
|
14
|
+
|
|
6
15
|
In this guide we'll show you how to deploy your gateway to the edge, at over 300
|
|
7
16
|
data-centers around the world. The act of deployment creates new
|
|
8
|
-
[environments](
|
|
9
|
-
[how environments work](
|
|
17
|
+
[environments](../../../articles/environments.mdx) and it's worth familiarizing
|
|
18
|
+
yourself with [how environments work](../../../articles/environments.mdx).
|
|
10
19
|
|
|
11
20
|
In this tutorial we'll show the default workflow via GitHub, but note that we
|
|
12
21
|
also support GitLab, BitBucket
|
|
13
22
|
([enterprise plan only](https://zuplo.com/pricing)) and
|
|
14
|
-
[custom CI/CD](
|
|
23
|
+
[custom CI/CD](../../../articles/custom-ci-cd.mdx).
|
|
15
24
|
|
|
16
25
|
To follow this tutorial you'll need
|
|
17
26
|
|
|
18
27
|
- a GitHub account (it's free, sign up at [github.com](https://github.com)).
|
|
19
|
-
- a zuplo project - complete [Step 1](
|
|
20
|
-
[Step 2](
|
|
21
|
-
[Step 3](
|
|
28
|
+
- a zuplo project - complete [Step 1](../setup-a-basic-gateway/index.mdx),
|
|
29
|
+
[Step 2](../add-rate-limiting/index.mdx) and
|
|
30
|
+
[Step 3](../add-api-key-auth/index.mdx) for a great start!
|
|
22
31
|
- to install the
|
|
23
32
|
[Zuplo GitHub deployment](https://github.com/apps/zuplo/installations/new) to
|
|
24
33
|
GitHub - you can
|
|
@@ -37,14 +46,14 @@ Let's get started:
|
|
|
37
46
|
the auth flow. You'll need to grant permissions for any GitHub organizations
|
|
38
47
|
you want to work with.
|
|
39
48
|
|
|
40
|
-

|
|
41
50
|
|
|
42
51
|
Next, a dialog will open asking you to authorize Zuplo. Click the **Authorize
|
|
43
52
|
Zuplo** button.
|
|
44
53
|
|
|
45
54
|
<Framed size="sm">
|
|
46
55
|
|
|
47
|
-

|
|
48
57
|
|
|
49
58
|
</Framed>
|
|
50
59
|
|
|
@@ -66,7 +75,7 @@ Let's get started:
|
|
|
66
75
|
|
|
67
76
|
<Framed size="sm">
|
|
68
77
|
|
|
69
|
-

|
|
70
79
|
|
|
71
80
|
</Framed>
|
|
72
81
|
|
|
@@ -76,7 +85,7 @@ Let's get started:
|
|
|
76
85
|
|
|
77
86
|
<Framed size="sm">
|
|
78
87
|
|
|
79
|
-

|
|
80
89
|
|
|
81
90
|
</Framed>
|
|
82
91
|
|
|
@@ -91,7 +100,7 @@ Let's get started:
|
|
|
91
100
|
already a member of an account that has authorized Zuplo. To add Zuplo to a
|
|
92
101
|
new organization click **Add GitHub Account** in the org picker list.
|
|
93
102
|
|
|
94
|
-

|
|
95
104
|
|
|
96
105
|
1. Connect GitHub to your Project
|
|
97
106
|
|
|
@@ -101,7 +110,7 @@ Let's get started:
|
|
|
101
110
|
repository** button. You will be prompted that this will open GitHub. Click
|
|
102
111
|
to continue.
|
|
103
112
|
|
|
104
|
-

|
|
105
114
|
|
|
106
115
|
In the GitHub UI, you can rename your repository if you want. Click the
|
|
107
116
|
**Create repository** button at the bottom of the page and return to the
|
|
@@ -110,11 +119,11 @@ Let's get started:
|
|
|
110
119
|
The portal will reload and you will see your new repository listed. Click
|
|
111
120
|
**Connect** to connect Zuplo to that repository.
|
|
112
121
|
|
|
113
|
-

|
|
114
123
|
|
|
115
124
|
After the connection succeeds you will see a link to your GitHub repository.
|
|
116
125
|
|
|
117
|
-

|
|
118
127
|
|
|
119
128
|
Click the link to return to GitHub. You should see a little brown dot next to
|
|
120
129
|
the commit hash (1). When you hover your mouse over that you'll see the Zuplo
|
|
@@ -123,12 +132,12 @@ Let's get started:
|
|
|
123
132
|
This shows that your deployment is in progress, it will take about 50
|
|
124
133
|
seconds.
|
|
125
134
|
|
|
126
|
-

|
|
127
136
|
|
|
128
137
|
On the deployment page, you will see **Deployment has Completed!!** and below
|
|
129
138
|
that's the link to your new environment.
|
|
130
139
|
|
|
131
|
-

|
|
132
141
|
|
|
133
142
|
1. Deploy another Environment
|
|
134
143
|
|
|
@@ -138,7 +147,7 @@ Let's get started:
|
|
|
138
147
|
|
|
139
148
|
Let's create a branch called `development`
|
|
140
149
|
|
|
141
|
-

|
|
142
151
|
|
|
143
152
|
Wait about 20s and head back to Zuplo - you should see a new entry in the
|
|
144
153
|
environment dropdown called `development`.
|
|
@@ -149,18 +158,18 @@ Let's get started:
|
|
|
149
158
|
something simple like capitalize the **Summary** field from 'Get all todos'
|
|
150
159
|
to 'Get All Todos'. It doesn't really matter what the change is.
|
|
151
160
|
|
|
152
|
-

|
|
153
162
|
|
|
154
163
|
Save your changes. Click the GitHub button at bottom left and choose **Commit
|
|
155
164
|
& Push**.
|
|
156
165
|
|
|
157
|
-

|
|
158
167
|
|
|
159
168
|
Enter a description of your change in the dialog that pops up:
|
|
160
169
|
|
|
161
170
|
<ModalScreenshot>
|
|
162
171
|
|
|
163
|
-

|
|
164
173
|
|
|
165
174
|
</ModalScreenshot>
|
|
166
175
|
|
|
@@ -169,7 +178,7 @@ Let's get started:
|
|
|
169
178
|
|
|
170
179
|
<ModalScreenshot>
|
|
171
180
|
|
|
172
|
-

|
|
173
182
|
|
|
174
183
|
</ModalScreenshot>
|
|
175
184
|
|
|
@@ -177,21 +186,21 @@ Let's get started:
|
|
|
177
186
|
Pull Request. Change the **base** branch to `development` (since that's the
|
|
178
187
|
environment we want to update first). Click **Create pull request**.
|
|
179
188
|
|
|
180
|
-

|
|
181
190
|
|
|
182
191
|
When ready, click **Merge pull request**.
|
|
183
192
|
|
|
184
|
-

|
|
185
194
|
|
|
186
195
|
Once merged, you'll want to delete that temporary branch.
|
|
187
196
|
|
|
188
|
-

|
|
189
198
|
|
|
190
199
|
The successful merge will trigger a rebuild and deployment of `development`
|
|
191
200
|
with your change. You can check this by choosing the environment
|
|
192
201
|
`development` in Zuplo and navigating to the **read only** Route Designer.
|
|
193
202
|
|
|
194
|
-

|
|
195
204
|
|
|
196
205
|
This shows how you can use widely recognized GitOps practices to manage how
|
|
197
206
|
code flows through your environments using Pull Requests and protected
|
|
@@ -1,22 +1,51 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
category: API Management
|
|
3
|
+
showLastModified: false
|
|
4
|
+
suggestEdit: false
|
|
5
|
+
title: Deploy to the edge - Editor
|
|
6
|
+
description:
|
|
7
|
+
Connect your project to Git and deploy the gateway to more than 300 edge
|
|
8
|
+
locations, with an environment for every branch with the Zuplo CLI and your
|
|
9
|
+
editor.
|
|
4
10
|
---
|
|
5
11
|
|
|
12
|
+
<WizardSteps build="gateway" method="local" step="deploy-to-the-edge" />
|
|
13
|
+
|
|
14
|
+
<MethodTabs build="gateway" method="local" step="deploy-to-the-edge" />
|
|
15
|
+
|
|
6
16
|
In this guide we'll deploy your locally-developed gateway to the edge, at over
|
|
7
17
|
300 data-centers around the world. Zuplo deploys from Git source control — once
|
|
8
18
|
your project is connected to a GitHub repository, every push deploys
|
|
9
19
|
automatically, with no CI/CD configuration required.
|
|
10
20
|
|
|
11
|
-
The act of deployment creates new
|
|
12
|
-
|
|
21
|
+
The act of deployment creates new
|
|
22
|
+
[environments](../../../articles/environments.mdx), so it's worth familiarizing
|
|
23
|
+
yourself with [how environments work](../../../articles/environments.mdx).
|
|
13
24
|
|
|
14
|
-
To follow this tutorial you
|
|
15
|
-
|
|
25
|
+
To follow this tutorial, you need a [GitHub account](https://github.com) and a
|
|
26
|
+
Zuplo account. Your local project directory must also be linked to a hosted
|
|
27
|
+
Zuplo project in the Portal. The local files alone cannot receive a deployment.
|
|
16
28
|
|
|
17
29
|
<Stepper>
|
|
18
30
|
|
|
19
|
-
1. **
|
|
31
|
+
1. **Create and link a hosted project if needed**
|
|
32
|
+
|
|
33
|
+
If you answered **Yes** when `create-zuplo-api` asked to create a matching
|
|
34
|
+
Portal project, the CLI already created and linked its hosted project.
|
|
35
|
+
Otherwise, from your local project directory, create one and link its working
|
|
36
|
+
copy:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx zuplo project create --name example-project
|
|
40
|
+
npx zuplo link
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Sign in and select your Zuplo account when prompted. If you already created a
|
|
44
|
+
hosted project in the Portal, run only `npx zuplo link` and select that
|
|
45
|
+
project and its working copy. See
|
|
46
|
+
[Creating a matching portal project](../../../cli/create-zuplo-api.mdx#creating-a-matching-portal-project).
|
|
47
|
+
|
|
48
|
+
2. **Check your project status**
|
|
20
49
|
|
|
21
50
|
From your project directory, run `zuplo info` to see how your local project
|
|
22
51
|
maps to Zuplo:
|
|
@@ -37,13 +66,13 @@ To follow this tutorial you'll need a GitHub account (it's free, sign up at
|
|
|
37
66
|
connected to a repository yet. The next steps walk through connecting one so
|
|
38
67
|
your changes deploy automatically.
|
|
39
68
|
|
|
40
|
-
|
|
69
|
+
3. **Create a GitHub repository**
|
|
41
70
|
|
|
42
71
|
In GitHub, [create a new repository](https://github.com/new). Leave it
|
|
43
72
|
**empty** — don't add a README, `.gitignore`, or license — since your project
|
|
44
73
|
already contains those files.
|
|
45
74
|
|
|
46
|
-
|
|
75
|
+
4. **Push your project to GitHub**
|
|
47
76
|
|
|
48
77
|
`create-zuplo-api` already initialized your project as a Git repository.
|
|
49
78
|
Stage and commit your work (if you haven't already), then point your local
|
|
@@ -57,14 +86,15 @@ To follow this tutorial you'll need a GitHub account (it's free, sign up at
|
|
|
57
86
|
git push -u origin main
|
|
58
87
|
```
|
|
59
88
|
|
|
60
|
-
|
|
89
|
+
5. **Connect the repository in Zuplo**
|
|
61
90
|
|
|
62
91
|
Open the source-control settings link from the `zuplo info` output, or in the
|
|
63
92
|
Zuplo Portal open **Settings → Source Control**.
|
|
64
93
|
|
|
65
94
|
If this is your first time, click **Connect to GitHub** and authorize the
|
|
66
|
-
Zuplo GitHub app — see
|
|
67
|
-
|
|
95
|
+
Zuplo GitHub app — see
|
|
96
|
+
[GitHub Setup](../../../articles/source-control-setup-github.mdx) for a
|
|
97
|
+
detailed walkthrough of the authorization flow and permissions.
|
|
68
98
|
|
|
69
99
|
Once the app has access to your repositories, find the repository you just
|
|
70
100
|
pushed to in the list and click **Connect**.
|
|
@@ -78,7 +108,7 @@ To follow this tutorial you'll need a GitHub account (it's free, sign up at
|
|
|
78
108
|
|
|
79
109
|
:::
|
|
80
110
|
|
|
81
|
-
|
|
111
|
+
6. **Verify your deployment**
|
|
82
112
|
|
|
83
113
|
As soon as the repository is connected, Zuplo deploys your `main` branch. In
|
|
84
114
|
GitHub you'll see a status check next to your commit; when it succeeds, the
|
|
@@ -95,12 +125,10 @@ To follow this tutorial you'll need a GitHub account (it's free, sign up at
|
|
|
95
125
|
|
|
96
126
|
Every branch you push gets its own isolated environment. Create a
|
|
97
127
|
`development` branch, push it, and Zuplo deploys a matching environment
|
|
98
|
-
automatically. See
|
|
99
|
-
|
|
128
|
+
automatically. See
|
|
129
|
+
[Branch-Based Deployments](../../../articles/branch-based-deployments.mdx) to
|
|
130
|
+
learn how branches map to environments.
|
|
100
131
|
|
|
101
132
|
:::
|
|
102
133
|
|
|
103
134
|
</Stepper>
|
|
104
|
-
|
|
105
|
-
**NEXT** Try
|
|
106
|
-
[Step 5 - Add Dynamic Rate Limiting](./step-5-dynamic-rate-limiting-local.mdx).
|