diff --git a/components/learn/boxes/Boxes.js b/components/learn/boxes/Boxes.js
index 62da147f94b..1b13bc5f629 100644
--- a/components/learn/boxes/Boxes.js
+++ b/components/learn/boxes/Boxes.js
@@ -533,6 +533,15 @@ export default function Boxes(props) {
Write AWS Lambda-compatible packages.
+
+
diff --git a/next.config.js b/next.config.js
index 004efad9286..d2d5d955561 100644
--- a/next.config.js
+++ b/next.config.js
@@ -256,6 +256,10 @@ const nextConfig = {
source: `/${redirectBase}learn/aws-lambda`,
destination: `/${redirectBase}learn/development-tutorials/run-in-the-cloud/aws-lambda`,
},
+ {
+ source: `/${redirectBase}learn/deployment-guide/:slug`,
+ destination: `/${redirectBase}learn/development-tutorials/run-in-the-cloud/deployment-guide/:slug`,
+ },
{
source: `/${redirectBase}learn/test-ballerina-code/:slug`,
destination: `/${redirectBase}learn/development-tutorials/test-document-the-code/test-ballerina-code/:slug`,
diff --git a/swan-lake/development-tutorials/run-in-the-cloud/ballerina-deployment-guidelines.md b/swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-deployment-guidelines.md
similarity index 66%
rename from swan-lake/development-tutorials/run-in-the-cloud/ballerina-deployment-guidelines.md
rename to swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-deployment-guidelines.md
index 8d2b40dac60..89f0e0d3169 100644
--- a/swan-lake/development-tutorials/run-in-the-cloud/ballerina-deployment-guidelines.md
+++ b/swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-deployment-guidelines.md
@@ -1,10 +1,9 @@
---
layout: ballerina-cloud-left-nav-pages-swanlake
-title: Ballerina Production Deployment Guidelines
+title: Ballerina production deployment guidelines
description: This guideline is intended to provide a comprehensive overview of best practices and considerations when deploying Ballerina in a production environment. It covers deployment patterns, recommended configurations, Java compatibility, and security hardening tips to ensure your Ballerina applications run efficiently and securely.
keywords: ballerina, programming language, services, cloud, kubernetes, docker
-permalink: /learn/run-ballerina-programs-in-the-cloud/code-to-cloud-deployment/
-active: code-to-cloud-deployment
+active: ballerina-deployment-guidelines
intro: This guideline is intended to provide a comprehensive overview of best practices and considerations when deploying Ballerina in a production environment. It covers deployment patterns, recommended configurations, Java compatibility, and security hardening tips to ensure your Ballerina applications run efficiently and securely.
---
@@ -12,11 +11,11 @@ intro: This guideline is intended to provide a comprehensive overview of best pr
When deploying Ballerina applications in production, you can choose from several deployment types depending on your needs.
Each option balances flexibility, control, and operational overhead based on your specific deployment types:
-1. Virtual Machines or Bare Metal: Provides full control over the infrastructure, making it suitable for high-performance or legacy systems requiring custom configurations or direct hardware access.
-2. Kubernetes/Docker: Ideal for containerized, cloud-native microservices, offering scalability and orchestration with Ballerina’s built-in support for Kubernetes and Docker artifacts.
-3. Serverless: Suitable for event-driven, cost-critical applications, where cloud providers manage the infrastructure, such as AWS Lambda.
+1. [Virtual Machines or Bare Metal](/learn/deployment-guide/ballerina-virtual-machine-deployment-guide): Provides full control over the infrastructure, making it suitable for high-performance or legacy systems requiring custom configurations or direct hardware access.
+2. [Kubernetes/Docker](/learn/deployment-guide/ballerina-k8s-deployment-guide): Ideal for containerized, cloud-native microservices, offering scalability and orchestration with Ballerina’s built-in support for Kubernetes and Docker artifacts.
+3. [Serverless](/learn/deployment-guide/ballerina-serverless-deployment-guide): Suitable for event-driven, cost-critical applications, where cloud providers manage the infrastructure, such as AWS Lambda.
-## Compatible Java Versions
+## Compatible Java versions
The Ballerina distribution always includes the JDK, the supported Java versions can be found in the table below,
diff --git a/swan-lake/development-tutorials/run-in-the-cloud/ballerina-k8s-deployment-guide.md b/swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-k8s-deployment-guide.md
similarity index 96%
rename from swan-lake/development-tutorials/run-in-the-cloud/ballerina-k8s-deployment-guide.md
rename to swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-k8s-deployment-guide.md
index 4f5d58fbf64..4e3ecebf1ad 100644
--- a/swan-lake/development-tutorials/run-in-the-cloud/ballerina-k8s-deployment-guide.md
+++ b/swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-k8s-deployment-guide.md
@@ -1,18 +1,17 @@
---
layout: ballerina-cloud-left-nav-pages-swanlake
-title: Ballerina Kubernetes Deployment Guide
+title: Kubernetes deployment guide
description: When deploying Ballerina services in a Kubernetes environment, it is essential to focus on high availability and scalability. Key considerations include determining the appropriate number of worker nodes and replicas. These decisions help scale the deployment and ensure that the system remains available and responsive under load.
keywords: ballerina, programming language, services, cloud, kubernetes, docker
-permalink: /learn/run-ballerina-programs-in-the-cloud/code-to-cloud-deployment/
-active: code-to-cloud-deployment
+active: ballerina-deployment-guideLines
intro: When deploying Ballerina services in a Kubernetes environment, it is essential to focus on high availability and scalability. Key considerations include determining the appropriate number of worker nodes and replicas. These decisions help scale the deployment and ensure that the system remains available and responsive under load.
---
-## Simple Application Deployment in Kubernetes
+## Simple application deployment in Kubernetes
Ballerina simplifies Kubernetes artifact generation by deriving configurations directly from your code, which allows developers to focus on business logic while automating containerization and Kubernetes deployment. Below is a guide to deploying Ballerina applications in Kubernetes using Ballerina’s Code to Cloud capabilities.
-### Ballerina Application Code
+### Ballerina application code
Here is an example of a Ballerina service that serves a simple "Hello from Kubernetes!" message on an HTTP request:
```ballerina
import ballerina/http;
@@ -33,7 +32,7 @@ generates the Kubernetes deployment artifacts.
> **Note:** If you are using Ballerina cache in a Kubernetes environment, note that the cache is local to each pod.
> Consider using a Redis server to manage the cache if your application requires a distributed caching solution.
-### Overriding Default Kubernetes Configurations
+### Overriding default Kubernetes configurations
Create a `Cloud.toml` file in the project directory to customize the deployment parameters. This file will allow you to override the compiler's default values.
**Sample Cloud.toml**
@@ -47,7 +46,7 @@ tag="v0.1.0" # Tag of the container. Default Value: "latest"
See [Ballerina Code to Cloud Specification](https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md#containerimage) for more information.
-### Building the Kubernetes Artifacts
+### Building the Kubernetes artifacts
Use the bal build command to build the Ballerina package. This will generate Kubernetes YAML files and Docker container artifacts:
>**Note:** macOS users with Apple Silicon chips need to set an environment variable named `DOCKER_DEFAULT_PLATFORM` to `linux/amd64`, before building the image. This is because the Ballerina Docker image is not supported on Apple Silicon chips yet.
@@ -80,7 +79,7 @@ Generating artifacts...
Once the build is complete, Ballerina generates the Kubernetes artifacts, including the Service, Deployment, HorizontalPodAutoscaler, and Docker image configuration.
The artifacts are located in `target/kubernetes/hello`.
-### Deploying the Application to Kubernetes
+### Deploying the application to Kubernetes
Push the Docker image to Docker Hub:
```
@@ -122,7 +121,7 @@ Test the service using curl
$ curl http://:/helloWorld/sayHello
```
-## Kubernetes Deployment With Config Maps and Autoscaling
+## Kubernetes deployment with config maps and autoscaling
For a more complex deployment, this demonstrates a Ballerina app that reads a greeting from a config map and responds to HTTP requests. It covers Kubernetes deployment with resource limits, autoscaling, config maps, and health probes using Code to Cloud.
@@ -274,7 +273,7 @@ See [Build the GraalVM executable in a container](https://ballerina.io/learn/bui
- [Deploy Ballerina on Kubernetes](https://ballerina.io/learn/deploy-ballerina-on-kubernetes/)
- [Kubernetes - Hello world](https://ballerina.io/learn/by-example/kubernetes-hello-world/)
-## Ballerina Deployment with Kubernetes Kustomize
+## Ballerina deployment with Kubernetes Kustomize
[Kustomize](https://kustomize.io/) is a tool that allows you to modify Kubernetes YAML files without altering
the original files. It can enhance the generated YAML from code-to-cloud deployments by applying additional
diff --git a/swan-lake/development-tutorials/run-in-the-cloud/ballerina-serverless-deployment-guide.md b/swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-serverless-deployment-guide.md
similarity index 96%
rename from swan-lake/development-tutorials/run-in-the-cloud/ballerina-serverless-deployment-guide.md
rename to swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-serverless-deployment-guide.md
index 0d0129dc795..b6de2493e45 100644
--- a/swan-lake/development-tutorials/run-in-the-cloud/ballerina-serverless-deployment-guide.md
+++ b/swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-serverless-deployment-guide.md
@@ -1,10 +1,9 @@
---
layout: ballerina-cloud-left-nav-pages-swanlake
-title: Ballerina Serverless Deployment Guide
+title: Serverless deployment guide
description: Serverless architecture allows developers to focus on writing application logic without worrying about managing servers or infrastructure. AWS Lambda automatically handles provisioning, scaling, and maintaining resources, letting you concentrate solely on your code. Following are the Ballerina functions in a serverless environment,
keywords: ballerina, programming language, services, cloud, kubernetes, docker
-permalink: /learn/run-ballerina-programs-in-the-cloud/code-to-cloud-deployment/
-active: code-to-cloud-deployment
+active: ballerina-deployment-guideLines
intro: Serverless architecture allows developers to focus on writing application logic without worrying about managing servers or infrastructure. AWS Lambda automatically handles provisioning, scaling, and maintaining resources, letting you concentrate solely on your code. Following are the Ballerina functions in a serverless environment,
---
@@ -65,9 +64,9 @@ $ cat echo-response.txt{"MESSAGE":"HELLO"}
```
More examples can be found here,
-- AWS Lambda - Execution context
-- AWS Lambda - S3 trigger
-- AWS Lambda - DynamoDB trigger
+- [AWS Lambda - Execution context](https://ballerina.io/learn/by-example/aws-lambda-execution-context/)
+- [AWS Lambda - S3 trigger](https://ballerina.io/learn/by-example/aws-lambda-s3-trigger/)
+- [AWS Lambda - DynamoDB trigger](https://ballerina.io/learn/by-example/aws-lambda-dynamodb-trigger/)
### CI/CD deployment with AWS Lambda
This GitHub Action workflow automates the continuous integration and continuous deployment (CI/CD) process for a Ballerina project.
diff --git a/swan-lake/development-tutorials/run-in-the-cloud/ballerina-virtual-machine-deployment-guide.md b/swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-virtual-machine-deployment-guide.md
similarity index 95%
rename from swan-lake/development-tutorials/run-in-the-cloud/ballerina-virtual-machine-deployment-guide.md
rename to swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-virtual-machine-deployment-guide.md
index 8aeda6e94df..60de6a69a33 100644
--- a/swan-lake/development-tutorials/run-in-the-cloud/ballerina-virtual-machine-deployment-guide.md
+++ b/swan-lake/development-tutorials/run-in-the-cloud/deployment-guide/ballerina-virtual-machine-deployment-guide.md
@@ -1,10 +1,9 @@
---
layout: ballerina-cloud-left-nav-pages-swanlake
-title: Virtual Machine Deployment
+title: Virtual machine deployment guide
description: If you prefer to execute Ballerina services directly on virtual machines (VMs) or bare metal servers without using containerization, you can follow these steps to set up and run your services in a production environment,
keywords: ballerina, programming language, services, cloud, kubernetes, docker
-permalink: /learn/run-ballerina-programs-in-the-cloud/code-to-cloud-deployment/
-active: code-to-cloud-deployment
+active: ballerina-deployment-guideLines
intro: If you prefer to execute Ballerina services directly on virtual machines (VMs) or bare metal servers without using containerization, you can follow these steps to set up and run your services in a production environment,
---
diff --git a/utils/learn-lm.json b/utils/learn-lm.json
index cda88da926f..6ad8877731c 100644
--- a/utils/learn-lm.json
+++ b/utils/learn-lm.json
@@ -577,6 +577,48 @@
"isDir": false,
"url": "/learn/aws-lambda",
"id": "aws-lambda"
+ },
+ {
+ "dirName": "Ballerina deployment guide",
+ "level": 3,
+ "position": 4,
+ "isDir": true,
+ "url": "/learn/deployment-guide",
+ "id": "deployment-guide",
+ "subDirectories": [
+ {
+ "dirName": "Ballerina production deployment guidelines",
+ "level": 4,
+ "position": 1,
+ "isDir": false,
+ "url": "/learn/deployment-guide/ballerina-deployment-guidelines",
+ "id": "ballerina-deployment-guidelines"
+ },
+ {
+ "dirName": "Virtual machine deployment guide",
+ "level": 4,
+ "position": 2,
+ "isDir": false,
+ "url": "/learn/deployment-guide/ballerina-virtual-machine-deployment-guide",
+ "id": "ballerina-virtual-machine-deployment-guide"
+ },
+ {
+ "dirName": "Kubernetes deployment guide",
+ "level": 4,
+ "position": 3,
+ "isDir": false,
+ "url": "/learn/deployment-guide/ballerina-k8s-deployment-guide",
+ "id": "ballerina-k8s-deployment-guide"
+ },
+ {
+ "dirName": "Serverless deployment guide",
+ "level": 4,
+ "position": 4,
+ "isDir": false,
+ "url": "/learn/deployment-guide/ballerina-serverless-deployment-guide",
+ "id": "ballerina-serverless-deployment-guide"
+ }
+ ]
}
]
},