Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

These scripts were made possible thanks to the Michael and Susan Dell Foundation.

Description

The following instructions will guide you through the instatiation of the Google Cloud Ed-Fi ODS/API v3.4 VM and tools.

Prerequisites

This will be a hands-on exercise 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 Image Added 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):

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

Image Added

*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.

Image Added


5) To be able to access the VM you will need to create a windows account. To do this click the arrow next to RDP and select "Set windows password"Image Added

6) 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.Image Added

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

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

Image AddedImage Added

9) 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:

Exploring Databases

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

        Image Added

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

         Image Added

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.

         Image Added


Exploring IIS and the Available Sites

1) Open IIS (Internet Information Services) by clicking on the icon on the task bar.

        Image Added

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

3) Click on the application that says api (#2)

4) On the right "Actions" panel click on browse 443 (#3). It will open a Chrome Browser window. Click on Browse as Guest. Then go back to the IIS window and click on Browse 443 again. This time it should open a second tab with the api URL.

          Image Added

          Image Added

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. This is the production swagger. Click on the resources link on the right.

        Image Added

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

        client_id: JBVSZ60PG4yC

        client_secret: MdlUJTtUIKR881r09whP94Wb

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.

Image AddedImage Added

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". 

Image AddedImage Added

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.

Image Added

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.

        Image Added

2) Execute a authorization request: On the left panel expand the folder EdFi v3.1.1 and select the "POST Get Auth Token" 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.

         Image Added

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. 

         Image Added


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..."

Image Added

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"Image Added


    1.b) "Could not fetch resource"

Image Added

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.