Skip to content

Instantly share code, notes, and snippets.

@danielscholl
Last active May 2, 2019 01:38
Show Gist options
  • Save danielscholl/73a9d20d63aed225ee813cdba70af0a0 to your computer and use it in GitHub Desktop.
Save danielscholl/73a9d20d63aed225ee813cdba70af0a0 to your computer and use it in GitHub Desktop.

Demo (Prepare)

Introduce CloudShell

Install DirEnv in CloudShell

git clone https://github.com/direnv/direnv.git
cd direnv
make
make install DESTDIR=~/.local
cd ..

## MODIFY .bashrc ##
code .bashrc
export PATH="$PATH:$HOME/.local/bin"  
eval "$(direnv hook bash)"

source .bashrc

Clone Repositories

git clone https://github.com/danielscholl/iot-resources.git
git clone https://github.com/danielscholl/iot-consumer-net.git
git clone https://github.com/danielscholl/iot-device-edge.git

Demo (Concept)

architecture

Demo (Hub)

Provision IoT Resources

cd iot-resources
./provision.sh iot
  1. Analyze Resource Group
  2. Enable IoT Security Preview

Build PKI and Create Certificates

cd iot-resources
./init-ca.sh
  1. Analyze Key Vault
  2. Analyze Hub Certificate Authority

Deploy 10 Sample Devices

cd iot-resources

COUNT=1
until [ $COUNT -gt 10 ]; do
./device-cert.sh device device$COUNT deploy
let COUNT+=1
done
  1. Analyze D2C Messages
  2. Analyze C2D Messages
  3. Analyze DM Messages

Demo (EPH)

cd iot-consumer-net
GROUP=iot-resources npm run aci
  1. Analyze EPH
  2. Deploy Additional Consumers

Demo (Edge)

Create Certificates

cd iot-resources
./device-cert.sh edge edge

Provision Edge Resources

cd iot-device-edge

## SETUP .envrc ##

DEVICE="edge" ./provision.sh

## AFTER reboot ##
ssh <ip> 
./init.sh
  1. Setup DNS CName

Setup Edge Module Routes

cd iot-device-edge
./deploy.sh

Deploy Sample Device

cd iot-resources

COUNT=1
until [ $COUNT -gt 5 ]; do
EDGE_GATEWAY=edge.danielscholl.info ./device-cert.sh leaf leaf$COUNT deploy
let COUNT+=1
done

Demo (DPS)

Deploy Sample Device

cd iot-resources
./device-cert.sh device aci-device2 deploy
  1. Analyze DPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment