Skip to content

Commit acb02e5

Browse files
github-automation-metabaseMetabase Docs bot
andauthored
[auto] adding content to release-x.57.x->release-x.57.x (#829)
Co-authored-by: Metabase Docs bot <metabase-bot@metabase.com>
1 parent 8c446b0 commit acb02e5

File tree

4 files changed

+196
-142
lines changed

4 files changed

+196
-142
lines changed

_docs/latest/embedding/sdk/quickstart-with-sample-app.md

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,59 @@ This guide sets up the embedded analytics SDK with a [sample React app](https://
2626
- [A Metabase Pro or Enterprise license](/pricing/) (If you don't have a license, check out [this quickstart](./quickstart) that lacks the paid JWT SSO setup.)
2727
- (Optional): [Docker](https://www.docker.com/)
2828

29+
## Clone the sample app repo
30+
31+
1. Clone the [sample React app](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable).
32+
33+
```bash
34+
git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git
35+
```
36+
37+
2. Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version.
38+
39+
```bash
40+
git checkout {{page.version}}-stable
41+
```
42+
43+
E.g., if you're running Metabase 1.57 make sure the sample app repo is on the `57-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**.
44+
2945
## Two ways to set up the sample app with Metabase
3046

3147
- [Quick setup with Docker](#quick-setup-with-docker) (includes a sample Metabase)
3248
- [Walkthrough setup](#walkthrough-setup) (bring your own Metabase, or spin up a new one)
3349

3450
## Quick setup with Docker
3551

36-
This quick setup will run a Docker container with the sample app and a sample Metabase.
52+
This setup will run a Docker container with the sample app and a sample Metabase.
53+
54+
1. Copy the environment template file:
55+
56+
In the cloned directory, run:
57+
58+
```bash
59+
cp .env.docker.example .env.docker
60+
```
3761

38-
1. Copy `.env.docker.example` to `.env.docker`.
3962
2. In the `.env.docker` file, replace `<your_enterprise_token>` with your premium embedding token.
63+
4064
3. In the top-level directory, run:
41-
```bash
42-
yarn start
43-
```
65+
66+
```bash
67+
yarn start
68+
```
4469

4570
This script will:
4671

4772
- Pull a Metabase Docker image and run it in a container.
48-
- Set up JWT SSO in Metabase.
49-
- Build and run the sample application with an embedded interactive question.
73+
- Set up [JWT SSO in Metabase](../../people-and-groups/authenticating-with-jwt)
74+
- Build and run the sample application with an embedded question.
5075

51-
The app will start on [http://localhost:4400](http://localhost:4400).
76+
4. The app will start on [http://localhost:4400](http://localhost:4400).
5277

53-
That's it! You should be [up and running](#at-this-point-you-should-be-up-and-running).
78+
That's it!
5479

5580
If you want to log in to the sample Metabase this command set up, visit [http://localhost:4300](http://localhost:4300). You can log in with email and password as Rene Descartes:
56-
81+
E
5782
- email: rene@example.com
5883
- password: foobarbaz
5984

@@ -72,10 +97,9 @@ Here's a quick overview of what you'll be doing:
7297

7398
### Start up the sample application
7499

75-
5. [Get the sample application](#set-up-the-sample-application).
76-
6. [Set up the application environment](#set-up-the-application-environment).
77-
7. [Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components.
78-
8. [Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK.
100+
5. [Set up the application environment](#set-up-the-application-environment).
101+
6.. [Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components.
102+
7. [Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK.
79103

80104
And then fiddle around with styling.
81105

@@ -85,15 +109,15 @@ Let's go.
85109

86110
You can run Metabase Pro on a Cloud plan with a [free trial](/pricing/).
87111

88-
Or run it locally. Here's a docker one-liner:
112+
Or run it locally. Here's a [docker](../../installation-and-operation/running-metabase-on-docker) one-liner:
89113

90-
```sh
114+
```bash
91115
docker run -d -p 3000:3000 --name metabase metabase/metabase-enterprise:latest
92116
```
93117

94118
You can also [download the JAR](https://downloads.metabase.com/enterprise/latest/metabase.jar), and run it like so:
95119

96-
```sh
120+
```bash
97121
java --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar
98122
```
99123

@@ -148,26 +172,10 @@ Be sure to hit the **Save and enable** button, or all is void.
148172

149173
## Set up the sample application
150174

151-
Clone the [Metabase Node JS React SDK embedding sample app](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable).
152-
153-
```sh
154-
git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git
155-
```
156-
157-
### Check out the branch that corresponds to your Metabase version
158-
159-
Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version.
160-
161-
E.g., if you're running Metabase 1.53, make sure the sample app repo is on the `53-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**.
162-
163-
To switch to another branch, run `git checkout <branch-name>`, e.g.:
164-
165-
```
166-
git checkout 52-stable
167-
```
168-
169175
## Set up the application environment
170176

177+
[Clone the sample app](#clone-the-sample-app-repo) and `cd` into it.
178+
171179
In the sample app's main directory, copy the `.env.example` template to `.env`.
172180

173181
```sh
@@ -233,7 +241,7 @@ Start the client app:
233241
npm start
234242
```
235243

236-
Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](localhost:3100).
244+
Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](http://localhost:3100).
237245

238246
## At this point, you should be up and running
239247

_docs/v0.57/embedding/sdk/quickstart-with-sample-app.md

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,59 @@ This guide sets up the embedded analytics SDK with a [sample React app](https://
2424
- [A Metabase Pro or Enterprise license](/pricing/) (If you don't have a license, check out [this quickstart](./quickstart) that lacks the paid JWT SSO setup.)
2525
- (Optional): [Docker](https://www.docker.com/)
2626

27+
## Clone the sample app repo
28+
29+
1. Clone the [sample React app](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable).
30+
31+
```bash
32+
git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git
33+
```
34+
35+
2. Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version.
36+
37+
```bash
38+
git checkout {{page.version}}-stable
39+
```
40+
41+
E.g., if you're running Metabase 1.57 make sure the sample app repo is on the `57-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**.
42+
2743
## Two ways to set up the sample app with Metabase
2844

2945
- [Quick setup with Docker](#quick-setup-with-docker) (includes a sample Metabase)
3046
- [Walkthrough setup](#walkthrough-setup) (bring your own Metabase, or spin up a new one)
3147

3248
## Quick setup with Docker
3349

34-
This quick setup will run a Docker container with the sample app and a sample Metabase.
50+
This setup will run a Docker container with the sample app and a sample Metabase.
51+
52+
1. Copy the environment template file:
53+
54+
In the cloned directory, run:
55+
56+
```bash
57+
cp .env.docker.example .env.docker
58+
```
3559

36-
1. Copy `.env.docker.example` to `.env.docker`.
3760
2. In the `.env.docker` file, replace `<your_enterprise_token>` with your premium embedding token.
61+
3862
3. In the top-level directory, run:
39-
```bash
40-
yarn start
41-
```
63+
64+
```bash
65+
yarn start
66+
```
4267

4368
This script will:
4469

4570
- Pull a Metabase Docker image and run it in a container.
46-
- Set up JWT SSO in Metabase.
47-
- Build and run the sample application with an embedded interactive question.
71+
- Set up [JWT SSO in Metabase](../../people-and-groups/authenticating-with-jwt)
72+
- Build and run the sample application with an embedded question.
4873

49-
The app will start on [http://localhost:4400](http://localhost:4400).
74+
4. The app will start on [http://localhost:4400](http://localhost:4400).
5075

51-
That's it! You should be [up and running](#at-this-point-you-should-be-up-and-running).
76+
That's it!
5277

5378
If you want to log in to the sample Metabase this command set up, visit [http://localhost:4300](http://localhost:4300). You can log in with email and password as Rene Descartes:
54-
79+
E
5580
- email: rene@example.com
5681
- password: foobarbaz
5782

@@ -70,10 +95,9 @@ Here's a quick overview of what you'll be doing:
7095

7196
### Start up the sample application
7297

73-
5. [Get the sample application](#set-up-the-sample-application).
74-
6. [Set up the application environment](#set-up-the-application-environment).
75-
7. [Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components.
76-
8. [Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK.
98+
5. [Set up the application environment](#set-up-the-application-environment).
99+
6.. [Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components.
100+
7. [Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK.
77101

78102
And then fiddle around with styling.
79103

@@ -83,15 +107,15 @@ Let's go.
83107

84108
You can run Metabase Pro on a Cloud plan with a [free trial](/pricing/).
85109

86-
Or run it locally. Here's a docker one-liner:
110+
Or run it locally. Here's a [docker](../../installation-and-operation/running-metabase-on-docker) one-liner:
87111

88-
```sh
112+
```bash
89113
docker run -d -p 3000:3000 --name metabase metabase/metabase-enterprise:latest
90114
```
91115

92116
You can also [download the JAR](https://downloads.metabase.com/enterprise/latest/metabase.jar), and run it like so:
93117

94-
```sh
118+
```bash
95119
java --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar
96120
```
97121

@@ -146,26 +170,10 @@ Be sure to hit the **Save and enable** button, or all is void.
146170

147171
## Set up the sample application
148172

149-
Clone the [Metabase Node JS React SDK embedding sample app](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable).
150-
151-
```sh
152-
git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git
153-
```
154-
155-
### Check out the branch that corresponds to your Metabase version
156-
157-
Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version.
158-
159-
E.g., if you're running Metabase 1.53, make sure the sample app repo is on the `53-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**.
160-
161-
To switch to another branch, run `git checkout <branch-name>`, e.g.:
162-
163-
```
164-
git checkout 52-stable
165-
```
166-
167173
## Set up the application environment
168174

175+
[Clone the sample app](#clone-the-sample-app-repo) and `cd` into it.
176+
169177
In the sample app's main directory, copy the `.env.example` template to `.env`.
170178

171179
```sh
@@ -231,7 +239,7 @@ Start the client app:
231239
npm start
232240
```
233241

234-
Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](localhost:3100).
242+
Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](http://localhost:3100).
235243

236244
## At this point, you should be up and running
237245

0 commit comments

Comments
 (0)