-
Notifications
You must be signed in to change notification settings - Fork 13
1013936: Need to include new UG section on how to deploy spreadsheet server to AWS EKS using Docker #2354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DeiraSF4418
wants to merge
8
commits into
development
Choose a base branch
from
EJ2-1013936-dev
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
1013936: Need to include new UG section on how to deploy spreadsheet server to AWS EKS using Docker #2354
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5eae26f
1013936: Need to include new UG section on how to deploy spreadsheet …
Deira-SF4418 ddcf844
Merge branch 'development' into EJ2-1013936-dev
DeiraSF4418 8b3d011
Merge branch 'development' into EJ2-1013936-dev
DeiraSF4418 f3aed0e
1013936: Need to include new UG section on how to deploy spreadsheet …
Deira-SF4418 fc2fdf9
1013936: Need to include new UG section on how to deploy spreadsheet …
Deira-SF4418 5fe9b7f
1013936: Need to include new UG section on how to deploy spreadsheet …
Deira-SF4418 e8f242a
1013936: Resolved the front matter error.
babu-periyasamy a72c8e2
1013936: Revise title for AWS EKS deployment guide
babu-periyasamy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
137 changes: 137 additions & 0 deletions
137
...et/React/Server-Deployment/deploy-spreadsheet-server-to-aws-eks-using-docker.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| --- | ||
| layout: post | ||
| title: How to deploy spreadsheet server to AWS EKS using Docker in React Spreadsheet component | Syncfusion | ||
| description: Learn how to deploy the Syncfusion Spreadsheet server Docker image to AWS EKS and connect it to the React Spreadsheet component. | ||
| control: How to deploy spreadsheet server to AWS EKS using Docker | ||
| platform: document-processing | ||
| documentation: ug | ||
| domainurl: ##DomainURL## | ||
| --- | ||
|
|
||
| # How to deploy spreadsheet server to AWS EKS using Docker in React Spreadsheet component | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| * `AWS account` and [`AWS CLI`](https://aws.amazon.com/cli/) installed and configured. | ||
| * [`kubectl`](https://kubernetes.io/docs/tasks/tools/) installed and configured. | ||
| * Access to an existing EKS cluster, or you can create one via the AWS console or CLI. | ||
| * Docker installed if you plan to build and push a custom image. | ||
|
|
||
| **Step 1:** Configure your environment | ||
| * Open a terminal and authenticate to AWS | ||
|
|
||
| ```bash | ||
|
|
||
| aws configure # enter your Access Key, Secret Key, region, and output format (e.g., json) | ||
|
|
||
| ``` | ||
| * Update your kubectl context to point to the EKS cluster: | ||
|
|
||
| ```bash | ||
|
|
||
| aws eks update-kubeconfig --region <region> --name <cluster-name> | ||
|
|
||
| ``` | ||
| * After updating the [`kubeconfig`](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) with the EKS cluster, you can verify the node’s state. | ||
|
|
||
| ```bash | ||
|
|
||
| kubectl get nodes # verify that your cluster nodes are ready | ||
|
|
||
| ``` | ||
|
|
||
| **Step 2:** Create the Deployment | ||
| Create a file named spreadsheet-deployment.yaml defining a deployment for the Syncfusion® container. The container listens on port `8080`: | ||
|
|
||
| ```yaml | ||
|
|
||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: spreadsheet-server | ||
| labels: | ||
| app: spreadsheet-server | ||
| spec: | ||
| replicas: 1 # Increase to 2 or more for higher availability | ||
| selector: | ||
| matchLabels: | ||
| app: spreadsheet-server | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: spreadsheet-server | ||
| spec: | ||
| containers: | ||
| - name: spreadsheet-server | ||
| image: syncfusion/spreadsheet-server:latest | ||
| ports: | ||
| - containerPort: 8080 | ||
| env: | ||
| - name: SYNCFUSION_LICENSE_KEY | ||
| value: "YOUR_LICENSE_KEY" | ||
|
|
||
| ``` | ||
|
|
||
| N> If you build a custom image, push it to Docker Hub or AWS ECR and update `image:` field accordingly. | ||
|
|
||
| **Step 3:** Expose the Service | ||
| Create a s`preadsheet-service.yaml` to define a Service of type `LoadBalancer` that forwards traffic to the container. Customize the external port (5000) as needed; the internal `targetPort` should remain 8080 because the container listens on that port. | ||
|
||
|
|
||
| ```yaml | ||
|
|
||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: spreadsheet-server-service | ||
| spec: | ||
| selector: | ||
| app: spreadsheet-server | ||
| type: LoadBalancer | ||
| ports: | ||
| - protocol: TCP | ||
| port: 5000 # External port exposed by the load balancer | ||
| targetPort: 8080 # Internal container port | ||
|
|
||
| ``` | ||
|
|
||
| **Step 4:** Deploy to EKS | ||
| * Apply the manifests: | ||
|
|
||
| ```bash | ||
|
|
||
| kubectl apply -f spreadsheet-deployment.yaml | ||
| kubectl apply -f spreadsheet-service.yaml | ||
|
|
||
| ``` | ||
|
|
||
| * Use the kubectl get pods command to monitor pod status. To retrieve the external address, run: | ||
|
|
||
| ```bash | ||
|
|
||
| kubectl get svc spreadsheet-server-service | ||
|
|
||
| ``` | ||
|
|
||
| * Retrieve the external address from the Service output. Use `https://` only if the Load Balancer is configured with TLS (use ACM for certificates). | ||
|
|
||
DeiraSF4418 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| **Step 5:** Configure the React client | ||
|
|
||
| Start by following the steps provided in this [link](../getting-started.md) to create a simple Document Editor sample in React. This will give you a basic setup of the Document Editor component. Once the Service reports an external address (e.g., a1b2c3d4e5f6-1234567890.us-east-1.elb.amazonaws.com), update the [`openUrl`](https://helpej2.syncfusion.com/react/documentation/api/spreadsheet/#openurl) and [`saveUrl`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/#saveurl) properties of your React Spreadsheet component: | ||
|
||
|
|
||
| ```jsx | ||
|
|
||
| <SpreadsheetComponent | ||
| openUrl={`http://${serviceDNS}:5000/api/spreadsheet/open`} | ||
| saveUrl={`http://${serviceDNS}:5000/api/spreadsheet/save`} | ||
| /> | ||
|
|
||
| ``` | ||
|
|
||
| N> Use `https://` if your Load Balancer has TLS configured. | ||
|
|
||
| **Step 6:** Scaling and customization | ||
| - `Scale replicas:` To handle a higher workload, you can scale your deployment by increasing the replicas count in your `spreadsheet-deployment.yaml` file and then run `kubectl apply -f spreadsheet-deployment.yaml` to apply the changes. Kubernetes will automatically manage the distribution of traffic across the pods. | ||
| - `Resource limits:` Define `resources.requests`, and `resources.limits` in the container spec to allocate CPU and memory appropriately. | ||
| - `Environment variables:` In addition to SYNCFUSION_LICENSE_KEY, you can set other configuration keys (e.g., culture) using the env: section in the deployment manifest without modifying the docker image. | ||
|
|
||
| For more information on deploying Spreadsheet docker image in Amazon EKS kindly refer to this [`Blog`](https://www.syncfusion.com/blogs/post/spreadsheet-server-eks-deployment) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.