Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AzureDeploy] Enable deploy button on newer samples #137

Merged
merged 30 commits into from
Jul 10, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c9c347a
Renames
pcostantini May 19, 2017
4b59ae3
Link Node samples
pcostantini May 19, 2017
e36bbe8
Fix typo
pcostantini May 19, 2017
dfd7117
Link C# samples
pcostantini May 19, 2017
d43ea92
Fix lint issues
pcostantini May 22, 2017
ba3b6e1
Update to support Azure Deploy button
pcostantini May 22, 2017
4bab45f
Update to support Azure Deploy button
pcostantini May 22, 2017
1439c55
Update to support Azure Deploy button
pcostantini May 22, 2017
3b08400
Update to support Azure Deploy button
pcostantini May 22, 2017
4464636
Update to support Azure Deploy button
pcostantini May 22, 2017
873167a
Update to support Azure Deploy button
pcostantini May 22, 2017
15083a7
Merge remote-tracking branch 'remotes/origin/sample-payments-readmes'…
pcostantini May 23, 2017
8fec898
Update to support Azure Deploy button
pcostantini May 23, 2017
8a8ca9a
Merge remote-tracking branch 'remotes/origin/sample-payments-readmes'…
pcostantini May 23, 2017
8e8239d
Update to support Azure Deploy button
pcostantini May 23, 2017
38d700a
Update to support Azure Deploy button
pcostantini May 23, 2017
9bf9bbf
Update to support Azure Deploy button
pcostantini May 23, 2017
e948000
Update to support Azure Deploy button
pcostantini May 23, 2017
ff8a301
Update to support Azure Deploy button
pcostantini May 23, 2017
6358565
Update to support Azure Deploy button
pcostantini May 23, 2017
62ce826
Update to support Azure Deploy button
pcostantini May 23, 2017
0d346e4
Update to support Azure Deploy button
pcostantini May 23, 2017
af143b3
Merge remote-tracking branch 'origin/rollerskill-readmes' into azured…
pcostantini May 23, 2017
1e24191
Update to support Azure Deploy button
pcostantini May 23, 2017
64f80fd
Update to support Azure Deploy button
pcostantini May 23, 2017
b0bcb21
Update to support Azure Deploy button
pcostantini May 23, 2017
ad1c7c9
Update to support Azure Deploy button
pcostantini May 23, 2017
e210a8a
Merge branch 'master' into azuredeploy-updates
pcostantini Jun 23, 2017
f9def6d
Add default port
pcostantini Jun 23, 2017
6140d4e
Merge branch 'azuredeploy-updates'
pcostantini Jun 23, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update to support Azure Deploy button
  • Loading branch information
