Skip to content

Commit

Permalink
Server Deployment guide for Azure (#1350)
Browse files Browse the repository at this point in the history
* started

* done

* Update examples/user_guide/Server_Deployment.ipynb

* Added azure deployment image

Co-authored-by: Marc Skov Madsen <MASMA@orsted.dk>
Co-authored-by: Philipp Rudiger <prudiger@anaconda.com>
  • Loading branch information
3 people committed May 24, 2020
1 parent 5b7a04d commit 962aa84
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
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.

0 comments on commit 962aa84

Please sign in to comment.