Skip to content

Commit cd6c2e7

Browse files
committed
Update README.md
1 parent 1d98492 commit cd6c2e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2142
-887
lines changed

0-Setup.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Environment Setup
2+
3+
For convenience, each lab participant will be provided with an Oracle Cloud
4+
Infrastructure virtual machine configured with all the tools you'll need for
5+
this workshop.
6+
7+
Your workshop instructor will provide you with the following:
8+
9+
1. Participant Number--your unique id that will be incorporated into your user
10+
id and your virtual machine name. We'll also use it in the labs.
11+
2. User Id/Password--to enable you to log into the OCI Console and to deploy
12+
functions
13+
3. Tenancy Name--that you will use to log into the OCI account.
14+
4. Auth Token--used as your password when logging into OCIR
15+
5. IP Address--of your hosted development environment machine
16+
6. VNC Password--to allow you to log into your hosted development machine
17+
7. URL of the preview release of the OCI SDK which includes Functions support.
18+
19+
> As you make your way through this lab, look out for this icon.
20+
![user input](images/userinput.png) Whenever you see it, it's time for you to
21+
perform an action.
22+
23+
## Pre-requisites
24+
25+
Before we get started you'll need to log into the OCI account you've been
26+
provided to change your password from the temporary initial password. Although
27+
we're going to be working in the Phoenix region, you'll need to login into
28+
Ashburn to reset your password.
29+
30+
![user input](images/userinput.png) Log into the OCI console in Ashburn
31+
specifying the **cloudnative-devrel** tenancy.
32+
33+
https://console.us-ashburn-1.oraclecloud.com
34+
35+
![Login Tenancy](images/login.png)
36+
37+
![user input](images/userinput.png) Provide your username along with the initial password you were provided.
38+
39+
![Login User](images/login-user.png)
40+
41+
![user input](images/userinput.png) Provide a new password satisfying the
42+
requirements and record it for use during the workshop.
43+
44+
![Login New Password](images/login-new-password.png)
45+
46+
![user input](images/userinput.png) Once you've successfully changed
47+
your password and logged in, log out. Later on we'll be logging into the
48+
Phoenix region console.
49+
50+
![Select Region](images/logout.png)
51+
52+
## Configuring your Environment
53+
54+
Now that your user account is accessible, let's log into the provided VM where
55+
you'll be ready to start no configuration.
56+
57+
To access your cloud-based development environment you'll need a VNC client
58+
on your laptop. You can use whatever you have previously installed or you can
59+
use the VNC Viewer for Chrome that is extremely easy to install.
60+
61+
https://chrome.google.com/webstore/detail/vnc%C2%AE-viewer-for-google-ch/iabmpiboiopbgfabjmgeedhcmjenhbla/related
62+
63+
> NOTE: If you're curious about how to setup your own machine to build functions
64+
> and deploy them to Oracle Functions you can follow the instructions in the
65+
> [Quick Start
66+
> Guide](https://www.oracle.com/webfolder/technetwork/tutorials/infographics/oci_faas_gettingstarted_quickview/functions_quickview_top/functions_quickview/index.html#)
67+
68+
![user input](images/userinput.png) Log into your VM using the provided IP
69+
Address and password. The VNC port is *5903* so the server address you'll need
70+
to provide will look like `n.n.n.n:5903`
71+
72+
Enter the provided VNC password to complete your login.
73+
74+
![vnc login](images/vnc-login.png)
75+
76+
77+
Open a terminal and type the following command to ensure you are using the
78+
`workshop` context that points to Oracle Functions:
79+
80+
![user input](images/userinput.png)
81+
>```sh
82+
>fn ls contexts
83+
>```
84+
85+
Your output should look something like the following:
86+
87+
```shell
88+
CURRENT NAME PROVIDER API URL REGISTRY
89+
default default
90+
* workshop oracle https://functions.us-phoenix-1.oraclecloud.com phx.ocir.io/cloudnative-devrel/workshop-NNN
91+
```
92+
93+
Now to make sure you can be authenticated correctly and communicate with
94+
Oracle Functions let's run a command to list all of the existing applications.
95+
It doesn't matter what the results--just that you do get result to confirm
96+
connectivity.
97+
98+
![user input](images/userinput.png)
99+
>```sh
100+
>fn ls apps
101+
>```
102+
103+
You may see a list of applications something like this:
104+
105+
```shell
106+
NAME ID
107+
labapp-NNN ocid1.fnapp.oc1.us-phoenix-1.aaaaaaaaag4h7xotdzz27sp7z23ci6z4jqj4raq43ui6ouae5k2kl7irx34a
108+
```
109+
110+
## Clone the Workshop Repo
111+
112+
Before we actually get started let's clone the git repo for this workshop so
113+
that you have all of the necessary materials. Open a terminal and, in your
114+
home directory (i.e., /home/demo) type:
115+
116+
![user input](images/userinput.png)
117+
>```sh
118+
>git clone https://github.com/shaunsmith/functionslab.git
119+
>```
120+
121+
In the `functionslab` folder you'll find the sources for this workshop along
122+
with materials for some of the labs you'll be doing.
123+
124+
## All Set!
125+
126+
Now that you're logged into your development machine, cloned the repo, and are
127+
able to communicate with Oracle Functions it's time to get started!
128+
129+
NEXT: [*Function Labs*](1-Labs.md), UP: [*INDEX*](README.md)
130+

1-Labs.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Functions Labs
2+
3+
In each of the following labs you'll explore a different aspect of Oracle
4+
Functions from creating, to deploying, to troubleshooting, to invoking. In all
5+
cases you'll be using the `fn` CLI extensively so you may find these references
6+
helpful:
7+
8+
* [fn Commands
9+
Cheatsheet](https://github.com/sachin-pikle/functionslab/wiki/Functions-Commands-Cheatsheet)
10+
11+
* [fn CLI docs](https://github.com/fnproject/docs/blob/master/cli/README.md)
12+
13+
## Your First Function
14+
15+
Now that `fn` CLI is installed and your development envirionment is configured,
16+
we can dig into the creation and running of functions. In this lab you'll
17+
create, deploy, and run a Node.js function. If you aren't a Node.js programmer
18+
don't panic! All the code is provided and is pretty easy to understand. The
19+
focus of this tutorial is on becoming familiar with the basics of Fn, not
20+
Node.js programming.
21+
22+
So let's [create and deploy your first function](3-First-Function.md).
23+
24+
## Java Functions
25+
26+
Fn provides an FDK (Function Development Kit) for each of the core supported
27+
programming languages. But the Java FDK is the most advanced with support for
28+
Maven builds, automatic function argument type conversions, and comprehenive
29+
support for function testing with JUnit.
30+
31+
The [Introduction to Java Functions](4-Java-Functions.md) lab covers all these
32+
topics and more.
33+
34+
## Troubleshooting
35+
36+
If you've been following the instructions in the tutorials carefully you
37+
shouldn't have run into any unexpected failures--hopefully!! But in real life
38+
when you're writing code things go wrong--builds fail, exceptions are thrown,
39+
etc. Fortunately the
40+
[Troubleshooting](5-Troubleshooting.md) tutorial
41+
introduces techniques you can use to track down the source of a failure.
42+
43+
## Containers as Functions
44+
45+
One of the coolest features of Fn is that while it's easy to write functions in
46+
various programming languages, you can also deploy Docker images as functions.
47+
This opens up entire world's of opportunity as you can package existing code,
48+
utilities, or use a programming language not yet supported by Fn. Try the
49+
[Containers as Functions](6-Container-as-Function.md)
50+
tutorial to see how easy it is.
51+
52+
## Functions Clients
53+
54+
Functions can be invoked over HTTP using their "invoke endpoint". You can
55+
either invoke the endpoint directly or use the OCI SDK to both manage and invoke
56+
functions. In the [Functions Clients](7-Functions-Clients.md) lab we'll explore
57+
both direct use of HTTP as well as invocation using the OCI SDK for Functions.
58+
59+
## OCI Services
60+
61+
Functions frequently interact with and use other cloud services. Oracle OCI
62+
provides a rich set of cloud service for building cloud native applications
63+
including Object Storage, Caching, and Database. In the [OCI
64+
Services](8-OCI-Services.md) lab you'll see how a function can use the OCI SDK
65+
to read and write data to Object Storage. While the lab uses Object Storage as
66+
an example, the approach is similar across all OCI services.

3-1-SetupEnv.md

Lines changed: 0 additions & 173 deletions
This file was deleted.

0 commit comments

Comments
 (0)