Skip to main content

Posts

Showing posts from September, 2019

Resizing AWS ESB

11lsblk 12df -H 13lsblk 14sudo growpart /dev/xvda 0 15sudo resize2fs /dev/xvda1 16lsblk 17 sudo growpart /dev/xvda 2 18lsblk 19df -H 24lsblk 25xfs_growfs /dev/xvda2

https://hackernoon.com/tutorial-how-to-extend-aws-ebs-volumes-with-no-downtime-ec7d9e82426e

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html


growpart /dev/xvda 2 CHANGED: partition=2 start=4096 old: size=20967391 end=20971487 new: size=2097147870 end=2097151966
lsblk NAMEMAJ:MIN RMSIZE RO TYPE MOUNTPOINT xvda202:00 1000G0 disk ├─xvda1 202:101M0 part └─xvda2 202:20 1000G0 part /
df -H FilesystemSizeUsed Avail Use% Mounted on devtmpfs 34G 0 34G 0% /dev tmpfs34G 0 34G 0% /dev/shm tmpfs34G 27M 34G 1% /run tmpfs34G 0 34G 0% /sys/fs/cgroup /dev/xvda2 11G2.3G8.5G22% / tmpfs 6.8G 06.8G 0% /run/user/1000 tmpfs 6.8G 06.8G 0% /run/user/0
xfs_growfs /dev/xvda2 meta-data=/dev/xvda2 isize=512agcount=7, agsize=393216 blks = sectsz=512 attr=2, projid32bit=1 = crc=1finobt=0 spinodes=0 data = bsize=4096 blocks=2620923, imaxpct=25 = su…

Powering Edge AI for Sensor Reading with RPI and Breakout Garden (EFM, NiFi, MiNiFi Agents)

Powering Edge AI for Sensor Reading with RPI and Breakout Garden (EFM, NiFi, MiNiFi Agents)





Hardware Component List:

Raspberry Pi 3B+BMP-280 Temperature, Pressure and AltitudeST7735 0.96 SPI Colour LCD 160x80MAX-30105 Oximeter and Smoke SensorSony Playstation 3 EYE USB Web Camera
Software Component List:RaspianPython 3.5JDK 8 Java (Soon Upgrading to JDK 11)Apache NiFi 1.9.2MiniFi Java Agent 0.6.0Cloudera Edge Flow ManagerApache Kafka 2.2Summary
Potential Use Cases:   Tracking Environment in a facility that includes webcam detection, temperature, pressure and smoke.

Our Raspberry Pi 3B+ has a Breakout Garden Hat with 2 sensors and one small display. The display is showing the capture image and is constantly updating.  We currently run via nohup, but when we go into constant use I will switch to a Linux Service to run on startup. The Python script initializes the connections to all of the sensors and then goes into an infinite loop of reading those values and building a JSON packet that we s…

OpenSSL / SSL Hosting in NiFi

1. Host a Web Page (index.html) via HTTP GET with 200 OK Status
2. Receive POST from that page via AJAX with browser data
3. Extract Content and Attributes
4. Build a JSON file of HTTP data
5. Store it

To accept location in a phone or modern browser you must be running SSL.
So I added that for this HTTP Request.

Use openssl to create your 2048 RSA X509, PKCS12, JKS Keystore, Import Trust Store and import in browser




Your web page can be any web page, just POST back via AJAX or Form Submit.


<html> <head> <title>NiFi Browser Data Acquisition</title> <body> <script> // Usage window.onload = function() { navigator.getBattery().then(function(battery) { console.log(battery.level); battery.addEventListener('levelchange', function() { console.log(this.level); }); }); }; ////////////// print these var latitude = ""; var longitude = ""; var ips = ""; var batteryInfo = ""; var sc…

Backup and Restore NiFi Registry Templates

Backup and Restore NiFi Registry Templates

Example Backed Up NiFi Flow Excerpt {
  "bucket" : {
    "createdTimestamp" : 1566430253392,
    "identifier" : "aaa50be8-b994-46b5-a0bb-be245c34b928",
    "link" : {
      "href" : "buckets/aaa50be8-b994-46b5-a0bb-be245c34b928",
      "params" : {
        "rel" : "self"
      }
    },
    "name" : "IoT",
    "permissions" : {
      "canDelete" : true,
      "canRead" : true,
      "canWrite" : true
    }
  },
  "flow" : {
    "bucketIdentifier" : "aaa50be8-b994-46b5-a0bb-be245c34b928",
    "bucketName" : "IoT",
    "createdTimestamp" : 1566430269976,
    "description" : "Created by MiNiFi C2 Flow Designer",
    "identifier" : "56902ff0-62ac-4189-9684-765247c885b5",
    "link"…