-
Notifications
You must be signed in to change notification settings - Fork 1
Climate Warrior Github App Installation Instructions
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.
After creating new repository using spearhead-objects-prod template visit the Climate Warrior Github App installation website: https://vertigo.druidcloud.app/
Click install app which will redirect to Github for the app to be installed under your account.
Upon Successful Climate Warrior Github app installation a JSON string of user info will be shown including your new user id ie. UserSub.
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".
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
Click the menu icon in the upper left corner to reveal a login button.
Click the login button to be redirected to the Climate Warrior app secure single sign on page.
Input your Github username and temp password.
Click sign on button and message should be displayed to enter username again to reset password. Enter GitHub username and click button "Reset Password".
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.
Open the verification email and copy the code inside.
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.
Once the password is changed you will be redirected back to the main login. Login using your Github username and password.
Now open a new tab and visit the Climate Warrior app Github App page. https://github.com/apps/climate-warrior-official
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".
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.
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"
}
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.
Set-up the repo as a Github Pages website. Visit the repository settings.
Go down to the "Pages" link on the repo settings and click.
On the pages settings Page under "Branch" heading select "master" and click "Save" to deploy the repo as a Github pages website.
Give it about a minute the refresh the page. There will be a banner accross the top with the new Github pages website.
Verify the website serves the test JSON properly by visiting the below url in the browser but using your repos domain name and repo.
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.