Browse Source

docs: make aws ecs steps expandable and add digitalocean (app)

pull/3976/head
Wing-Kam Wong 2 years ago
parent
commit
87e36dcba9
  1. 127
      packages/noco-docs/content/en/getting-started/installation.md

127
packages/noco-docs/content/en/getting-started/installation.md

@ -276,37 +276,40 @@ It is mandatory to configure `NC_DB` environment variables for production usecas
### AWS ECS (Fargate) ### AWS ECS (Fargate)
#### Create ECS Cluster <details>
<summary>Click to Expand</summary>
``` #### Create ECS Cluster
aws ecs create-cluster \
--cluster-name <YOUR_ECS_CLUSTER>
```
#### Create Log group ```
aws ecs create-cluster \
--cluster-name <YOUR_ECS_CLUSTER>
```
``` #### Create Log group
aws logs create-log-group \
--log-group-name /ecs/<YOUR_APP_NAME>/<YOUR_CONTAINER_NAME>
```
#### Create ECS Task Definiton ```
aws logs create-log-group \
--log-group-name /ecs/<YOUR_APP_NAME>/<YOUR_CONTAINER_NAME>
```
Every time you create it, it will add a new version. If it is not existing, the version will be 1. #### Create ECS Task Definiton
```bash Every time you create it, it will add a new version. If it is not existing, the version will be 1.
aws ecs register-task-definition \
--cli-input-json "file://./<YOUR_TASK_DEF_NAME>.json"
```
<alert> ```bash
This json file defines the container specification. You can define secrets such as NC_DB and environment variables here. aws ecs register-task-definition \
</alert> --cli-input-json "file://./<YOUR_TASK_DEF_NAME>.json"
```
<alert>
This json file defines the container specification. You can define secrets such as NC_DB and environment variables here.
</alert>
Here's the sample Task Definition Here's the sample Task Definition
```json ```json
{ {
"family": "nocodb-sample-task-def", "family": "nocodb-sample-task-def",
"networkMode": "awsvpc", "networkMode": "awsvpc",
"containerDefinitions": [{ "containerDefinitions": [{
@ -342,27 +345,73 @@ Here's the sample Task Definition
"memory": "512", "memory": "512",
"executionRoleArn": "<YOUR_ECS_EXECUTION_ROLE_ARN>", "executionRoleArn": "<YOUR_ECS_EXECUTION_ROLE_ARN>",
"taskRoleArn": "<YOUR_ECS_TASK_ROLE_ARN>" "taskRoleArn": "<YOUR_ECS_TASK_ROLE_ARN>"
} }
``` ```
#### Create ECS Service #### Create ECS Service
```bash ```bash
aws ecs create-service \ aws ecs create-service \
--cluster <YOUR_ECS_CLUSTER> \ --cluster <YOUR_ECS_CLUSTER> \
--service-name <YOUR_SERVICE_NAME> \ --service-name <YOUR_SERVICE_NAME> \
--task-definition <YOUR_TASK_DEF>:<YOUR_TASK_DEF_VERSION> \ --task-definition <YOUR_TASK_DEF>:<YOUR_TASK_DEF_VERSION> \
--desired-count <DESIRED_COUNT> \ --desired-count <DESIRED_COUNT> \
--launch-type "FARGATE" \ --launch-type "FARGATE" \
--platform-version <VERSION> \ --platform-version <VERSION> \
--health-check-grace-period-seconds <GRACE_PERIOD_IN_SECOND> \ --health-check-grace-period-seconds <GRACE_PERIOD_IN_SECOND> \
--network-configuration "awsvpcConfiguration={subnets=["<YOUR_SUBSETS>"], securityGroups=["<YOUR_SECURITY_GROUPS>"], assignPublicIp=ENABLED}" \ --network-configuration "awsvpcConfiguration={subnets=["<YOUR_SUBSETS>"], securityGroups=["<YOUR_SECURITY_GROUPS>"], assignPublicIp=ENABLED}" \
--load-balancer targetGroupArn=<TARGET_GROUP_ARN>,containerName=<CONTAINER_NAME>,containerPort=<YOUR_CONTAINER_PORT> --load-balancer targetGroupArn=<TARGET_GROUP_ARN>,containerName=<CONTAINER_NAME>,containerPort=<YOUR_CONTAINER_PORT>
``` ```
<alert> <alert>
If your service fails to start, you may check the logs in ECS console or in Cloudwatch. Generally it fails due to the connection between ECS container and NC_DB. Make sure the security groups have the correct inbound and outbound rules. If your service fails to start, you may check the logs in ECS console or in Cloudwatch. Generally it fails due to the connection between ECS container and NC_DB. Make sure the security groups have the correct inbound and outbound rules.
</alert> </alert>
```
</details>
### DigitalOcean (App)
<details>
<summary>Click to Expand</summary>
#### Create Apps
On Home page, Click on Create icon & Select Apps (Deploy your code).
![Screenshot 2022-02-19 at 12 17 43 PM](https://user-images.githubusercontent.com/86527202/154790558-f8fe5580-5a58-412c-9c2e-145587712bf2.png)
#### Choose Source: Docker Hub
![Screenshot 2022-02-19 at 12 22 01 PM](https://user-images.githubusercontent.com/86527202/154790563-b5b6d5b4-0bdc-4718-8cea-0a7ee52f283b.png)
#### Choose Source: Repository
Configure Source Repository as `nocodb/nocodb`. Optionally you can pick release tag if you are interested in specific NocoDB version.
![Screenshot 2022-02-19 at 12 23 11 PM](https://user-images.githubusercontent.com/86527202/154790564-1dcb5e33-3a57-471a-a44c-835a410a0cb7.png)
#### [Optional] Additional Configurations
![Screenshot 2022-02-19 at 12 24 44 PM](https://user-images.githubusercontent.com/86527202/154790565-c0234b2e-ad50-4042-90b6-4f8798f1d585.png)
#### Name your web service
Pick a name for your NocoDB application. This name will become part of URL subsequently
Pick nearest Region for cloud hosting
![Screenshot 2022-02-19 at 12 28 11 PM](https://user-images.githubusercontent.com/86527202/154790567-a6e65e4e-9aa0-4edb-998e-da8803ad6e23.png)
#### Finalize and Launch
- Select hosting plan for your NocoDB application
- Click "Launch APP"
![Screenshot 2022-02-19 at 12 29 23 PM](https://user-images.githubusercontent.com/86527202/154790570-62044713-5cca-4d06-82ec-f3cc257218a1.png)
Application will be build & URL will be live in a minute! The URL will be something like https://simply-nocodb-rsyir.ondigitalocean.app/
</details>
## Sample Demos ## Sample Demos

Loading…
Cancel
Save