Skip to content

Commit dc9ebda

Browse files
committed
add catalog-server deployment guide
1 parent 16f0031 commit dc9ebda

File tree

3 files changed

+103
-11
lines changed

3 files changed

+103
-11
lines changed

packages/doc/docs/deployment/flydotio.mdx

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ successfully logged in as xxxxx@xxx
6666

6767
For more detailed introduction on how to sign in, you can [read more here](https://fly.io/docs/hands-on/sign-in/).
6868

69-
## Step 3: Package your VulcanSQL project
69+
## Step 3: Package your VulcanSQL API Server
7070

71-
In this guide, we'll deploy the Docker version of your VulcanSQL project. So please execute the following command in the terminal:
71+
In this guide, we'll deploy the Docker version of your VulcanSQL API Server. So please execute the following command in the terminal:
7272

7373
```bash
74-
vulcan package --output docker
74+
vulcan package -o docker
7575
```
7676

7777
After executing the command, you'll see a message shown like below and a new directory `dist` in the project directory.
@@ -163,7 +163,7 @@ For more detailed introduction on how to launch your app, you can [read more her
163163

164164
## Step 5: Deploy to Fly.io
165165

166-
Finally, you can execute the following command in the terminal to deploy your VulcanSQL project and share it with the world!
166+
Finally, you can execute the following command in the terminal to deploy your VulcanSQL API Server and share it with the world!
167167

168168
```shell
169169
fly deploy
@@ -185,4 +185,30 @@ Congratulations! Now your VulcanSQL app is on the cloud and is ready to be share
185185

186186
:::info
187187
If you need to clean up the resources on Fly.io, you can [read the documentation here](https://fly.io/docs/flyctl/destroy/).
188-
:::
188+
:::
189+
190+
## Step 6: (Optional) Deploy your VulcanSQL API Catalog Server
191+
192+
If you need to deploy API Catalog Server, you should execute the following command in the terminal:
193+
194+
```shell
195+
vulcan package -t catalog-server -o docker
196+
```
197+
198+
:::caution
199+
The folder generated by the command is also called `dist`, so if you had executed the command of packaging
200+
API server, you should rename the `dist` folder generated previously to prevent from being overwritten.
201+
:::
202+
203+
Then, you should modify `API_BASE_URL` to the URL of your VulcanSQL API Server you just deployed in Dockerfile:
204+
205+
```dockerfile
206+
ENV API_BASE_URL [URL of VulcanSQL API Server]
207+
```
208+
209+
Finally, you execute the same Fly.io commands used in the step 4 and step 5 in the terminal, and change any configurations if you need:
210+
211+
```
212+
fly launch
213+
fly deploy
214+
```

packages/doc/docs/deployment/gcp-app-engine.mdx

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ Before you begin to use Cloud Run on GCP, you need to do several things:
2525

2626
For more detailed instructions on how to setup the environment, you can [read more here](https://cloud.google.com/appengine/docs/standard/nodejs/building-app/creating-project).
2727

28-
## Step 2: Package your VulcanSQL project
28+
## Step 2: Package your VulcanSQL API Server
2929

30-
In this guide, we'll deploy your VulcanSQL project without Docker. So please execute the following command in the terminal:
30+
In this guide, we'll deploy your VulcanSQL API Server without Docker. So please execute the following command in the terminal:
3131

3232
```bash
3333
vulcan package --output node
@@ -99,4 +99,45 @@ Congratulations! Now your VulcanSQL app is on the cloud and is ready to be share
9999

100100
:::info
101101
If you need to clean up the resources on App Engine, you can [read the documentation here](https://cloud.google.com/appengine/docs/standard/python3/building-app/cleaning-up).
102-
:::
102+
:::
103+
104+
## Step 4: (Optional) Deploy your VulcanSQL API Catalog Server
105+
106+
If you need to deploy API Catalog Server, you should execute the following command in the terminal:
107+
108+
```shell
109+
vulcan package -t catalog-server
110+
```
111+
112+
:::caution
113+
The folder generated by the command is also called `dist`, so if you had executed the command of packaging
114+
API server, you should rename the `dist` folder generated previously to prevent from being overwritten.
115+
:::
116+
117+
Now we need to do several things before deploying the app to App Engine:
118+
119+
**1. Add `"config": {"port": 8080}` to `config.json`**
120+
121+
Since App Engine accepts network traffic with the [port 8080](https://cloud.google.com/appengine/docs/flexible/custom-runtimes/build#listening_to_port_8080).
122+
123+
**2. Change the filename of `index.js` to `server.js` and also in `package.json`**
124+
125+
Since App Engine recognizes [`server.js`](https://cloud.google.com/appengine/docs/standard/nodejs/building-app/writing-web-service#running_the_server_locally) as the entry file.
126+
127+
**3. Create a new file `app.yaml` and fill in the following content**
128+
129+
```yaml
130+
runtime: nodejs
131+
env: flex
132+
runtime_config:
133+
operating_system: "ubuntu22"
134+
runtime_version: "18"
135+
env_variables:
136+
VULCAN_SQL_HOST: [Your VulcanSQL API Server URL]
137+
```
138+
139+
Finally, you execute the same Google Cloud CLI commands used in the step 3 in the terminal:
140+
141+
```
142+
gcloud app deploy
143+
```

packages/doc/docs/deployment/gcp-cloud-run.mdx

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ Before you begin to use Cloud Run on GCP, you need to do several things:
2525

2626
For more detailed instructions on how to setup the environment, you can [read more here](https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-nodejs-service#before-you-begin).
2727

28-
## Step 2: Package your VulcanSQL project
28+
## Step 2: Package your VulcanSQL API Server
2929

30-
In this guide, we'll deploy the Docker version of your VulcanSQL project. So please execute the following command in the terminal:
30+
In this guide, we'll deploy the Docker version of your VulcanSQL API Server. So please execute the following command in the terminal:
3131

3232
```bash
3333
vulcan package --output docker
@@ -104,4 +104,29 @@ Congratulations! Now your VulcanSQL app is on the cloud and is ready to be share
104104

105105
:::info
106106
If you need to clean up the resources on Cloud Run, you can [read the documentation here](https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-nodejs-service#clean-up).
107-
:::
107+
:::
108+
109+
## Step 4: (Optional) Deploy your VulcanSQL API Catalog Server
110+
111+
If you need to deploy API Catalog Server, you should execute the following command in the terminal:
112+
113+
```shell
114+
vulcan package -t catalog-server -o docker
115+
```
116+
117+
:::caution
118+
The folder generated by the command is also called `dist`, so if you had executed the command of packaging
119+
API server, you should rename the `dist` folder generated previously to prevent from being overwritten.
120+
:::
121+
122+
Then, you should modify `API_BASE_URL` to the URL of your VulcanSQL API Server you just deployed in Dockerfile:
123+
124+
```dockerfile
125+
ENV API_BASE_URL [URL of VulcanSQL API Server]
126+
```
127+
128+
Finally, you execute the same Google Cloud CLI commands used in the step 3 in the terminal, and change any configurations if you need:
129+
130+
```
131+
gloud run deploy [YOUR_CLOUDRUN_SERVICE_NAME] --port=4200 --allow-unauthenticated
132+
```

0 commit comments

Comments
 (0)