Skip to content

Commit

Permalink
Update Docs: AWS EKS doc (#170)
Browse files Browse the repository at this point in the history
Updates AWS EKS installation documentation as like AWS Minikube installation documentation.
  • Loading branch information
emplam27 authored Sep 28, 2024
1 parent 286d5cb commit 92b8193
Showing 1 changed file with 37 additions and 28 deletions.
65 changes: 37 additions & 28 deletions docs/self-hosted-server/aws-eks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ order: 82
AWS's Elastic Kubernetes Service (EKS) is a managed service that lets you deploy, manage, and scale containerized applications on Kubernetes.

In this guide, you will install Yorkie cluster on AWS EKS using Helm.
Then, you will test Yorkie cluster with CodePair, a collaborative code editor.
Then, you will test Yorkie cluster with Quill Example to see how collaborative editing works with Yorkie.

<Alert status="danger">[AWS EKS clusters cost $0.10 per hour](https://aws.amazon.com/eks/pricing/), so you may incur charges by running this tutorial. The cost should be a few dollars at most, but be sure to delete your infrastructure promptly to avoid additional charges. We are not responsible for any charges you may incur.</Alert>

Expand Down Expand Up @@ -107,17 +107,17 @@ $ helm install yorkie-cluster yorkie-team/yorkie-cluster \
--set ingress.ingressClassName=alb \
--set ingress.hosts.enabled=true \
--set ingress.hosts.apiHost={YOUR_API_DOMAIN_NAME} \
--set ingress.alb.enabled=true \
--set ingress.alb.certArn={YOUR_CERTIFICATE_ARN}
--set ingress.awsAlb.enabled=true \
--set ingress.awsAlb.certArn={YOUR_CERTIFICATE_ARN}

# For example, for domain name `yorkie.dev` and certificate ARN
# `arn:aws:acm:ap-northeast-2:123412341234:certificate/12341234-1234-1234-1234-123412341234`, run the following command:
$ helm install yorkie-cluster yorkie-team/yorkie-cluster \
--set ingress.ingressClassName=alb \
--set ingress.hosts.enabled=true \
--set ingress.hosts.apiHost=api.yorkie.dev \
--set ingress.alb.enabled=true \
--set ingress.alb.certArn=arn:aws:acm:ap-northeast-2:123412341234:certificate/12341234-1234-1234-1234-123412341234
--set ingress.awsAlb.enabled=true \
--set ingress.awsAlb.certArn=arn:aws:acm:ap-northeast-2:123412341234:certificate/12341234-1234-1234-1234-123412341234
```

Replace `{YOUR_API_DOMAIN_NAME}` with your domain name. Also, replace `{YOUR_CERTIFICATE_ARN}` with your certificate ARN.
Expand Down Expand Up @@ -159,59 +159,68 @@ $ kubectl get pods -n yorkie --watch
After all pods are ready, you will see the following output:

```
NAME READY STATUS RESTARTS AGE
mongodb-0 1/1 Running 0 76s
yorkie-74969cc796-46s47 1/1 Running 2 (54s ago) 76s
yorkie-74969cc796-c8zpt 1/1 Running 2 (50s ago) 76s
yorkie-74969cc796-n9jtr 1/1 Running 2 (52s ago) 76s
NAME READY STATUS RESTARTS AGE
yorkie-f595554db-48s9c 1/1 Running 0 8m18s
yorkie-f595554db-nggr9 1/1 Running 0 8m18s
yorkie-f595554db-z5jgs 1/1 Running 0 8m18s
yorkie-gateway-844d8c87d-fqpsk 1/1 Running 0 9m55s
```

### Test Yorkie cluster

Now that you have Yorkie cluster installed and exposed, you can test Yorkie cluster with [CodePair](https://github.com/yorkie-team/codepair), a collaborative editing tool powered by Yorkie.
Now that you have Yorkie cluster installed and exposed, you can test Yorkie cluster with [yorkie-js-sdk](https://github.com/yorkie-team/yorkie-js-sdk), a JavaScript SDK for Yorkie.

Clone CodePair repository with the following command:
Clone yorkie-js-sdk repository with the following command:

```bash
$ git clone https://github.com/yorkie-team/codepair
$ git clone https://github.com/yorkie-team/yorkie-js-sdk
```

Then, change directory to codepair folder and install dependencies with the following command:
Then, change directory to yorkie-js-sdk folder and install dependencies with the following command:

```bash
$ cd codepair
$ npm install
$ cd yorkie-js-sdk
$ pnpm i
```

After dependencies are installed, change `VITE_APP_YORKIE_RPC_ADDR` in `.env.development` file to API Domain of Yorkie cluster you have configured above.
After dependencies are installed, you need to set `VITE_YORKIE_API_ADDR` in the `.env` file to your AWS api domain name or IP address with the following command:

```bash
$ vi .env.development
$ cd examples/vanilla-quill
$ vi .env

VITE_APP_YORKIE_RPC_ADDR=http://{YOUR_API_DOMAIN_NAME}
VITE_YORKIE_API_ADDR=http://<YOUR_API_DOMAIN_NAME or IP_ADDRESS>
```

Then, start CodePair with the following command:
Then, start Quill Example with the following command:

```bash
$ npm run dev
$ cd ../..
$ pnpm vanilla-quill dev

> codepair@1.0.0 dev
> vite --config ./config/vite.config.development.ts
> yorkie-js@0.0.0 vanilla-quill /yorkie-js-sdk
> pnpm --filter=vanilla-quill "dev"


VITE v4.3.0 ready in 257 ms
> [email protected] dev /yorkie-js-sdk/examples/vanilla-quill
> vite

➜ Local: http://localhost:3000/

VITE v5.3.5 ready in 178 ms

➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h to show help
➜ press h + enter to show help
```

You can open several web browsers and access `http://localhost:3000` to test collaborative editing with CodePair.
You can open several web browsers and access `http://localhost:5173` to test collaborative editing with Quill.

For more examples of collaborative tools developed with Yorkie, including Quill, take a look at [yorkie-js-sdk examples](https://github.com/yorkie-team/yorkie-js-sdk/tree/main/examples#examples).


### Clean up Yorkie cluster

You have now installed Yorkie cluster in AWS EKS, and tested collaborative editing with CodePair.
You have now installed Yorkie cluster in AWS EKS, and tested collaborative editing with Quill.

<Alert status="info">To learn about how to configure Yorkie Cluster in Helm Chart, see [Yorkie Cluster Helm Chart Repository](https://github.com/yorkie-team/yorkie/tree/main/build/charts/yorkie-cluster).</Alert>

Expand Down

0 comments on commit 92b8193

Please sign in to comment.