|
| 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 | + 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 | + Log into the OCI console in Ashburn |
| 31 | +specifying the **cloudnative-devrel** tenancy. |
| 32 | + |
| 33 | +https://console.us-ashburn-1.oraclecloud.com |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + Provide your username along with the initial password you were provided. |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + Provide a new password satisfying the |
| 42 | +requirements and record it for use during the workshop. |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + 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 | + |
| 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 | + 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | +
|
0 commit comments