File tree Expand file tree Collapse file tree 10 files changed +11
-11
lines changed Expand file tree Collapse file tree 10 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 2
2
3
3
# Tutorials and Samples for IBM Cloud Code Engine
4
4
5
- This respository is split into two types of educational material: Tutorials
5
+ This repository is split into two types of educational material: Tutorials
6
6
and Samples.
7
7
8
8
Tutorials are meant to be complete end-to-end scenarios designed
Original file line number Diff line number Diff line change 3
3
This sample will show how to create an application that is nothing more than
4
4
a bash script. While there is still an HTTP server as part of the solution,
5
5
you 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.
7
7
8
8
In this setup the follow will happen:
9
9
- during the startup of each instance of your applciation, if present,
10
10
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
12
12
want executed. The environment variable program will be called after
13
13
` /app/init ` . This allows for you to execute code that you want only
14
14
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
5
5
an object to a Cloud Object Storage (COS) bucket generates an event. When the
6
6
app receives the event, it parses out the bucket and object key from the event,
7
7
downloads 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
9
9
the file from the original source bucket.
10
10
11
11
The 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
13
13
for debugging purposes.
14
14
15
15
The 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
17
17
job directly without first creating a job definition. In the second case
18
18
it will also change the message printed via the ` MSG ` environment variable.
19
19
Original file line number Diff line number Diff line change 1
1
# Fruit Counter
2
2
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 ) .
4
4
5
5
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ func ProcessEvent(eventType string, eventBody []byte) {
88
88
return
89
89
}
90
90
91
- log .Printf ("%s commited %q to %q branch" ,
91
+ log .Printf ("%s committed %q to %q branch" ,
92
92
PushEvent .Pusher .Name , PushEvent .After , PushEvent .Ref )
93
93
94
94
// Now we'd normally do a build, but let's just fake it.
Original file line number Diff line number Diff line change 1
1
# Job
2
2
3
3
This 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)
5
5
and then it submits that Job to actually do the work.
6
6
2 - second, it'll submit the Job directly without creating the definition
7
7
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
10
10
add messages to our Kafka instance.
11
11
12
12
The 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
14
14
to setup the Kafka subscription we'll first need to store the credentials
15
15
(` username ` and ` password ` ) in a secret, then pass in that secret name on
16
16
the 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
16
16
for debugging purposes.
17
17
18
18
The 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
20
20
job directly without first creating a job definition. In the second case
21
21
it will also change the message printed via the ` MSG ` environment variable.
22
22
Original file line number Diff line number Diff line change 3
3
This sample will show how to use WebSockets to talk to a Code Engine
4
4
Application. The sample itself is fairly straight forward. It starts a server
5
5
that 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
7
7
HTTP request into a WebSocket). The client will then send a series of
8
8
messages (strings) and in parallel reads messages from the server. The
9
9
server will simply reverse the characters in the strings to generate the
You can’t perform that action at this time.
0 commit comments