Skip to content

Climate Warrior Github App Installation Instructions

ng-druid edited this page Jul 7, 2023 · 18 revisions

We send transactional emails via AWS SES. Our AWS SES account is currently in sandbox mode. Prior to following these instructions send an email to hi@rollthecloud.com with your Github primary email address. We will write you back once the email address can be sent the transactional email required for registration.

Visit https://github.com/rollthecloudinc/spearhead-objects-prod and create new repository by using the repo as a template.

Screen Shot 2023-07-04 at 10 56 41 AM

After creating new repository using spearhead-objects-prod template visit the Climate Warrior Github App installation website: https://vertigo.druidcloud.app/

Screen Shot 2023-07-04 at 10 59 57 AM

Click install app which will redirect to Github for the app to be installed under your account.

Screen Shot 2023-07-04 at 10 59 28 AM

Upon Successful Climate Warrior Github app installation a JSON string of user info will be shown including your new user id ie. UserSub.

Screen Shot 2023-07-04 at 11 32 52 AM

Visit your email associated with your Github account. The Github App sign-up process will have sent an email from sso@druidcloud.io titled "Greetings, Username".

Screen Shot 2023-07-04 at 11 35 49 AM

The email sent will contain a one time temporary password. Copy the temp password and visit the following url apart of the Github App installation website. https://vertigo.druidcloud.app/pages/create-panel-page

Screen Shot 2023-07-04 at 11 39 01 AM

Click the menu icon in the upper left corner to reveal a login button.

Screen Shot 2023-07-04 at 11 39 20 AM

Click the login button to be redirected to the Climate Warrior app secure single sign on page.

Screen Shot 2023-07-04 at 11 39 31 AM

Input your Github username and temp password.

Screen Shot 2023-07-04 at 11 39 31 AM

Click sign on button and message should be displayed to enter username again to reset password. Enter GitHub username and click button "Reset Password".

Screen Shot 2023-07-04 at 11 41 15 AM

Visit your email account once again in a different tab. An email will have been sent from no-reply@verificationemail.com. The email will contain the code to be used to reset your password.

Screen Shot 2023-07-04 at 11 52 58 AM

Open the verification email and copy the code inside.

Screen Shot 2023-07-04 at 11 54 00 AM

Navigate back to the tab/window with the reset form and enter the code in the top field and your new, secure password for your Climate Warrior App user. The Climate Warrior App user is a completely separate user from your Github user maintained internally RollTheCloud / Climate Warrior App. Once info is entered click "Change Password" button to complete process.

Screen Shot 2023-07-04 at 11 41 27 AM

Once the password is changed you will be redirected back to the main login. Login using your Github username and password.

Screen Shot 2023-07-04 at 11 43 39 AM

Now open a new tab and visit the Climate Warrior app Github App page. https://github.com/apps/climate-warrior-official

Screen Shot 2023-07-04 at 12 40 37 PM

Click the install button to install the Github App under your Github Account that was used for the app registration, authorization process. The Github App needs be configured to write to either all repos under your account or specific repos. We HIGHLY recommend limiting access to specific repos until others are needed. Once the repo access is configured click the button below "Install and Authorize".

Screen Shot 2023-07-04 at 12 43 27 PM

Once this process is complete you will be able to use our #CarbonHack22 award winning Climate Aware database HEDGE to store JSON and media files. All your requests through HEDGE will also have SCI tracked. The SCI will be made available in the future via both a public end-point and interactive dashboard. HEDGE is the official data store for Quell and Spearhead. The critical component allowing neutralization of databases and costs typically associated with hosting a website and/or app.

To test HEDGE we recommend downloading Insomnia. https://insomnia.rest/

Go back to the Github app website and login again to obtain an id_token. Copy the id_token from the browser dev tools.

Screen Shot 2023-07-04 at 12 13 00 PM

Once Insomnia is installed open the app. Create a new POST request to the below API end-point using the id_token copied from the previous step. Also enter a document for verifying write success as the json body. Replace {user} and {repo} in the below url with your Github username and repo that you granted the Climate Warrior Github app access to in the previous Github App installation step.

url: https://edge.hedge.earth/octostore/{user}/{repo}/shapeshifter/test/one body:

{
	"id": "one",
	"title": "tracxxxxxxxxe"
}
Screen Shot 2023-07-04 at 12 50 28 PM Screen Shot 2023-07-04 at 12 52 20 PM

Send the request. Upon success the response will be the written document including the user id of the creator. Verify the write by navigating to the repository in your Github account.

Screen Shot 2023-07-04 at 12 50 13 PM

Set-up the repo as a Github Pages website. Visit the repository settings.

Screen Shot 2023-07-04 at 1 01 14 PM

Go down to the "Pages" link on the repo settings and click.

Screen Shot 2023-07-04 at 1 02 32 PM

On the pages settings Page under "Branch" heading select "master" and click "Save" to deploy the repo as a Github pages website.

Screen Shot 2023-07-04 at 1 03 41 PM Screen Shot 2023-07-04 at 1 05 10 PM

Give it about a minute the refresh the page. There will be a banner accross the top with the new Github pages website.

Screen Shot 2023-07-04 at 1 07 48 PM

Verify the website serves the test JSON properly by visiting the below url in the browser but using your repos domain name and repo.

Screen Shot 2023-07-04 at 1 12 00 PM

At this point your Github account is now fully integrated with the Climate Warrior App. The HEDGE API can be used to write to any repo that the Github App is granted permission through the Climate Warrior App Configuration settings located under Integration / Applications inside your Github accounts settings page.

Screen Shot 2023-07-04 at 1 19 09 PM

Clone this wiki locally