From be6829b9653c724dcc11cd53e0f100c159ac9200 Mon Sep 17 00:00:00 2001 From: Praneesha Chandrasiri Date: Wed, 3 May 2023 13:24:25 +0530 Subject: [PATCH 1/2] Update Docker & K8S BBEs --- .../Cloud.toml | 0 .../build_output.out | 0 .../docker-hello-world.bal} | 0 .../docker-hello-world.md} | 6 +- .../docker_images.out | 0 .../docker_run.out | 0 .../execute_curl.out | 0 examples/index.json | 67 +++++++++++++++---- .../Cloud.toml | 0 .../build_output.out | 0 .../docker_push.out | 0 .../execute_curl.out | 0 .../kubectl_apply.out | 0 .../kubectl_expose.out | 0 .../kubectl_pods.out | 0 .../kubectl_svc.out | 0 .../kubernetes-hello-world.bal} | 0 .../kubernetes-hello-world.md} | 4 +- .../minikube_ip.out | 0 19 files changed, 59 insertions(+), 18 deletions(-) rename examples/{c2c-docker-deployment => docker-hello-world}/Cloud.toml (100%) rename examples/{c2c-docker-deployment => docker-hello-world}/build_output.out (100%) rename examples/{c2c-docker-deployment/c2c_docker_deployment.bal => docker-hello-world/docker-hello-world.bal} (100%) rename examples/{c2c-docker-deployment/c2c_docker_deployment.md => docker-hello-world/docker-hello-world.md} (91%) rename examples/{c2c-docker-deployment => docker-hello-world}/docker_images.out (100%) rename examples/{c2c-docker-deployment => docker-hello-world}/docker_run.out (100%) rename examples/{c2c-docker-deployment => docker-hello-world}/execute_curl.out (100%) rename examples/{c2c-k8s-deployment => kubernetes-hello-world}/Cloud.toml (100%) rename examples/{c2c-k8s-deployment => kubernetes-hello-world}/build_output.out (100%) rename examples/{c2c-k8s-deployment => kubernetes-hello-world}/docker_push.out (100%) rename examples/{c2c-k8s-deployment => kubernetes-hello-world}/execute_curl.out (100%) rename examples/{c2c-k8s-deployment => kubernetes-hello-world}/kubectl_apply.out (100%) rename examples/{c2c-k8s-deployment => kubernetes-hello-world}/kubectl_expose.out (100%) rename examples/{c2c-k8s-deployment => kubernetes-hello-world}/kubectl_pods.out (100%) rename examples/{c2c-k8s-deployment => kubernetes-hello-world}/kubectl_svc.out (100%) rename examples/{c2c-k8s-deployment/c2c_k8s_deployment.bal => kubernetes-hello-world/kubernetes-hello-world.bal} (100%) rename examples/{c2c-k8s-deployment/c2c_k8s_deployment.md => kubernetes-hello-world/kubernetes-hello-world.md} (91%) rename examples/{c2c-k8s-deployment => kubernetes-hello-world}/minikube_ip.out (100%) diff --git a/examples/c2c-docker-deployment/Cloud.toml b/examples/docker-hello-world/Cloud.toml similarity index 100% rename from examples/c2c-docker-deployment/Cloud.toml rename to examples/docker-hello-world/Cloud.toml diff --git a/examples/c2c-docker-deployment/build_output.out b/examples/docker-hello-world/build_output.out similarity index 100% rename from examples/c2c-docker-deployment/build_output.out rename to examples/docker-hello-world/build_output.out diff --git a/examples/c2c-docker-deployment/c2c_docker_deployment.bal b/examples/docker-hello-world/docker-hello-world.bal similarity index 100% rename from examples/c2c-docker-deployment/c2c_docker_deployment.bal rename to examples/docker-hello-world/docker-hello-world.bal diff --git a/examples/c2c-docker-deployment/c2c_docker_deployment.md b/examples/docker-hello-world/docker-hello-world.md similarity index 91% rename from examples/c2c-docker-deployment/c2c_docker_deployment.md rename to examples/docker-hello-world/docker-hello-world.md index aa26d55d08..1ffabc6bbc 100644 --- a/examples/c2c-docker-deployment/c2c_docker_deployment.md +++ b/examples/docker-hello-world/docker-hello-world.md @@ -1,9 +1,9 @@ -# Docker +# Docker Ballerina supports generating Docker artifacts from code without any additional configuration. This simplifies the experience of developing and deploying Ballerina code in the cloud. Code to Cloud builds the containers and required artifacts by deriving the required values from the code. If you want to override the default values taken by the compiler, you can use a `Cloud.toml` file. -For more information, see [Code to Cloud Deployment](/learn/run-in-the-cloud/code-to-cloud/code-to-cloud-deployment/). +For more information, see [Code to Cloud Deployment](/learn/run-in-the-cloud/code-to-cloud-deployment/). -::: code c2c_docker_deployment.bal ::: +::: code docker-hello-world.bal ::: Before you build the package, you need to override some default values taken by the compiler. To do this, create a filed named `Cloud.toml` in the package directory, and add the content below to it. For all the supported key value properties, see [Code to Cloud specification](https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md). diff --git a/examples/c2c-docker-deployment/docker_images.out b/examples/docker-hello-world/docker_images.out similarity index 100% rename from examples/c2c-docker-deployment/docker_images.out rename to examples/docker-hello-world/docker_images.out diff --git a/examples/c2c-docker-deployment/docker_run.out b/examples/docker-hello-world/docker_run.out similarity index 100% rename from examples/c2c-docker-deployment/docker_run.out rename to examples/docker-hello-world/docker_run.out diff --git a/examples/c2c-docker-deployment/execute_curl.out b/examples/docker-hello-world/execute_curl.out similarity index 100% rename from examples/c2c-docker-deployment/execute_curl.out rename to examples/docker-hello-world/execute_curl.out diff --git a/examples/index.json b/examples/index.json index 3e6e4653fa..e76ca01424 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4313,23 +4313,30 @@ ] }, { - "title": "Code to Cloud", + "title": "Docker", "column": 0, "category": "Deployment", "samples": [ { - "name": "Docker", - "url": "c2c-docker-deployment", + "name": "Hello world", + "url": "docker-hello-world", "verifyBuild": true, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", "disablePlayground": true, "isLearnByExample": false - }, + } + ] + }, + { + "title": "Kubernetes", + "column": 1, + "category": "Deployment", + "samples": [ { - "name": "Kubernetes", - "url": "c2c-k8s-deployment", - "verifyBuild": true, + "name": "Hello world", + "url": "kubernetes-hello-world", + "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", "disablePlayground": true, @@ -4338,13 +4345,22 @@ ] }, { - "title": "Function as a Service", - "column": 1, + "title": "AWS Lambda", + "column": 2, "category": "Deployment", "samples": [ { - "name": "Azure Functions", - "url": "azure-functions-deployment", + "name": "Hello world", + "url": "aws-lambda-hello-world", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Context execution", + "url": "aws-lambda-context-execution", "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", @@ -4352,8 +4368,33 @@ "isLearnByExample": false }, { - "name": "AWS Lambda", - "url": "aws-lambda-deployment", + "name": "S3 trigger", + "url": "aws-lambda-s3-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "DynamoDB trigger", + "url": "aws-lambda-dynamodb-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Azure Functions", + "column": 3, + "category": "Deployment", + "samples": [ + { + "name": "Hello world", + "url": "azure-functions-hello-world", "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", diff --git a/examples/c2c-k8s-deployment/Cloud.toml b/examples/kubernetes-hello-world/Cloud.toml similarity index 100% rename from examples/c2c-k8s-deployment/Cloud.toml rename to examples/kubernetes-hello-world/Cloud.toml diff --git a/examples/c2c-k8s-deployment/build_output.out b/examples/kubernetes-hello-world/build_output.out similarity index 100% rename from examples/c2c-k8s-deployment/build_output.out rename to examples/kubernetes-hello-world/build_output.out diff --git a/examples/c2c-k8s-deployment/docker_push.out b/examples/kubernetes-hello-world/docker_push.out similarity index 100% rename from examples/c2c-k8s-deployment/docker_push.out rename to examples/kubernetes-hello-world/docker_push.out diff --git a/examples/c2c-k8s-deployment/execute_curl.out b/examples/kubernetes-hello-world/execute_curl.out similarity index 100% rename from examples/c2c-k8s-deployment/execute_curl.out rename to examples/kubernetes-hello-world/execute_curl.out diff --git a/examples/c2c-k8s-deployment/kubectl_apply.out b/examples/kubernetes-hello-world/kubectl_apply.out similarity index 100% rename from examples/c2c-k8s-deployment/kubectl_apply.out rename to examples/kubernetes-hello-world/kubectl_apply.out diff --git a/examples/c2c-k8s-deployment/kubectl_expose.out b/examples/kubernetes-hello-world/kubectl_expose.out similarity index 100% rename from examples/c2c-k8s-deployment/kubectl_expose.out rename to examples/kubernetes-hello-world/kubectl_expose.out diff --git a/examples/c2c-k8s-deployment/kubectl_pods.out b/examples/kubernetes-hello-world/kubectl_pods.out similarity index 100% rename from examples/c2c-k8s-deployment/kubectl_pods.out rename to examples/kubernetes-hello-world/kubectl_pods.out diff --git a/examples/c2c-k8s-deployment/kubectl_svc.out b/examples/kubernetes-hello-world/kubectl_svc.out similarity index 100% rename from examples/c2c-k8s-deployment/kubectl_svc.out rename to examples/kubernetes-hello-world/kubectl_svc.out diff --git a/examples/c2c-k8s-deployment/c2c_k8s_deployment.bal b/examples/kubernetes-hello-world/kubernetes-hello-world.bal similarity index 100% rename from examples/c2c-k8s-deployment/c2c_k8s_deployment.bal rename to examples/kubernetes-hello-world/kubernetes-hello-world.bal diff --git a/examples/c2c-k8s-deployment/c2c_k8s_deployment.md b/examples/kubernetes-hello-world/kubernetes-hello-world.md similarity index 91% rename from examples/c2c-k8s-deployment/c2c_k8s_deployment.md rename to examples/kubernetes-hello-world/kubernetes-hello-world.md index e897513ead..b00fbda61c 100644 --- a/examples/c2c-k8s-deployment/c2c_k8s_deployment.md +++ b/examples/kubernetes-hello-world/kubernetes-hello-world.md @@ -1,9 +1,9 @@ # Kubernetes Ballerina supports generating Kubernetes artifacts from code without any additional configuration. This simplifies the experience of developing and deploying Ballerina code in the cloud. Code to Cloud builds the containers and required artifacts by deriving the required values from the code. If you want to override the default values taken by the compiler, you can use a `Cloud.toml` file. -For more information, see [Code to Cloud Deployment](/learn/run-in-the-cloud/code-to-cloud/code-to-cloud-deployment/). +For more information, see [Code to Cloud deployment](/learn/run-in-the-cloud/code-to-cloud-deployment/). -::: code c2c_k8s_deployment.bal ::: +::: kubernetes-hello-world.bal ::: Before you build the package, you need to override some default values taken by the compiler. To do this, create a filed named `Cloud.toml` in the package directory, and add the content below to it. For all the supported key value properties, see [Code to Cloud Specification](https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md). diff --git a/examples/c2c-k8s-deployment/minikube_ip.out b/examples/kubernetes-hello-world/minikube_ip.out similarity index 100% rename from examples/c2c-k8s-deployment/minikube_ip.out rename to examples/kubernetes-hello-world/minikube_ip.out From a7b33a1130aae4cba8f841ab8ba80a5b1c450a40 Mon Sep 17 00:00:00 2001 From: praneesha Date: Wed, 3 May 2023 14:38:59 +0530 Subject: [PATCH 2/2] Update examples/kubernetes-hello-world/kubernetes-hello-world.md Co-authored-by: Anjana Supun --- examples/kubernetes-hello-world/kubernetes-hello-world.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/kubernetes-hello-world/kubernetes-hello-world.md b/examples/kubernetes-hello-world/kubernetes-hello-world.md index b00fbda61c..a42395397b 100644 --- a/examples/kubernetes-hello-world/kubernetes-hello-world.md +++ b/examples/kubernetes-hello-world/kubernetes-hello-world.md @@ -3,7 +3,7 @@ Ballerina supports generating Kubernetes artifacts from code without any additional configuration. This simplifies the experience of developing and deploying Ballerina code in the cloud. Code to Cloud builds the containers and required artifacts by deriving the required values from the code. If you want to override the default values taken by the compiler, you can use a `Cloud.toml` file. For more information, see [Code to Cloud deployment](/learn/run-in-the-cloud/code-to-cloud-deployment/). -::: kubernetes-hello-world.bal ::: +::: code kubernetes-hello-world.bal ::: Before you build the package, you need to override some default values taken by the compiler. To do this, create a filed named `Cloud.toml` in the package directory, and add the content below to it. For all the supported key value properties, see [Code to Cloud Specification](https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md).