File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33# Tutorials and Samples for IBM Cloud Code Engine
44
5- This respository is split into two types of educational material: Tutorials
5+ This repository is split into two types of educational material: Tutorials
66and Samples.
77
88Tutorials are meant to be complete end-to-end scenarios designed
Original file line number Diff line number Diff line change 33This sample will show how to create an application that is nothing more than
44a bash script. While there is still an HTTP server as part of the solution,
55you should be able to reuse the ` bash ` container image in other projects
6- without neeeding to do more than just provide a custom bash script.
6+ without needing to do more than just provide a custom bash script.
77
88In this setup the follow will happen:
99- during the startup of each instance of your applciation, if present,
1010 a file named ` /app/init ` will be invoked. You can also set an environment
11- variabled called ` INIT ` to the path of an additional program that you
11+ variable called ` INIT ` to the path of an additional program that you
1212 want executed. The environment variable program will be called after
1313 ` /app/init ` . This allows for you to execute code that you want only
1414 run once per instance - and not on each incoming HTTP request.
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ demonstrates a simple event-driven application pattern wherein the uploading of
55an object to a Cloud Object Storage (COS) bucket generates an event. When the
66app receives the event, it parses out the bucket and object key from the event,
77downloads the object (file), "processes" it, and then uploads the resulting
8- file to a separate (preconfigured ) destination bucket. The app then deletes
8+ file to a separate (pre-configured ) destination bucket. The app then deletes
99the file from the original source bucket.
1010
1111The app also includes a listener for cron events. Upon receipt of a cron event,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ The code will also print the list of environment variables to the log file
1313for debugging purposes.
1414
1515The sample script will also submit the job twice. First by creating a
16- job defintion , followed by submitting it, and then it will submit a new
16+ job definition , followed by submitting it, and then it will submit a new
1717job directly without first creating a job definition. In the second case
1818it will also change the message printed via the ` MSG ` environment variable.
1919
Original file line number Diff line number Diff line change 11# Fruit Counter
22
3- Combine IBM Cloudant and IBM Code Engine to deploy a scalable and higly available web app. [ Follow the tutorial here] ( https://www.ibm.com/cloud/blog/ibm-code-engine-and-ibm-cloudant-serverless-data-and-infrastructure ) .
3+ Combine IBM Cloudant and IBM Code Engine to deploy a scalable and highly available web app. [ Follow the tutorial here] ( https://www.ibm.com/cloud/blog/ibm-code-engine-and-ibm-cloudant-serverless-data-and-infrastructure ) .
44
55
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ func ProcessEvent(eventType string, eventBody []byte) {
8888 return
8989 }
9090
91- log .Printf ("%s commited %q to %q branch" ,
91+ log .Printf ("%s committed %q to %q branch" ,
9292 PushEvent .Pusher .Name , PushEvent .After , PushEvent .Ref )
9393
9494 // Now we'd normally do a build, but let's just fake it.
Original file line number Diff line number Diff line change 11# Job
22
33This sample shows up to run a batch job. It will create the batch job two ways:
4- 1 - first, it'll create a Job definition (the config informatin about a job)
4+ 1 - first, it'll create a Job definition (the config information about a job)
55 and then it submits that Job to actually do the work.
662 - second, it'll submit the Job directly without creating the definition
77 first. Both will generate the same results though.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ that to setup our subscription and Kafka "sender" application that will
1010add messages to our Kafka instance.
1111
1212The second part of the sample will create a Kafka subscription and send
13- all incoming messags to a new application called "receiver". In order
13+ all incoming messages to a new application called "receiver". In order
1414to setup the Kafka subscription we'll first need to store the credentials
1515(` username ` and ` password ` ) in a secret, then pass in that secret name on
1616the subscription "create" command. We'll also need to pass in the list of
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ The code will also print the list of environment variables to the log file
1616for debugging purposes.
1717
1818The sample script will also submit the job twice. First by creating a
19- job defintion , followed by submitting it, and then it will submit a new
19+ job definition , followed by submitting it, and then it will submit a new
2020job directly without first creating a job definition. In the second case
2121it will also change the message printed via the ` MSG ` environment variable.
2222
Original file line number Diff line number Diff line change 33This sample will show how to use WebSockets to talk to a Code Engine
44Application. The sample itself is fairly straight forward. It starts a server
55that will upgrade any incoming HTTP request into a WebSocket connection. The
6- client initates a request (which, under the covers, converts the
6+ client initiates a request (which, under the covers, converts the
77HTTP request into a WebSocket). The client will then send a series of
88messages (strings) and in parallel reads messages from the server. The
99server will simply reverse the characters in the strings to generate the
You can’t perform that action at this time.
0 commit comments