pcostantini committed May 23, 2017
commit 873167a71e517030e4b713899ab577f916030377
116 changes: 116 additions & 0 deletions CSharp/sample-KnowledgeBot/data/classicalMusicians.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
[
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/6/6a/Johann_Sebastian_Bach.jpg",
"Name": "Johannes Sebastian Bach",
"Era": "Classical",
"Description": "Johann Christian Bach was a composer of the Classical era, the eleventh surviving child and youngest son of Johann Sebastian Bach."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/3/33/Chopin,_by_Wodzinska.JPG",
"Name": "Frederic Chopin",
"Era": "Romantic",
"Description": "Frédéric François Chopin, born Fryderyk Franciszek Chopin, was a Polish composer and virtuoso pianist of the Romantic era who wrote primarily for the solo piano."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Beethoven.jpg/1280px-Beethoven.jpg",
"Name": "Ludwig Van Beethoven",
"Era": "Romantic",
"Description": "Ludwig van Beethoven was a German composer and pianist. A crucial figure in the transition between the Classical and Romantic eras in Western art music, he remains one of the most famous and influential of all composers."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/1/1e/Wolfgang-amadeus-mozart_1.jpg",
"Name": "Wolfgang Amadeus Mozart",
"Era": "Classical",
"Description": "Wolfgang Amadeus Mozart, baptised as Johannes Chrysostomus Wolfgangus Theophilus Mozart, was a prolific and influential composer of the Classical era. Born in Salzburg, Mozart showed prodigious ability from his earliest childhood."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/f/fa/George_Frideric_Handel_by_Balthasar_Denner.jpg",
"Name": "George Frideric Handel",
"Era": "Baroque",
"Description": "George Frideric Handel was a German, later British baroque composer who spent the bulk of his career in London, becoming well known for his operas, oratorios, anthems, and organ concertos."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/8/8a/Pyotr_Ilyich_Tchaikovsky.jpg",
"Name": "Pyotr Ilyich Tchaikovsky",
"Era": "Romantic",
"Description": "Pyotr Ilyich Tchaikovsky, often anglicized as Peter Ilyich Tchaikovsky, was a Russian composer of the late-Romantic period, some of whose works are among the most popular music in the classical repertoire."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/7/79/Franz_Schubert_cropped.jpg",
"Name": "Franz Shubert",
"Era": "Romantic",
"Description": "Franz Peter Schubert was an Austrian composer. Schubert died before his 32nd birthday, but was extremely prolific during his lifetime."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/1/15/JohannesBrahms.jpg",
"Name": "Johannes Brahms",
"Era": "Romantic",
"Description": "Johannes Brahms was a German composer and pianist. Born in Hamburg into a Lutheran family, Brahms spent much of his professional life in Vienna, Austria."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/9/9d/RichardWagner.jpg",
"Name": "Richard Wagner",
"Era": "Romantic",
"Description": "Wilhelm Richard Wagner was a German composer, theatre director, polemicist, and conductor who is primarily known for his operas. Unlike most opera composers, Wagner wrote both the libretto and the music for each of his stage works."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Joseph_Haydn.jpg/475px-Joseph_Haydn.jpg",
"Name": "Joseph Haydn",
"Era": "Classical",
"Description": "Joseph Haydn was a prolific Austrian composer of the Classical period. He was instrumental in the development of chamber music such as the piano trio and his contributions to musical form have earned him the epithets \"Father of the Symphony\" and \"Father of the String Quartet\"."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/f/f9/Claude_Debussy_ca_1908,_foto_av_F%C3%A9lix_Nadar.jpg",
"Name": "Claude Debussy",
"Era": "Impressionist",
"Description": "Claude-Achille Debussy was a French composer. He and Maurice Ravel were the most prominent figures associated with Impressionist music, though Debussy disliked the term when applied to his compositions."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/3/3a/Franz_Liszt_by_Nadar,_March_1886.png",
"Name": "Frans Liszt",
"Era": "Romantic",
"Description": "Franz Liszt was a prolific 19th-century Hungarian composer, virtuoso pianist, conductor, music teacher, arranger, and Franciscan tertiary."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/b/b7/Gustav-Mahler-Kohut.jpg",
"Name": "Gustav Mahler",
"Era": "Romantic",
"Description": "Gustav Mahler was an Austrian late-Romantic composer, and one of the leading conductors of his generation. As a composer he acted as a bridge between the 19th century Austro-German tradition and the modernism of the early 20th century."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/c/cc/Igor_Stravinsky_Essays.jpg",
"Name": "Igor Stravinsky",
"Era": "Modernist",
"Description": "Igor Fyodorovich Stravinsky was a Russian composer, pianist, and conductor. He is widely considered one of the most important and influential composers of the 20th century. Stravinsky's compositional career was notable for its stylistic diversity."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Felix_Mendelssohn-Bartholdy_%28AMZ_1837%29.png/1070px-Felix_Mendelssohn-Bartholdy_%28AMZ_1837%29.png",
"Name": "Felix Mendelssohn",
"Era": "Romantic",
"Description": "Jakob Ludwig Felix Mendelssohn Bartholdy, born and widely known as Felix Mendelssohn, was a German composer, pianist, organist and conductor of the early Romantic period."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/9/98/Antonio_Vivaldi_portrait.jpg",
"Name": "Antonio Vivaldi",
"Era": "Baroque",
"Description": "Antonio Lucio Vivaldi was an Italian Baroque composer, virtuoso violinist, teacher and cleric. Born in Venice, he is recognized as one of the greatest Baroque composers, and his influence during his lifetime was widespread across Europe."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/b/be/Sergei_Rachmaninoff_cph.3a40575.jpg",
"Name": "Sergei Rachmaninoff",
"Era": "Romantic",
"Description": "Sergei Vasilievich Rachmaninoff was a Russian pianist, composer, and conductor of the late-Romantic period, some of whose works are among the most popular in the classical repertoire. He is regarded as one of the major composers of the 20th century."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/3/3e/Portrait_of_Robert_Schumann.jpg",
"Name": "Robert Schumann",
"Era": "Romantic",
"Description": "Robert Schumann was a German composer and influential music critic. He is widely regarded as one of the greatest composers of the Romantic era. Schumann left the study of law, intending to pursue a career as a virtuoso pianist."
},
{
"imageURL": "https://upload.wikimedia.org/wikipedia/commons/7/78/Maurice_Ravel_1925.jpg",
"Name": "Maurice Ravel",
"Era": "Impressionist",
"Description": "Joseph Maurice Ravel was a French composer, pianist and conductor. He is often associated with impressionism along with his elder contemporary Claude Debussy, although both composers rejected the term."
}
]
8 changes: 8 additions & 0 deletions Node/sample-knowledgeBot/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Bot Framework Variables
MICROSOFT_APP_ID=
MICROSOFT_APP_PASSWORD=

# Azure Search Variables
AZURE_SEARCH_NAME=
AZURE_SEARCH_KEY=
INDEX_NAME=
45 changes: 0 additions & 45 deletions Node/sample-knowledgeBot/.gitignore

This file was deleted.

7 changes: 6 additions & 1 deletion Node/sample-knowledgeBot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

In this demo I'll demonstrate how to use Azure Document DB, Azure Search and the Microsoft Bot Framework to build a bot that searches and filters over an underlying dataset.

[![Deploy to Azure][Deploy Button]][Deploy Node/KnowledgeBot]

