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

Server Deployment guide for Azure #1350

Merged
merged 4 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,6 @@ builtdocs/
# vscode settings
.vscode/
.vscode/panel.code-workspace
discover/
discover/

node_modules/
Binary file added examples/assets/azure_deployment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 33 additions & 8 deletions examples/user_guide/Server_Deployment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,42 @@
"\n",
"All live examples in the Panel documentation are served on AE5, to see further examples deployed there see [examples.pyviz.org](https://examples.pyviz.org) and for detailed instructions follow the [developer guide](https://examples.pyviz.org/developer_guide.html).\n",
"\n",
"#### Microsoft Azure\n",
"\n",
"Azure is popular choice for enterprises often in combination with an automated CI/CD pipeline via Azure DevOps. To get started you can use the [Azure Portal](portal.azure.com) to deploy your app as a Linux Web App via the web based user interface.\n",
"\n",
"There are a few things you need to be aware of in order to be able to start your app. \n",
"\n",
"Python Web Apps assumes your web app\n",
"\n",
"- is using `gunicorn` (like Flask or Django) or alternative is started by a `python` command. Thus\n",
" - You **cannot use** `panel serve app.py ...` as a *Startup Command*.\n",
" - You **can use** `python -m panel serve app.py ...` or `python app.py ...` as a *Startup command*.\n",
"- is served on address 0.0.0.0 and port 8000\n",
"\n",
"Thus you can use \n",
"\n",
"```bash\n",
"python -m panel serve app.py --address 0.0.0.0 --port 8000 --allow-websocket-origin=app-name.azurewebsites.net\n",
"```\n",
"\n",
"as a *Startup command*.\n",
"\n",
"You might be able to use `python app.py` as a *Startup command* with `.show()` or `panel.serve` inside your `app.py` file, if you can configure the `address`, `port` and `allow-websocket-origin` in the app.py file or via environment variables.\n",
"\n",
"You also need to configure your app service **general settings** to \n",
"\n",
"- allow `Web sockets` and\n",
"- be `Always on`\n",
"\n",
"<img src=\"../assets/azure_deployment.png\" style=\"width:67%\"></img>\n",
"\n",
"If you would like to setup **automated CI/ CD** via Azure DevOps, Azure Pipelines and Docker to a Web App for Containers, you can find a good starting point in the [devops Folder](https://github.com/MarcSkovMadsen/awesome-panel/tree/master/devops) of [awesome-panel.org](https://awesome-panel.org).\n",
"\n",
"#### Other Cloud Providers\n",
"\n",
"Panel can be used with just about any cloud provider that can launch a Python process, including Amazon Web Services (AWS), Google Cloud Platform (GCP), Azure, and DigitalOcean. The Panel developers will add documentation for these services as they encounter them in their own work, but we would greatly appreciate step-by-step instructions from users working on each of these systems."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -183,7 +208,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.7.4"
}
},
"nbformat": 4,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.