Skip to end of metadata
Go to start of metadata

This "How to" guide was made possible thanks to the Michael and Susan Dell Foundation.

Description

The following "How to" guide will walk you through the instantiation of the Google Cloud Ed-Fi ODS/API v3.4 VM and tools. This VM includes the following Ed-Fi assets and environments:

Assets:

  • ODS \ API v3.4.0
  • Swagger documentation for the API
  • Admin application to manage both the Production and Sandbox APIs

Environments:

  • Production (Shared Instance)
  • Sandbox

Prerequisites

This will be a hands-on activity using the Ed-Fi ODS/API deployed in a VM on Google Cloud, and you will need to provide your own laptop and have access to a Google Cloud tenancy.

Note: Even though Google Cloud has promotions for free accounts and/or $300.00 worth of free credits you may need to input a credit card.

There are two prerequisites for this lab:

Setup Instructions

1) Login to (https://console.cloud.google.com/compute/instances)

2) Open the Google Cloud Console  and click activate. It will open a shell at the bottom of the screen.

3) Execute the following command (Note might take around 5 minutes):

Create Instance
gcloud compute instances create edfi-development --image edfi-v340 --image-project genuine-essence-252114 --zone us-central1-c --machine-type n1-standard-4

*Note: If you get message "API [compute.googleapis.com] not enabled on project [xxxxxxxxxxxx]. Would you like to enable and retry? Say yes. This will enable compute on your account.

4) A successful result should look like the image below. Additionally you should see the instance running at the top of the screen.

5) To be able to access the VM you will need to use the following credentials:

  • Username: Administrator
  • Password: EdFi!sCool

*NOTE: We recommend you change the password on the Administrator account upon first login.

*Optionally, you can create a windows account. To do this click the arrow next to RDP and select "Set windows password"

A prompt will come up. Make sure that you type edfi for the username. After you click on "Set" it will give you a secure password. NOTE: You should save that password in a secure place.

6) Open RDP (Remote Desktop Connection). Hit your windows key and type RDP and enter.

7) Use the external IP, edfi user and the password it gave you to connect to the VM

8) At this point you should be in the VM and we can start exploring the Ed-Fi ODS API

Exploring the Ed-Fi ODS API Assets

Exploring Databases

1) Open SSMS (Sql Server Management Studio) by clicking on the icon on the task bar.

        

2) Connect to the local instance by just clicking connect.

         

3) Expand the databases on the left panel (Object Explorer). You will see a list of all databases. At this point you can expand and explore all tables and objects in the Ed-Fi ODS databases.

Exploring IIS and the Available Sites

1) Open IIS (Internet Information Services) by hitting the windows key, typing IIS and hitting enter. 

        

2) Expand the server by clicking on the arrow on the left. (Expand all websites and virtual directories)

3) Click on the application that says Api that is under the v3.4.0Sandbox virtual directory.

4) On the right "Actions" panel click on browse 443. It will open a Chrome Browser window with the ODS\API URL.

5. Without closing the Chrome browser you can return to IIS and explore the other applications by selecting them and clicking on Browse 443.

6. Open the "Docs" application that resides inside the /v3.4.0Sandbox/ virtual directory. This is the sandbox swagger. Click on the resources link on the right.

        

7) Authorize your session: Click on the authorize button and use the following credentials.

  • client_id: A0hcXwnYrwaj
  • client_secret: fIM7AKJNYqDRF2DPgD8zup8i

Then click on the "Authorize" button and the inputs should switch to asterisks. This means you are authorized. At this point you can click the "Close" button.

8) Execute the students request: Scroll all the way to the bottom of the screen and locate the students request. Click on the arrow on the right to expand it (#1). Then proceed to click on the "GET" request (#2) to expand the options. Click on the "Try it out" button (#3) and scroll to the bottom until you see a big blue button that says "Execute". 

Click on the "Execute" button (#1). You should see a loading animation and then on the results below you will see an array of students (#2). You can continue to explore the rest of the Ed-Fi ODS API endpoints.

You can explore the rest of the applications on that server.

Production:

Sandbox:


Exploring the Ed-Fi ODS API through PostMan

1) Open Postman. Click on the icon on the task bar.

        

2) Execute a authorization request: On the left panel expand the folders EdFi → V 3.x  and select the "POST 1)GetOAuthToken" request (#1). You can choose what environment you want to use by using the environment dropdown that has been pre-configured with both a sandbox and a production environment. (#2). Once you have selected an environment proceed to click on the "Send" button (#3). Once the request finishes you should see in the results panel a response that contains the access_token.

3) Execute the students request: On the left pane select the "GET Get Students" (#1) request and click the send button (#2). The results panel should show an array of students. (#3)

Note: you have to have authenticated first by running the "POST Get Auth Token" request and getting an access_token as described above. 

         


KNOW Issues:

1) When executing "gcloud compute instance create" it gives the following errors:

    1.a) Error message:  "Billing must be enabled for activation of service..."

Fix: you will need to activate your account and add a credit card. The simplest way of doing this is clicking on the top right button that says "Activate"


    1.b) "Could not fetch resource"

Fix: We need to give you access to the image. Please email "douglas.loyo@msdf.org" so that we can give you access to the image.

  • No labels