npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

iotsuite-cli

v1.0.1-preview

Published

Command Line Interface for deploying pre-configured IoT solutions through Azure

Downloads

187

Readme

Build Issues Gitter

Azure IoT PCS CLI Overview

Command Line Interface for deploying an IoT pre-configured solution into a user's subscription.

This CLI has the ability to deploy two configurations of PCS solutions:

  1. Basic - deploys all resources to a single VM.
  2. Enterprise - deploys resources using Azure Container Service and Kubernetes across multiple VMs.

Dependencies

The command line interface depends on:

  • nodejs used as the runtime for the CLI. Please install node before attempting a deployment.

Basic

The purpose of the basic deployment is to demo the capabilities of the system and requires minimal setup, deploying all resources to a single VM.

Basic deployment provisions following resources:

  1. Azure IoT Hub
  2. Azure Cosmos DB
  3. Azure Storage
  4. Single instance of Azure Virtual Machine with Docker Extension

At the end of deployment, Remote Monitoring WebApp and all the microservices are ready for demo pursposes.

Enterprise

The Enterprise deployment offers a production ready deployment that can be scaled up or down as needed. It uses Azure Container Service and Kubernetes for orchestration. It would be nice to have installed kubectl for running commands on kubernetes in addition to pcs.

Enterprise deployment provisions following resources:

  1. Azure IoT Hub
  2. Azure Cosmos DB
  3. Azure Container Service which also provisions following:
    1. Azure Storage
    2. Three instances of Azure Virtual Machine with Docker

How to use the CLI

Install CLI

npm install iotsuite-cli -g

Basic Deployment

Deploy Azure Resources

  1. If you haven't logged in with your Azure account from the command prompt run pcs login.
  2. Run either pcs or pcs -t remotemonitoring -s basic. These are equivalent in that they will both deploy a basic deployment (i.e. a deployment to a single VM).
  3. Follow the on-screen prompts
  4. The results of the deployment will be saved to a file named output.json

Verify the Web UI and Microservices are deployed

Click on the link that is shown in the output window, it will take you to the Remote Monitoring WebApp

Enterprise Deployment

Deploy Azure Resources

  1. pcs -t remotemonitoring -s standard
  2. Follow the on-screen prompts
  3. The results of the deployment will be saved to a file named {deployment-name}-output.json

Sample output format:

"resourceGroup" : {
    "type": "string",
    "value": "{myResourceGroupName}"
},
"iotHubHostName": {
    "type": "string",
    "value": "{myIoTHubHostName}"
},
"iotHubConnectionString": {
    "type": "string",
    "value": "{HostName={hubname}.azure-devices.net;
    SharedAccessKeyName={policy type};SharedAccessKey={Access Key};}"
},
"documentDBConnectionString" : {
    "type": "string",
    "value": "{AccountEndpoint={URI};AccountKey={Key};}"
}

Verify the Web UI and Microservices are deployed

  1. Click on the link that is shown in the output window, it will take you to the Remote Monitoring WebApp
  2. It can take upto 5 minutes for the webapp to be ready
  3. Go to {azurewebitesurl}/hubmanager/v1/status to see HubManager microservice status
  4. Go to {azurewebitesurl}/devices/v1/status to see Devices microservice status

Configuration

Kubernetes Dashboard

To view Kubernetes dashboard, run the following command, which will start a local web proxy for your cluster (it will start a local server at http://127.0.0.1:8001/ui):

kubectl proxy

CLI Options

To get help run pcs -h or --help
To get the version run pcs -v or --version

Feedback

Please enter issues, bugs, or suggestions as GitHub Issues here: https://github.com/Azure/pcs-cli/issues.

Related