Skip to content

Commit

Permalink
Migrate documentation to mkdocs-material #990 (#1010)
Browse files Browse the repository at this point in the history
* Migrate to mkdocs-material #990

* Add /home/gitpod/.local/bin to PATH

* Add Iot Hub Portal logo #990

Co-authored-by: Kevin BEAUGRAND <9513635+kbeaugrand@users.noreply.github.com>
  • Loading branch information
hocinehacherouf and kbeaugrand authored Aug 3, 2022
1 parent e513efe commit bef66c1
Show file tree
Hide file tree
Showing 38 changed files with 242 additions and 9,732 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enforce Unix newlines
* text=auto eol=lf
15 changes: 15 additions & 0 deletions .github/workflows/publish-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Publish Documentation
on:
push:
branches: [ docs/main ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install -r requirements.txt
- run: mkdocs gh-deploy --force
17 changes: 3 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,6 @@ paket-files/
__pycache__/
*.pyc

# App.css generated each time
app.css
src/.env
/src/AzureIoTHub.Portal/Client/Properties/launchSettings.json

# Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
# Ignore folders generated by Bundler
.bundle/
vendor/
Gemfile.lock
# MkDocs
/src
/site
12 changes: 8 additions & 4 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
image: python:latest

tasks:
- name: Jekyll
init: bundle install
command: bundle exec jekyll serve
- name: mkdocs-material
init: pip install -r requirements.txt
command: |
export PATH="$PATH:/home/gitpod/.local/bin"
mkdocs serve
ports:
- port: 4000
- port: 8000
onOpen: open-preview
5 changes: 0 additions & 5 deletions Gemfile

This file was deleted.

68 changes: 13 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,21 @@
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/CGI-FR/IoT-Hub-Portal/tree/docs/main)

# IoT Hub Portal

This project aims to provide a solution for handling IoT Devices easily.
It relies on Azure IoT Hub for connectivity and device management.

## Prerequisites

The following should be completed before proceeding with the IoT Hub Portal development or deployment in your environment.

* You must have an Azure subscription. Get an [Azure Free account](https://azure.microsoft.com/en-us/offers/ms-azr-0044p/) to get started.
* You must have an Identity Provider supporting OpenId protocol.
> If you don't have existing Identity Provider, you can follow our dedicated page to setup an Azure AD B2C Tenant with its applications.
> See [Azure AD B2C applications configuration](./docs/b2c-applications.md) page.
* Understand how IoTEdge LoraWAN StarterKit work. Have a look at [https://azure.github.io/iotedge-lorawan-starterkit](https://azure.github.io/iotedge-lorawan-starterkit) to get started.
# IoT Hub Portal Documentation

## Typical architecture deployment

![Architecture](./images/architecture.png)

## Step-By-Step instructions

#### Deployed Azure Resources

The template will deploy the following resources in your Azure subscription:

* IoT Hub
* Azure Function and Consumption Service Plan
* Redis Cache
* Application Insights
* Log Analytics (when opted in to use Azure Monitor)
* Azure WebApp and Service Plan
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/CGI-FR/IoT-Hub-Portal/tree/docs/main)

#### Instructions
## Quick start

1. Choose a solution prefix for your deployment.
> The documentation of IoT Hub Portal is based on [https://squidfunk.github.io/mkdocs-material](mkdocs-material).
1. Use the [Portal AD applications configuration](https://cgi-fr.github.io/IoT-Hub-Portal/docs/b2c-applications.html) page to configure your AD B2C Tenant.
> You should save the following information:
> * OpenID authority: `<your-openid-authority>`
> * OpenID metadata URL: `<your-openid-provider-metadata-url>`
> * Client ID: `<your-client-id>`
> * API Client ID: `<your-client-id>`
## Configure dev environment

1. Press on the button below to start your Azure Deployment.
To install mkdocs-material and required dependencies, you have to run the following command at the root of the project:

[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FCGI-FR%2FIoT-Hub-Portal%2Fmain%2Ftemplates%2Fazuredeploy.json/uiFormDefinitionUri/https%3A%2F%2Fraw.githubusercontent.com%2FCGI-FR%2FIoT-Hub-Portal%2Fmain%2Ftemplates%2FazuredeployUI.json)
```console
pip install -r requirements.txt
```

2. You will get to a page asking you to fill the following fields:
* **Resource Group**: A logical "folder" where all the template resource would be put into, just choose a meaningful name.
* **Location**: In which data center the resources should be deployed. Make sure to choose a location where IoT Hub is available.
* **Unique Solution Prefix**: A string that would be used as prefix for all the resources name to ensure their uniqueness.
* **Open Id Authority**: The OpenID authority used by the portal.
* **OpenId Metadata URL**: The OpenID metadata URL used by the portal.
* **Client Id**: the ID of the web client that will be used to authenticate the portal.
* **Api Client Id**: the ID of the API client that will be used to authenticate the portal.
* **Edge gateway name**: the name of your LoRa Gateway node in the IoT Hub.
* **Deploy Device**: Do you want demo end devices to be already provisioned (one using OTAA and one using ABP)? If yes set this to true, the code located in the Arduino folder would be ready to use immediately.
* **Reset pin**: The reset pin of your gateway (the value should be 7 for the Seed Studio LoRaWan, 25 for the IC880A)
* **Region**: In what region are you operating your device (currently only EU868 and US915 is supported)
After the installation python dependencies, your can start a local review of documentation site by the following command at the root of the project:

> see: [https://azure.github.io/iotedge-lorawan-starterkit/dev/quickstart/#deployed-azure-infrastructure](https://azure.github.io/iotedge-lorawan-starterkit/dev/quickstart/#deployed-azure-infrastructure) for more information about the LoRaWan IoT Hub and Azure deployment.
```console
mkdocs serve
```
3 changes: 0 additions & 3 deletions _config.yml

This file was deleted.

71 changes: 0 additions & 71 deletions _layouts/default.html

This file was deleted.

14 changes: 0 additions & 14 deletions about.md

This file was deleted.

85 changes: 0 additions & 85 deletions assets/css/style.scss

This file was deleted.

3 changes: 3 additions & 0 deletions docs/about/credits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Credits

* [Azure IoT Edge LoRaWAN Starter Kit](https://github.com/Azure/iotedge-lorawan-starterkit)
3 changes: 3 additions & 0 deletions docs/about/issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Known Issues and Limitations

Refer to [Known Issues](https://github.com/CGI-FR/IoT-Hub-Portal/issues) for known issues, gotchas and limitations.
2 changes: 1 addition & 1 deletion LICENSE → docs/about/license.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MIT License
# MIT License

Copyright (c) 2021 CGI France

Expand Down
4 changes: 4 additions & 0 deletions docs/about/support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Support

This is an open source solution.
For bugs and issues with the codebase please log an issue in this repo.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/assets/images/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bef66c1

Please sign in to comment.