Giter VIP home page Giter VIP logo

smart-product-solution-tools's Introduction

Smart Product Solution Tools

These tools provide a stream-lined way to get started with the Smart Product Solution reference architecture from AWS Labs.

For more information and a detailed deployment guide visit the Smart Product solution at https://aws.amazon.com/answers/iot/smart-product-solution/.

In the Deployment section, complete Step 1. Launch the stack, then continue from this guide.

Prerequisites

Configuring the Tools

Update the req_distinguished_name section in the CA.cnf with relevant information for your self-signed CA.

[ req_distinguished_name ]
# Leave as long names as it helps documentation

countryName=		    US
stateOrProvinceName=	Kentucky
localityName=		    My Town
organizationName=	    Some Organisation
organizationalUnitName=	Some Department
commonName=	            www.example.com
emailAddress=		    [email protected]

Repeat this for the template at templates/privateKeyVerification.csr.template

IMPORTANT Do not change the commonName value in the template

countryName=		    US
stateOrProvinceName=	Kentucky
localityName=		    My Town
organizationName=	    Some Organisation
organizationalUnitName=	Some Department
commonName=	            {{REG_CODE}}
emailAddress=		    [email protected]

Step 2. Demo the Solution

Use this procedure to demonstrate the solution’s capabilities using a sample smart product.

Create a User Account and Log in to the Web Console

  1. In the AWS CloudFormation console stack Outputs tab, select the URL value of the Smart Product Owner Web App key.
  2. In the web console, select Create Account.
  3. In the Create Account window, enter the applicable information.
  4. Select Create Account.
  5. A verification email will be sent to the specified email address.
  6. Select the link in the verification email to verify your account.
  7. Enter your username and password to log in to the web console.

Create and Configure a root CA certificate

From a bash prompt, run the following command

./scripts/createConfigureRootCACert.sh

Create and Configure a Device Certificate

From a bash prompt, run the following commands to prepare the application

cd provision && npm install

After the install, or on subsequent executions, run the following command

cd provision && node .

You should see output similar to the following

$ cd provision && node .
✔ Generate a UUID for the serial number
✔ Create a device directory
✔ Create a certificate signing request
✔ Create a device certificate file
✔ Create a copy of the device information on disk
✔ Update db with serial number, model number and device detail.

Device Information
=========================================================================================================
Serial Number: 048ede4d-79e1-4b0e-8e24-995b6f7cec26
Model Number: test-model
=========================================================================================================
Cert package for the device
/provision/devices/048ede4d-79e1-4b0e-8e24-995b6f7cec26/certs.tar.gz
✔ Create .env for the simulator

The Device information is used in the Just-in-time registration process.

Running the simulator

The cert package is used in the simulator. Unzip the files in the simulator folder. This places a .env file, and a certs folder with necessary certificates.

The first time you run the simulator, you must install the necessary node packages

cd simulator && npm install && cd ..

From that point forward, you can run the simulator with the following command

cd simulator && npm start

Register the Simulated Smart Product

After you provision your simulated device and run the simulator, you must complete the registration using the web console.

In the web console, select Register a device.

Enter the serial number and model number that was output by the provision script. Provide a name of your choosing.

Select Register.

When your instance or device successfully connects to AWS IoT, you will start to see simulated logs. You can modify the config.js file to change your demo simulator configuration. For example, you can modify the interval at which simulated data is sent.

smart-product-solution-tools's People

Contributors

billkidwell avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.