Skip to content

Commit da16b7e

Browse files
committed
Rectify instruction writing style
1 parent bc32eab commit da16b7e

File tree

3 files changed

+70
-46
lines changed

3 files changed

+70
-46
lines changed

README.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -505,19 +505,21 @@ The following creates a job that specifies a Linux Kernel link for downloading.
505505
--targets arn:aws:iot:us-west-2:<account-id>:thing/<thing-name> \
506506
--document '{"url":"https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.5.tar.xz"}'
507507
```
508-
3. After this we need to run the demo using the command:
508+
3. Execute the following command:
509509
```
510510
/build/bin/jobs_demo_mosquitto
511511
```
512-
the above command will give all he instructions on how to run the demo. It will ask you to run the following command to run the demo:
512+
This command will provide detailed instructions for running the demo.
513513

514-
```
514+
4. When prompted, run the demo using this command:
515+
```
515516
./build/bin/jobs_demo_mosquitto \
516517
-n <thing-name> \
517518
-h <aws-iot endpoint> \
518519
--certfile <device certificate of the thing> \
519520
--keyfile <private key of the thing>
520-
```
521+
```
522+
Note: Replace the placeholders in angle brackets with your specific information.
521523

522524

523525
#### Setup for the Greengrass local auth demo
@@ -643,7 +645,7 @@ Any version after 1.6.14 will drop privileges as soon as the configuration file
643645
openssl req -x509 -nodes -sha256 -days 365 -newkey rsa:2048 -keyout ca.key -out ca.crt
644646
```
645647
646-
When asked for the Common Name (CN) after running the following command enter the same value as was added for the macro `BROKER_ENDPOINT` in the demo_config.h file, which in our case is just `localhost`
648+
You will be prompted to configure the Common Name (CN) after running the following command. It's crucial to enter the same value that was specified for the `BROKER_ENDPOINT` macro in the demo_config.h file. In this particular instance, the correct value to enter is simply "localhost".
647649
```sh
648650
# Generate server key and certificate.# Provide the Subject field information as appropriate for Server certificate. Make sure the Common Name (CN) field is different from the root CA certificate.
649651
openssl req -nodes -sha256 -new -keyout server.key -out server.csr # Sign with the CA cert.
@@ -683,18 +685,30 @@ Run httpbin through port 80:
683685
docker pull kennethreitz/httpbin
684686
docker run -p 80:80 kennethreitz/httpbin
685687
```
688+
The `kennetheitz/httpbin` docker image is not compatible with linux/arm64 platform that is used by Mac machines. Hence instead of that use `mccutchen/go-httpbin`.
689+
```sh
690+
#To install the image run:
691+
692+
$ docker pull mccutchen/go-httpbin
693+
694+
#To run the server on local host on port 80 run
695+
696+
$ docker run -p 80:8080 mccutchen/go-httpbin
697+
```
698+
686699

687700
`SERVER_HOST` defined in `demos/http/http_demo_plaintext/demo_config.h` can now be set to `localhost`.
688701

