Kcr19 / mender_gcp_ota_demo

Demo scripts for a GCP+Mender demo.
Apache License 2.0
0 stars 1 forks source link

device ID should not be hardcoded #15

Open ptone opened 5 years ago

ptone commented 5 years ago

https://github.com/Kcr19/mender_gcp_ota_demo/blob/mender-gcp/image/meta-gcp-iot/recipes-gcp/gcp-config/files/gcp-config.sh

has a device_id - but this should come from:

/usr/share/mender/identity/mender-device-identity

wherever it is needed

Kcr19 commented 5 years ago

Updated the "gcp-config.sh" with "device_id" commented out but might need more testing and potentially changes to this bitbake layer - https://github.com/Kcr19/mender_gcp_ota_demo/blob/mender-gcp/image/meta-gcp-iot/recipes-gcp/gcp-config/gcp-config_1.0.bb.

Kcr19 commented 5 years ago

@drewmoseley can you please look into this as the device_id needs to come from /usr/share/mender/identity/mender-device-identity. I beleive the gcp-config_1.0.bb needs to be updated

drewmoseley commented 5 years ago

@Kcr19 @ptone what specifically should this look like? Mender uses a hash of the output of that script and I'm unclear if we want to use it directly. The output of the current version of this script will look something like: google_iot_id=g-2560cc6f602a42b3b5b1895bda0a1463

drewmoseley commented 5 years ago

I think this should be what we need: https://github.com/Kcr19/mender_gcp_ota_demo/pull/25 Please take a look. I have not tested yet but wanted to see if this was the right direction.

drewmoseley commented 5 years ago

@ptone is there anything more that needs to be done here? #25 has been merge so this may be complete.