This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LICENCE=$(echo $1 | base64 -d) | |
| LOCAL_PORT=${2:-5705} | |
| USERNAME=${3:-'storageos'} | |
| PASSWORD=${4:-'storageos'} | |
| REMOTE_PORT=5705 | |
| # forwards remote api port to localhost | |
| echo "Creating port forward to ondat's cluster api" | |
| kubectl port-forward \ | |
| -n storageos svc/storageos \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| process.env.GOOGLE_APPLICATION_CREDENTIALS = 'gCloudAuth.json'; | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const jwt = require('jsonwebtoken'); | |
| const mqtt = require('mqtt'); | |
| const { PubSub } = require('@google-cloud/pubsub'); | |
| const pubSubClient = new PubSub(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const iot = require('@google-cloud/iot'); | |
| const { KeyManagementServiceClient } = require('@google-cloud/kms'); | |
| const uuid = require('uuid'); | |
| const { readFileSync } = require('fs'); | |
| const crypto = require('crypto'); | |
| const iotClient = new iot.v1.DeviceManagerClient(); | |
| const kmsClient = new KeyManagementServiceClient(); | |
| const deviceId = 'clusterId-05e7d73f-fbc2-43c4-aa07-8eaf84a6f417'; |