Skip to content

Commit

Permalink
Updated readme's,
Browse files Browse the repository at this point in the history
  • Loading branch information
barankyle committed Oct 25, 2017
1 parent 8e19e19 commit 222d75d
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 31 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# BitScoop Ops Buddy Demo

This demo will show you how to set up your own copy of the BitScoop Ops Buddy demo.
The app that is set up allows users to create an account through a web app using a Google account for signup.
This application demonstrates the power and versatility of the [BitScoop](https://bitscoop.com) platform.
Ops Buddy has two components: a web app and an Alexa Skill.
The app allows users to create an account using a Google account for signup.
In their Ops Buddy account, they can configure various services about which they want to retrieve information.
The demo also sets up an Alexa skill.
This skill, after being linked with the same Google account used to sign up for Ops Buddy, can be queried to retrieve up-to-date information about the services configured in the Ops Buddy account.
The Alexa Skill, after being linked with the same Google account used to sign up for Ops Buddy, can be queried to retrieve up-to-date information about the services configured in the Ops Buddy account.

We provide a public copy of this demo at opsbuddy.bitscoop.com, as well as a publicly-available Alexa skill called 'BitScoop Ops Buddy', if you want to see the demo in action without having to set up a copy of your own.
Follow the final sections of steps 4 and 5 of the tutorial to create an Ops Buddy account, configure it, and then install and link the Alexa Skill.
Please see the [tutorials](./tutorials) folder for instructions on configuring the skill on our publicly-hosted copy and/or setting up and configuring a copy of your own.
2 changes: 1 addition & 1 deletion src/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Quicksand:400|Roboto:300,400,700|Open+Sans:200,300,400,700|Source+Sans+Pro:300,400,700" />
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />

<link rel="stylesheet" type="text/css" href="https://s3.amazonaws.com/opsbuddy/css/site.min.css" />
<link rel="stylesheet" type="text/css" href="https://s3.amazonaws.com/***INSERT S3 BUCKET NAME HERE***/css/site.min.css" />

<script type="text/javascript">
'use strict';
Expand Down
7 changes: 7 additions & 0 deletions tutorials/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ops Buddy Tutorials

We provide a public copy of this demo at https://opsbuddy.bitscoop.com, as well as a publicly-available Alexa skill called 'BitScoop Ops Buddy', if you want to see the demo in action without having to set up a copy of your own.
For instructions on how to set up and configure it, please read the instructions in the 'configure' directory.

If you want to set up a copy for yourself, follow the instructions in the [setup](./setup) directory.
When you are done, you will want to follow the [configure](./configure) instructions for your new instance.
23 changes: 23 additions & 0 deletions tutorials/configure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configure Ops Buddy

### Set up and configure account
Go to https://opsbuddy.bitscoop.com (the Invoke URL if you have set up your own copy).

If you click the sign up button, you should be redirected to a prompt from Google authorizing the application that was created to have access to your public info.
After authorization, you should be redirected back to the homepage, where you now have an account with the demo project.

From here you can set the credentials and settings for the four services as well as create a Connection to Google for signing the Google Analytics calls.
The Connection you create can be with a different Google account than you used to sign up for the Ops Buddy account, but it must have access to the Google Analytics data you want to retrieve.

If you log out, then click log in, you should be automatically logged back in, though if you have more than one Google account you will have to click on the one you want to use for the login.

### Install and link Alexa skill
Search for the skill 'BitScoop Ops Buddy' and install it.
(If you are running your own copy, [Sign in to an Alexa account](https://alexa.amazon.com) and then follow the Invite URL you received from the Beta Test page to install the beta version of your skill.)
You should be taken to the page for that skill, but if not go to Skills, then click on 'Your Skills', then select the new skill.
Click on Enable, then click on 'Link Account' when that appears.
Sign in with the same Google account you used to sign up with the front-end app.
If all has succeeded, you should see a page saying the skill was successfully linked.

You should now be able to ask any Alexa device 'Ask Ops Buddy how's the stack doing' (for your own copy, replace 'Ops Buddy' with whatever you used for the invocation name), and it should return information from whatever services you enabled and configured properly in the front-end app.
[EchoSim](https://echosim.io/) is a handy Alexa tester if you do not have another device available.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 3 additions & 7 deletions tutorial/step-4.md → tutorials/setup/step-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ Go to the Lambda function we created earlier, click on the Code tab, then for
Click on the Upload button that appears next to ‘Function package’ and select the .zip file in the /dist folder.
Make sure to Save the function.

### Create and Configure account
If all has gone well, you should be able to hit the Invoke URL and see a page asking you to log in or sign up (if you are using the publicly-hosted copy, just go to www.opsbuddy.bitscoop.com).
If you click the sign up button, you should be redirected to a prompt from Google authorizing the application that was created to have access to your public info.
After authorization, you should be redirected back to the homepage, where you now have an account with the demo project.
From here you can set the credentials and settings for the four services as well as create a Connection to Google for signing the Google Analytics calls.
The Connection you create can be with a different Google account than you used to sign up for the Ops Buddy account, but it must have access to the Google Analytics data you want to retrieve.
If you log out, then click log in, you should be automatically logged back in, though if you have more than one Google account you will have to click on the one you want to use for the login.
If all has gone well, you should be able to hit the Invoke URL and see a page asking you to log in or sign up.
Instructions on what to do on this page found in the [configure](../configure) tutorial.
There is one more major step involved in setting up your own copy, and that involves setting up the Alexa skill.
32 changes: 15 additions & 17 deletions tutorial/step-5.md → tutorials/setup/step-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,19 @@ Click on Interaction Model on the left-hand side. Under Intent Schema enter:
{
"intents": [
{
"intent": "AboutIntent"
"intent": "AMAZON.StopIntent"
},
{
"intent": "StackIntent"
"intent": "AMAZON.CancelIntent"
},
{
"intent": "AMAZON.HelpIntent"
},
{
"intent": "LoginIntent"
"intent": "AboutIntent"
},
{
"intent": "StackIntent"
}
]
}
Expand All @@ -69,10 +75,9 @@ and under Sample Utterances enter:

```
StackIntent how's the stack doing
StackIntent how is the stack doing
StackIntent how is the stack doing today
StackIntent tell me how the stack is doing
```

You can add more utterances if you wish; the key thing is that they must start with ‘StackIntent’ to call the right Intent in the Lambda function.
Expand All @@ -82,7 +87,7 @@ Next click on Configuration.
Service Endpoint Type should be ‘AWS Lambda ARN’.
Paste the ARN from the end of Step 3 into the 'Default' text box right under the endpoint type.
Select 'Yes' under Account Linking, after which a number of fields will appear.
For Authorization URL, enter 'https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force'.
For Authorization URL, enter the Invoke URL followed by '/alexa-login', e.g. 'https://abcd1234.execute-api.us-east-1.amazonaws.com/prod/alexa-login'.
Client ID should be the public key you generated for Google.
Add a domain for Domain List and make it 'google.com'.
Add two scopes, which should be 'https://www.googleapis.com/auth/userinfo.email' and 'https://www.googleapis.com/auth/userinfo.profile'.
Expand All @@ -108,20 +113,13 @@ Check Export Compliance and select No for the advertising question.
For the Privacy Policy URL you can enter 'https://bitscoop.com/privacy'.
Finally, save this.

### Enable and run in Test mode
The rest of these instructions assume you will not publish your copy, but just want to run it in test mode.

At this point, you should see the 'Skills Beta Testing' box on the left change and a button to 'Beta Test Your Skill'.
This means that all necessary information has been entered and you can now run the app.
Click on this button, then enter some emails of testers and click 'Update Testers'.
Finally click 'Start test' in the bottom right.
You should be taken to a page with an Invite URL.

### Sign in with an Alexa product
[Sign in to Alexa account](alexa.amazon.com) with an email that was provided under the Skills Beta testing.
Next, follow the Invite URL to add that skill to your account
(If you are using the publicly-hosted copy, just search for the skill 'BitScoop Ops Buddy' and install it instead of following any Invite URL).
You should be taken to the page for that skill, but if not go to Skills, then click on 'Your Skills', then select the new skill.
Click on Enable, then click on 'Link Account' when that appears.
Sign in with the same Google account you used to sign up with the front-end app.
If all has succeeded, you should see a page saying the skill was successfully linked.

You should now be able to ask any Alexa device 'Ask <skill invocation name> how's the stack doing', and it should return information from whatever services you enabled and configured properly in the front-end app.
[EchoSim](https://echosim.io/) is a handy Alexa tester if you do not have another device available.
For instructions on how to enable and link this skill, see the instructions in the [configure](../configure) tutorial.

0 comments on commit 222d75d

Please sign in to comment.