689702
To run `http_demo_basic_tls`, you could use either [Tunnelmole](https://github.com/robbie-cahill/tunnelmole-client), an open source tunneling tool, or [ngrok](https://ngrok.com/download), a popular closed source tunneling tool, to create an HTTPS tunnel to the httpbin server currently hosted on port 80:
690703

691704
**Using Tunnelmole**
705+
692706
First, install Tunnelmole. On Linux, Mac and Windows Subsystem for Linux, use
693707

694708
```sh
695709
curl -O https://tunnelmole.com/sh/install.sh && sudo bash install.sh
696710
```
697-
711+
The above may not function correctly on ARM machines like mac. As an alternative, you can clone the repository and build the application from its source code.
698712
For Windows without WSL, [download tmole.exe](https://tunnelmole.com/downloads/tmole.exe) and add it to your [PATH](https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows).
699713

700714
Then run `tmole 80`
@@ -717,7 +731,17 @@ Set `SERVER_HOST` in `demos/http/http_demo_basic_tls/demo_config.h` to the https
717731

718732
Set `SERVER_HOST` in `demos/http/http_demo_basic_tls/demo_config.h` to the https link provided by ngrok, without `https://` preceding it.
719733

720-
You must also download the Root CA certificate provided by the ngrok https link and set `ROOT_CA_CERT_PATH` in `demos/http/http_demo_basic_tls/demo_config.h` to the file path of the downloaded certificate.
734+
**Getting the Root CA**
735+
736+
Download the Root CA certificate from the obtained https link. To obtain this:
737+
738+
1. Open the https link in your browser.
739+
2. Click on the https lock button in the url bar.
740+
3. Download the chain of certificates.
741+
4. Locate the last certificate in the chain - this is your required Root CA certificate.
742+
5. Copy this certificate and paste it into a new .pem file.
743+
744+
Set the macro ROOT_CA_CERT_PATH in demo_config.h to the file path of your newly created Root CA certificate.
721745

722746
## Generating Documentation
723747
Note: For pre-generated documentation, please visit [Releases and Documentation](#releases-and-documentation) section.

demos/fleet_provisioning/readme.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
## Setup for Fleet Provisioning Demos
22

3-
### Creating the Provisioning Policy
4-
5-
1. Login to your AWS account and open AWS IoT Core. On the side bar click on security > policies > create policy
6-
2. Set a relevant policy name
7-
3. Copy the contents in the demos/fleet_provisioning/fleet_provisioning_with_csr(or fleet_provisioning_keys_cert_demo)/example_claim_policy.json and paste it in the policy document on the AWS console.
8-
4. Create the policy
9-
10-
11-
### Creating the Claim Certificate
12-
13-
1. On the side bar of the AWS IoT Core click on security > certificates > add certificate. Make the “Certificate Status” active and download the certificate files from the prompt given.
14-
2. Set the value of the macro CLAIM_CERT_PATH in the democonfig.h file to the path of the certificate downloaded and set the value of the macro CLAIM_PRIVATE_KEY_PATH in the democonfig.h file to the path of the private key downloaded. Alternatively you can set the values of these through command line parameters.
15-
3. Now click on the certificate > attach policies > select your provisioning policy made in the previous section and select attach policy.
16-
17-
18-
### Creating the IAM role for AWS IoT to create resources
19-
20-
1. Go to the IAM Identity center and create a new IAM role
21-
2. Select AWS IoT when asked to select a service
22-
23-
24-
### Creating Fleet Provisioning Template
25-
26-
1. Go to AWS IoT Core > Connect many devices > Connect many devices > create provisioning template.
27-
2. Select Provisioning devices with claim certificates > next
28-
3. Set the status to active
29-
4. Enter template name
30-
5. Enter the IAM role you created in the previous section or you can create a new one if you have not yet created it
31-
6. Enter the provisioning policy that you made in the very first section or create a new one if you havn’t already
32-
7. We do not need to do any pre-provisioning stuff hence we will select “Don’t use a pre-provisioning action”
33-
8. Turn the automatic thing creation option on and click next
34-
9. Select a policy that you wish your device should have when it is running (Permissions to connet to IoT, subscribe to some topic, publish to some topic extra) or make a new one if you do not have one already.
35-
10. Click next, review and create.
36-
37-
### Configuring the demo
38-
Set all the necessary macro values in the demo_config.h file or alternatively you can set the values of these through command line parameters.
39-
3+
### Create the Provisioning Policy
4+
5+
1. Log in to your AWS account and open AWS IoT Core.
6+
2. Navigate to Security > Policies > Create policy.
7+
3. Enter a relevant policy name.
8+
4. Copy the contents from demos/fleet_provisioning/fleet_provisioning_with_csr (or fleet_provisioning_keys_cert_demo)/example_claim_policy.json.
9+
5. Paste the copied content into the policy document on the AWS console.
10+
6. Click "Create policy".
11+
12+
### Create the Claim Certificate
13+
1. In AWS IoT Core, go to Security > Certificates > Add certificate.
14+
2. Set the "Certificate Status" to active.
15+
3. Download the certificate files from the provided prompt.
16+
4. Update the demo_config.h file:
17+
- Set CLAIM_CERT_PATH to the path of the downloaded certificate.
18+
- Set CLAIM_PRIVATE_KEY_PATH to the path of the downloaded private key. Note: You can also set these values using command line parameters.
19+
5. Select the certificate, click "Attach policies", choose your provisioning policy, and click "Attach policy".
20+
21+
### Create the IAM Role for AWS IoT
22+
1. Go to the IAM Identity Center.
23+
2. Create a new IAM role.
24+
3. When prompted, select AWS IoT as the service.
25+
26+
### Create Fleet Provisioning Template
27+
1. Navigate to AWS IoT Core > Connect many devices > Connect many devices > Create provisioning template.
28+
2. Choose "Provisioning devices with claim certificates" and click "Next".
29+
3. Set the status to active.
30+
4. Enter a template name.
31+
5. Select the IAM role you created earlier (or create a new one if needed).
32+
6. Choose the provisioning policy you created earlier (or create a new one if needed).
33+
7. Select "Don't use a pre-provisioning action".
34+
8. Enable the automatic thing creation option and click "Next".
35+
9. Select or create a policy for your device's permissions (e.g., connecting to IoT, subscribing/publishing to topics).
36+
10. Click "Next", review the settings, and create the template.
37+
38+
### Configure the Demo
39+
Set all necessary macro values in the demo_config.h file. Alternatively, you can provide these values through command line parameters.

demos/greengrass/greengrass_demo_local_auth/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ openssl x509 -req \
9393

9494
8. Create a new thing and link it with this new certificate thing_cert.pem and set the value of the macro `THING_NAME` in demo_config.h file to the name of this new thing
9595

96-
9. Set the value of the macro `CLIENT_CERT_PATH` to the path of thing_cert.pem and the value of the macro `CLIENT_PRIVATE_KEY_PATH` thing_private.key
96+
9. Set the value of the macro `CLIENT_CERT_PATH` to the path of thing_cert.pem and the value of the macro `CLIENT_PRIVATE_KEY_PATH` to the path of thing_private.key
9797

9898
### Configuring the GG core for local auth and MQTT
9999

@@ -105,7 +105,7 @@ Deploy the following components to your Greengrass core:
105105

106106
Set the configuration for the aws.greengrass.clientdevices.Auth component based
107107
off the [provided config](./greengrass_auth_conf.json). Ensure the certificate
108-
paths match the files created for your custom CA above and their absolute paths are written after `file://`
108+
paths match the files created for your custom CA above and their absolute paths are written after `file://`.
109109

110110
This config will allow associated Things to publish and subscribe to any topic
111111
on the Greengrass core broker.

0 commit comments

Comments
 (0)