This repo is heavily inspired by @alexellis's cloud-provision-example as it's an implementation version of it https://github.com/inlets/cloud-provision-example
Localhost > inlets proxy > exit node ( cloud )
RPI > inlets proxy > exit node ( cloud )
Localhost -> Edge gateway : rpi + inlets proxy > Cloud : inlets exit node ( vm )
Create a service principal by running
az ad sp create-for-rbac -n "<yourAppName>"
Then set the following environment variables. See .env.tpl to see and set needed environment variables.
export AZURE_SUBSCRIPTION_ID=
export AZURE_TENANT_ID=
export AZURE_CLIENT_ID=
export AZURE_CLIENT_SECRET=
dep ensure
go run main.go --userdata-file cloud-config.txt
A terraform implementation here
- Azure provisioner initialization
- Provision exit node
- Delete exit node
- List exit nodes
- Authentification enhancements ( Environment variables instead of File-based )
- Handle different scenarios : existing resource group, existing vnet ...
- Upgrade to go modules ( Azure recommend dep )