[Deploy Button]: https://azuredeploy.net/deploybutton.png
[Deploy Node/KnowledgeBot]: https://azuredeploy.net

## Background
More and more frequently we're seeing the value in bots that can reason over underlying data. These bots can help provide users with information about events, products, telemetry etc. Where it's certainly possible to connect a bot directly to a database and perform queries against it, we've found that using a search engine over our data is particularly helpful for two big things:

Expand Down Expand Up @@ -134,7 +139,7 @@ sake of simplicity I'm going to use the Document DB Data Migration Tool (documen
}
]);
```
In the promptButtons dialog we use the Prompts.choice method to prompt the user with our choices (in this case Musician Explorer and Musician Search) defined in the `choices` array. Once the user answers, we move into the next function which uses a switch statement to decide which dialog to route us to. Note that the musicianExplorer and musicianSearch dialogs each have their own .js file in the 'dialogs' folder and were included at the start of app.js.
In the promptButtons dialog we use the Prompts.choice method to prompt the user with our choices (in this case Musician Explorer and Musician Search) defined in the `choices` array. Once the user answers, we move into the next function which uses a switch statement to decide which dialog to route us to. Note that the musicianExplorer and musicianSearch dialogs each have their own .js file in the 'dialogs' folder and were included at the start of [app.js](./app.js).

```javascript
bot.dialog('/promptButtons', [
Expand Down
4 changes: 3 additions & 1 deletion Node/sample-knowledgeBot/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require('./config.js')();
require('dotenv-extended').load();

require('./config.js')();
require('./connectorSetup.js')();
require('./searchHelpers.js')();
require('./dialogs/results.js')();
Expand Down
150 changes: 150 additions & 0 deletions Node/sample-knowledgeBot/azuredeploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"siteName": {
"defaultValue": "BotBuilder-Samples",
"type": "string"
},
"hostingPlanName": {
"type": "string"
},
"siteLocation": {
"type": "string"
},
"sku": {
"type": "string",
"allowedValues": [
"Free",
"Shared",
"Basic",
"Standard"
],
"defaultValue": "Free"
},
"workerSize": {
"type": "string",
"allowedValues": [
"0",
"1",
"2"
],
"defaultValue": "0"
},
"repoUrl": {
"type": "string"
},
"branch": {
"type": "string"
},
"Project": {
"type": "string",
"defaultValue": "Node/sample-knowledgeBot"
},
"WEBSITE_NODE_DEFAULT_VERSION": {
"type": "string",
"defaultValue": "6.9.5"
},
"MICROSOFT_APP_ID": {
"type": "string"
},
"MICROSOFT_APP_PASSWORD": {
"type": "string"
},
"AZURE_SEARCH_NAME": {
"type": "string"
},
"AZURE_SEARCH_KEY": {
"type": "string"
},
"INDEX_NAME": {
"type": "string"
}
},
"resources": [
{
"apiVersion": "2014-06-01",
"name": "[parameters('hostingPlanName')]",
"type": "Microsoft.Web/serverFarms",
"location": "[parameters('siteLocation')]",
"properties": {
"name": "[parameters('hostingPlanName')]",
"sku": "[parameters('sku')]",
"workerSize": "[parameters('workerSize')]",
"numberOfWorkers": 1
}
},
{
"apiVersion": "2014-06-01",
"name": "[parameters('siteName')]",
"type": "Microsoft.Web/Sites",
"location": "[parameters('siteLocation')]",
"dependsOn": [
"[concat('Microsoft.Web/serverFarms/', parameters('hostingPlanName'))]"
],
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty"
},
"properties": {
"name": "[parameters('siteName')]",
"serverFarm": "[parameters('hostingPlanName')]"
},
"resources": [
{
"apiVersion": "2014-04-01",
"type": "config",
"name": "web",
"dependsOn": [
"[concat('Microsoft.Web/Sites/', parameters('siteName'))]"
],
"properties": {
"appSettings": [
{
"name": "Project",
"value": "[parameters('Project')]"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "[parameters('WEBSITE_NODE_DEFAULT_VERSION')]"
},
{
"name": "MICROSOFT_APP_ID",
"value": "[parameters('MICROSOFT_APP_ID')]"
},
{
"name": "MICROSOFT_APP_PASSWORD",
"value": "[parameters('MICROSOFT_APP_PASSWORD')]"
},
{
"name": "AZURE_SEARCH_NAME",
"value": "[parameters('AZURE_SEARCH_NAME')]"
},
{
"name": "AZURE_SEARCH_KEY",
"value": "[parameters('AZURE_SEARCH_KEY')]"
},
{
"name": "INDEX_NAME",
"value": "[parameters('INDEX_NAME')]"
}
]
}
},
{
"apiVersion": "2014-04-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]",
"[concat('Microsoft.Web/Sites/', parameters('siteName'), '/config/web')]"
],
"properties": {
"RepoUrl": "[parameters('repoUrl')]",
"branch": "[parameters('branch')]",
"IsManualIntegration": true
}
}
]
}
]
}
Loading