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
-[ ] Create an <ahref="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/"target="_blank">Cloudflare API Token</a> with Workers Observability - read and Workers Scripts - edit permissions.
29
+
-[ ] Create an <ahref="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/"target="_blank">Cloudflare API Token</a> with `Workers Observability - read` and `Workers Scripts - edit` permissions.
30
30
31
31
-[ ] Run `npx wrangler login` and follow the prompts to login to Cloudflare
32
32
@@ -36,51 +36,26 @@ You will:
36
36
37
37
## 🏗️ Step 1: Create the Worker
38
38
39
-
Create a new "Hello World" Cloudflare Worker
39
+
Create a new "Hello World" Cloudflare Worker using [C3](https://developers.cloudflare.com/pages/get-started/c3/) and [our template](https://github.com/wack/multitool-cloudflare-quickstart)
📝 **Note:** To get your Cloudflare Account ID, [follow the instructions here](https://developers.cloudflare.com/fundamentals/account/find-account-and-zone-ids/).
82
57
83
-
## ⚙️ Step 3: Deploy the worker
58
+
## ⬆️ Step 3: Deploy the worker
84
59
85
60
Now that we added the updated code to our worker, let's deploy it.
86
61
@@ -123,40 +98,40 @@ Now that the Worker is deployed and accessible via its URL, create the applicati
123
98
From the MultiTool app:
124
99
125
100
1. Create a workspace
126
-
2. Create an application named `quickstart`
101
+
2. Create an application
127
102
128
-
After the application is set up, login to the MultiTool CLI if needed:
103
+
After the application is set up, login to the MultiTool CLI, if needed:
129
104
130
105
```bash
131
106
multi login
132
107
```
133
108
134
-
## ⚙️ Step 6: Add your configuration file
135
-
136
-
Now that we have our workspace and app set up in the MultiTool app, we need to create a manfiest file called `MultiTool.toml` so the MultiTool CLI knows how to deploy your application.
109
+
## ⚙️ Step 6: Update your configuration file
137
110
138
-
If you used the sample values throughout this tutorial, you can use this file, but make sure to replace MY_WORKSPACE_NAME, and MY_CLOUDFLARE_ACCOUNT_ID with the correct values:
111
+
Now that we have our workspace and app set up in the MultiTool app, we need to update the manfiest file called `MultiTool.toml` so the MultiTool CLI knows how to deploy your application.
139
112
140
-
📝 **Note:** To get your Cloudflare Account ID, [follow the instructions here](https://developers.cloudflare.com/fundamentals/account/find-account-and-zone-ids/).
113
+
If you used the sample values throughout this tutorial, you can use this file, but make sure to replace MY_WORKSPACE_NAME and MY_APPLICATION_NAME:
141
114
142
115
```bash
143
-
cat <<EOF > MultiTool.toml
144
116
workspace = "MY_WORKSPACE_NAME"
145
-
application = "quickstart"
117
+
application = "MY_APPLICATION_NAME"
146
118
147
119
[config.cloudflare]
148
120
worker-name = "multitool-quickstart"
149
-
account-id = "MY_CLOUDFLARE_ACCOUNT_ID"
150
-
main-module = "index.ts"
151
-
artifact-path = "src/"
152
-
EOF
121
+
project-dir = "src/"
153
122
```
154
123
155
124
## 🚀 Step 7: Roll out healthy code and simulate stable traffic
156
125
157
-
📝 **Note:** Exiting the terminal before a CLI operation finishes can leave your rollout in a stuck state due to a known bug. Please wait for the operation to complete before closing the terminal. If you've already run into this issue, contact [email protected] and we’ll help resolve it. A fix is on the way.
126
+
📝 **Note:** Exiting the terminal before a CLI operation finishes can leave your rollout in a stuck state for a few minutes. Please wait for the operation to complete before closing the terminal. If you've already run into this issue, contact [email protected] and we’ll help resolve it.
127
+
128
+
Ensure `index.ts` is set as the `main` value in your `wrangler.jsonc` file:
158
129
159
-
Start the rollout using `index.ts` as the `main-module` value in your `MultiTool.toml` file:
130
+
```json
131
+
"main": "src/index_errors.js",
132
+
```
133
+
134
+
Then start the rollout by running MultiTool:
160
135
161
136
```bash
162
137
multi run --cloudflare-api-token $MY_CLOUDFLARE_TOKEN
@@ -188,7 +163,13 @@ As traffic hits the new version, MultiTool will evaluate its behavior and promot
188
163
189
164
To test a broken rollout, use the `index_errors.ts` file.
190
165
191
-
Start the rollout using `index_errors.ts` as the `main-module` value in your `MultiTool.toml` file:
166
+
Update the `main` value in your `wrangler.jsonc` file:
167
+
168
+
```json
169
+
"main": "src/index_errors.js",
170
+
```
171
+
172
+
Then re-run MultiTool
192
173
193
174
```bash
194
175
multi run --cloudflare-api-token $MY_CLOUDFLARE_TOKEN
0 commit comments