edgescale solution on qoriq layerscape platform

14
EdgeScale Solution on QorIQ Layerscape Platform EdgeScale solution provides a secure mechanism for developers to leverage cloud- computing frameworks for their applications, it helps users easily connect IoT things, manage devices and deploy container based applications. Please refer to the following Layerscape products in the cloud computing system. The user could access cloud service from https://portal.edgescale.org. EdgeScale client is a set of software agents running on device side which connects to the cloud services. This document introduces EdgeScale supported major features as registering user account, secure device enrolment, provisioning/connecting the EdgeSacle end devices, generate EdgeScale client images in LSDK, OTA firmware update (LS1043 or LS1046), running EdgeScale demo applications and dynamic deployment of container-based applications. 1. Registering a User Account The user could register a user account from the EdgeScale cloud server from https://portal.edgescale.org/#/register .

Upload: others

Post on 27-Nov-2021

28 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EdgeScale Solution on QorIQ Layerscape Platform

EdgeScale Solution on QorIQ Layerscape Platform

EdgeScale solution provides a secure mechanism for developers to leverage cloud-

computing frameworks for their applications, it helps users easily connect IoT things, manage

devices and deploy container based applications. Please refer to the following Layerscape

products in the cloud computing system. The user could access cloud service from

https://portal.edgescale.org. EdgeScale client is a set of software agents running on device

side which connects to the cloud services.

This document introduces EdgeScale supported major features as registering user account,

secure device enrolment, provisioning/connecting the EdgeSacle end devices, generate

EdgeScale client images in LSDK, OTA firmware update (LS1043 or LS1046), running

EdgeScale demo applications and dynamic deployment of container-based applications.

1. Registering a User Account

The user could register a user account from the EdgeScale cloud server from

https://portal.edgescale.org/#/register.

Page 2: EdgeScale Solution on QorIQ Layerscape Platform

2. Secure Device Enrolment

Generate a EdgeScale device to generate unique device ID, bind device model and create a

certificate and enrollment script from https://portal.edgescale.org/#/device/.

Fill in the form with SN number (dn-ls1046a-100001) and device model info (yun--gateway--

ls1046a--nxp).

3. Provisioning/Connecting the EdgeSacle end Devices

This section uses LS1046ARDB as example to describe the procedure to connect and setup

the EdgeScale end devices.

Create device at the portal and download the enrollment script which contains certificates. For

example: bootstrap-enroll-174479f41fc95b1bac6b4b09f12a165f.yun.gateway.ls1046a.nxp.sh.

Connect SD card to a Linux PC by SD-USB adapter.

sudo fdisk -l to find the /dev/sdx for the SD card, like /dev/sdg

sudo umount /dev/sdg, if auto mounted

sudo bootstrap-enroll-174479f41fc95b1bac6b4b09f12a165f.yun.gateway.ls1046a.nxp.sh

/dev/sdg

Download the prebuilt bootstrap binary image(qspi_ls1046a.img)

https://s3-us-west-2.amazonaws.com/edgescale.org/release/ls1046ardb/qspi_ls1046a.img.

Insert SD to ls1046a board, power on to u-boot cmdline and program the qspi image to ls1046a

with below instructions:

#tftp 0xa0000000 /tftpboot/qspi_ls1046a.img

#sf probe 0:0

#sf erase 0 +$filesize

#sf write 0xa0000000 0 $filesize

#reset

Page 3: EdgeScale Solution on QorIQ Layerscape Platform

4. Generate EdgeScale Client Images in LSDK

Enable EdgeScale related packages in LSDK build configuration file

flexbuild/configs/build_lsdk.cfg.

CONFIG_BUILD_QORIQ_EDGESCALE_EDS=y

CONFIG_BUILD_QORIQ_EDS_KUBELET=y

CONFIG_BUILD_QORIQ_EDS_PUPPET=y

CONFIG_BUILD_QORIQ_EDS_BOOTSTRAP=y

EDGESCALE_EDS is a set of software agents running on device side which connects to cloud.

EDS_KUBELET is used for managing across multiple hosts, providing basic mechanisms for

deployment, maintenance, and scaling for applications.

EDS_PUPPET is used for software management and configuration.

EDS_BOOTSTRAP makes the end device usable after the device enrollment.

Customize Kernel configuration for EdgeSacle agents and rebuild Kernel image with Flexbuild

The Kernel configuration for Edgescale is saved in the file packages/apps/qoriq-edgescale-

eds/edgescale_demo_kernel.conf.

#usb video camera support

CONFIG_MEDIA_SUPPORT=y

CONFIG_MEDIA_CAMERA_SUPPORT=y

CONFIG_MEDIA_USB_SUPPORT=y

CONFIG_USB_VIDEO_CLASS=y

CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

#FTDI support

CONFIG_USB_DWC3_HOST=y

CONFIG_USB_SERIAL=y

CONFIG_USB_SERIAL_FTDI_SIO=y

#wireless card

CONFIG_CFG80211=m

CONFIG_CFG80211_DEFAULT_PS=y

CONFIG_CFG80211_CRDA_SUPPORT=y

CONFIG_MAC80211=m

CONFIG_MAC80211_HAS_RC=y

CONFIG_MAC80211_RC_MINSTREL=y

CONFIG_MAC80211_RC_MINSTREL_HT=y

CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y

CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"

CONFIG_MAC80211_LEDS=y

CONFIG_ATH_COMMON=m

CONFIG_ATH_CARDS=m

CONFIG_ATH9K_HW=m

CONFIG_ATH9K_COMMON=m

CONFIG_ATH9K_BTCOEX_SUPPORT=y

Page 4: EdgeScale Solution on QorIQ Layerscape Platform

CONFIG_ATH9K=m

CONFIG_ATH9K_PCI=y

CONFIG_ATH9K_RFKILL=y

CONFIG_ATH9K_PCOEM=y

CONFIG_RTL_CARDS=m

#sound for usb speaker

CONFIG_SOUND=y

CONFIG_SOUND_OSS_CORE=y

CONFIG_SOUND_OSS_CORE_PRECLAIM=y

CONFIG_SND=y

CONFIG_SND_TIMER=y

CONFIG_SND_PCM=y

CONFIG_SND_HWDEP=y

CONFIG_SND_RAWMIDI=y

CONFIG_SND_JACK=y

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=y

CONFIG_SND_PCM_OSS=y

CONFIG_SND_PCM_OSS_PLUGINS=y

CONFIG_SND_SUPPORT_OLD_API=y

CONFIG_SND_PCM_TIMER=y

CONFIG_SND_HDA_PREALLOC_SIZE=64

CONFIG_SND_SPI=y

CONFIG_SND_USB=y

CONFIG_SND_USB_AUDIO=y

#Enable Greengrass Core

CONFIG_POSIX_MQUEUE=y

CONFIG_OF_OVERLAY=y

CONFIG_OVERLAY_FS=y

CONFIG_HAVE_ARCH_SECCOMP_FILTER=y

CONFIG_SECCOMP_FILTER=y

CONFIG_SECCOMP=y

CONFIG_DEVPTS_MULTIPLE_INSTANCES=y

CONFIG_IPC_NS=y

CONFIG_NET_NS=y

CONFIG_UTS_NS=y

CONFIG_USER_NS=y

CONFIG_PID_NS=y

CONFIG_CGROUPS=y

CONFIG_MEMCG=y

Page 5: EdgeScale Solution on QorIQ Layerscape Platform

CONFIG_CGROUP_FREEZER=y

CONFIG_CGROUP_DEVICE=y

CONFIG_CGROUP_PIDS=y

Compile the custom Kernel for EdgeScale agents with Flexbuild as the following, <arch> can

be “arm32” or “arm64”.

$ cd <flexbuild_dir>

$ source setup.env

$ make distclean -C build/linux/kernel/<arch>/output/linux-4.x (optional)

$ cp packages/apps/qoriq-edgescale-eds/edgescale_demo_kernel.config

packages/linux/<kernel-repo>/arch/<arch>/configs

$ flex-builder -c linux -a <arch> -B fragment:edgescale_demo_kernel.conf

Compile EdgeScale related packages with Flexbuild

$ flex-builder -i mkrfs -a

$ flex-builder -c qoriq-edgescale-eds -a <arch>

$ flex-builder -c qoriq-eds-kubelet -a <arch>

$ flex-builder -c qoriq-eds-bootstrap -a <arch>

$ flex-builder -c qoriq-eds-puppet -a <arch>

Generate bootpartition and rootfs with Flexbuild.

$ flex-builder -i merge-component -a <arch>

$ flex-builder -i mkbootpartition -a <arch>

$ flex-builder -i compressrfs -a <arch>

5. OTA firmware update

This section introduces LS1043/LS1046 EdgeScale end device firmware updating through OTA

mode.

Download and deploy the bootstrap image on LS1046ARDB.

=> tftp a0000000 /tftpboot/v2.0-1803/edgescale-1803/1803_qspi_ls1046a.img

=> sf probe

=> sf erase 0 +$filesize

=> sf write a0000000 0 $filesize

=> reset

After booting up the target board, an images deployment script will be executed automatically

to format SD card, connect the cloud to download images and deploy them to SD card and

reboot the system, please refer to the following.

Initializing random number generator... [ 4.105917] random: dd urandom read with 11 bits

of entropy available

done.

Starting network: OK

ssh-keygen: generating new host keys: RSA [ 4.336603] scsi 1:0:0:0: Direct-Access

SanDisk Ultra USB 3.0 1.00 PQ: 0 ANSI: 6

[ 4.345157] sd 1:0:0:0: [sdb] 30031250 512-byte logical blocks: (15.4 GB/14.3 GiB)

[ 4.353999] sd 1:0:0:0: [sdb] Write Protect is off

[ 4.359096] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support

DPO or FUA

Page 6: EdgeScale Solution on QorIQ Layerscape Platform

[ 4.374750] sdb: sdb1 sdb2 sdb3

DSA [ 4.379248] sd 1:0:0:0: [sdb] Attached SCSI removable disk

ECDSA ED25519

Starting sshd: OK

no interfaces have a carrier

forked to background, child pid 2066

[ 5.096137] scsi 2:0:0:0: Direct-Access KINGSTON DataTraveler 3.0 1.01 PQ: 0 ANSI:

6

[ 5.104708] sd 2:0:0:0: [sdc] 30375936 512-byte logical blocks: (15.6 GB/14.5 GiB)

[ 5.112480] sd 2:0:0:0: [sdc] Write Protect is off

[ 5.117402] sd 2:0:0:0: [sdc] Write cache: disabled, read cache: enabled, supports DPO

and FUA

[ 5.127291] sdc: sdc1 sdc2 sdc3

[ 5.131367] sd 2:0:0:0: [sdc] Attached SCSI removable disk

network connect well

[ 31.286028] EXT2-fs (loop0): warning: mounting unchecked fs, running e2fsck is

recommended

edgescale cert expires: 361 days, skip certificate Enrollment

1+0 records in

1+0 records out

updateStatus=2

oldimageVersion=0

now will check the newest image and update it.

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

100 526 100 526 0 0 389 0 0:00:01 0:00:01 --:--:-- 445

0+1 records in

1+0 records out

instruction: pf

SD card: 15 GB

Partitioning /dev/mmcblk0 ...

Welcome to fdisk (util-linux 2.28.2).

Changes will r[ 32.749460] mmcblk0: p1 p2 p3

emain in memory only, until you decide to write them.

Be careful before using the write command.

Command (m for help): Created a new DOS disklabel with disk identifier 0xd1739ad2.

Command (m for help): Partition type

p primary (0 primary, 0 extended, 4 free)

e extended (container for logical partitions)

Select (default p): Partition number (1-4, default 1): First sector (2048-31116287, default 2048):

Last sector, +sectors or +size{K,M,G,T,P} (131072-31116287, default 31116287):

Page 7: EdgeScale Solution on QorIQ Layerscape Platform

Created a new partition 1 of type 'Linux' and of size 20 MiB.

Command (m for help): Selected partition 1

The bootable flag on partition 1 is enabled now.

Command (m for help):

Command (m for help): Partition type

p primary (1 primary, 0 extended, 3 free)

e extended (container for logical partitions)

Select (default p): Partition number (2-4, default 2): First sector (2048-31116287, default 2048):

Last sector, +sectors or +size{K,M,G,T,P} (172033-31116287, default 31116287):

Created a new partition 2 of type 'Linux' and of size 300 MiB.

Command (m for help): Partition type

p primary (2 primary, 0 extended, 2 free)

e extended (container for logical partitions)

Select (default p): Partition number (3,4, default 3): First sector (2048-31116287, default 2048):

Last sector, +sectors or +size{K,M,G,T,P} (786434-31116287, default 31116287):

Created a new partition 3 of type 'Linux' and of size 14.5 GiB.

Command (m for help): Partition number (1-3, default 3): Partition type (type L to list all types):

Changed type of partition 'Linux' to 'W95 FAT32'.

Command (m for help): The partition table has been altered.

Calling ioctl() to re-read partition table.

Syncing disks.

Formatting partitions ...

mkfs.fat 4.0 (2016-05-06)

mke2fs 1.43.3 (04-Sep-2016)

/dev/mmcblk0p2 contains a ext4 file system labelled 'boot'

last mounted on /boot on Wed Jul 12 03:26:04 2017

fs_types for mke2fs.conf resolution: 'ext4', 'small'

Discarding device blocks: done

Discard succeeded and will return 0s - skipping inode table wipe

Filesystem label=boot

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

76800 inodes, 76800 blocks

3840 blocks (5.00%) reserved for the super user

First data block=0

Page 8: EdgeScale Solution on QorIQ Layerscape Platform

Maximum filesystem blocks=79691776

3 block groups

32768 blocks per group, 32768 fragments per group

25600 inodes per group

Filesystem UUID: 2292cb5a-1add-4eb0-8904-3944f450a258

Superblock backups stored on blocks:

32768

Allocating group tables: done

Writing inode tables: done

Creating journal (4096 blocks): done

Writing superblocks and filesystem accounting information: done

mke2fs 1.43.3 (04-Sep-2016)

/dev/mmcblk0p3 contains a ext4 file system labelled 'rootfs'

last mounted on / on Wed Jul 12 03:26:01 2017

fs_types for mke2fs.conf resolution: 'ext4'

Discarding device blocks: [ 40.179189] random: nonblocking pool is initialized

done

Discard succeeded and will return 0s - skipping inode table wipe

Filesystem label=rootfs

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

948416 inodes, 3791231 blocks

189561 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=2151677952

116 block groups

32768 blocks per group, 32768 fragments per group

8176 inodes per group

Filesystem UUID: cd89821a-556c-4fee-bc0f-609496337720

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done

Writing inode tables: done

Creating journal (16384 blocks): done

Writing superblocks and filesystem accounting information: done

[ 47.153777] EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional

features (2c0)

[ 47.163385] EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional

Page 9: EdgeScale Solution on QorIQ Layerscape Platform

features (2c0)

[ 47.206012] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)

[ 47.225922] EXT3-fs (mmcblk0p3): error: couldn't mount because of unsupported optional

features (2c0)

[ 47.235585] EXT2-fs (mmcblk0p3): error: couldn't mount because of unsupported optional

features (2c0)

[ 47.276191] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)

partition and format /dev/mmcblk0: [Done]

--2018-03-12 09:55:14-- http://sun.ap.freescale.net/images/dcca/dcca_lsdk1803-

ls1046_image_sdboot.tgz

Resolving sun.ap.freescale.net... 10.192.208.75

Connecting to sun.ap.freescale.net|10.192.208.75|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 1119992757 (1.0G) [application/x-gzip]

Saving to: 'full_images.tgz'

full_images.tgz 100%[===================>] 1.04G 5.68MB/s in 1m 57s

2018-03-12 09:57:10 (9.16 MB/s) - 'full_images.tgz' saved [1119992757/1119992757]

startblock: 8

programming firmware_ls1046ardb_uboot_sdboot.img into /dev/mmcblk0, startblock=8

71605+1 records in

71605+1 records out

firmware_ls1046ardb_uboot_sdboot.img has been programmed into /dev/mmcblk0!

instruction: install

machine = ls1046ardb

SD card: 15 GB

ubuntu_xenial_arm64_rootfs.tgz: gzip compressed data, last modified: Mon Mar 12 09:18:52

2018, from Unix

ubuntu_xenial_arm64_rootfs.tgz tarball found

bootpartition_arm64.tgz: gzip compressed data, last modified: Mon Mar 12 09:12:08 2018, from

Unix

bootpartition_arm64.tgz tarball found

installing bootpartition, please wait ..

bootpartition installation: [Done]

installing rootfs, please wait ..

rootfs partition installation: [Done]

Filesystem Size Used Available Use% Mounted on

/dev/root 53.7M 46.4M 3.4M 93% /

devtmpfs 3.8G 0 3.8G 0% /dev

tmpfs 3.9G 0 3.9G 0% /dev/shm

tmpfs 3.9G 60.0K 3.9G 0% /tmp

tmpfs 3.9G 1.0M 3.9G 0% /run

Page 10: EdgeScale Solution on QorIQ Layerscape Platform

/dev/loop0 1003.0K 28.0K 924.0K 3% /etc/ssl/private/edgescale

/dev/mmcblk0p2 274.6M 73.0M 180.6M 29% /run/media/mmcblk0p2

/dev/mmcblk0p3 14.2G 4.6G 8.8G 34% /run/media/mmcblk0p3

UUID2 = 2292cb5a-1add-4eb0-8904-3944f450a258

PARTUUID2 = d1739ad2-02

PARTUUID3 = d1739ad2-03

installation finished successfully

[ 401.105395] kvm: exiting hardware virtualization

[ 401.135939] sd 0:0:0:0: [sda] Synchronizing SCSI cache

[ 401.141665] reboot: Restarting system

The target board Certificate enrollment as the following.

root@localhost:~# cat ~/test.sh

#!/bin/bash

DiskInfo=`fdisk -l $1 2>&1|grep "Disk /dev"`

if [ $? -ne 0 ]||[ $# -eq 0 ]

then

echo "usage: sudo $0 /dev/<sdx>"

exit 1

fi

echo Install Edgescale AAA service Private key to $DiskInfo

echo "--- Yes|No ---"

read install

if [ $install = "Yes" ]

then

dd if=/dev/zero of=secure.bin bs=1M count=1 > /dev/null

mke2fs secure.bin

mkdir -p /tmp/secure

mount -o loop secure.bin /tmp/secure

mkdir -p /tmp/secure/{certs,private_keys}

cat > /tmp/secure/private_keys/mf-private.pem << EOF

-----BEGIN RSA PRIVATE KEY-----

MIIEowIBAAKCAQEAiPAHjZUzhIuPtKmOckWPaSCXrr/i3P8x3gNuR63ZBj3mU3ru

/0YOUqVl6rt7JOAXqF9mjbfKNLXY1p4crju2yfYNcoqSZmxUxBVmzK74iYcPOBmr

cfxun4qlBn0hWBQVD3YRU68NGzsXl6DSpv0ROBS1zK2REECK/6lnIag16bBAy350

I63+XYvMNZItTITVooJs91G4IqPTp/z1TAW86sE4fvA6PnHQq5UQ/TpaxTS3SbXZ

qhC4EhvhkBRTVQzdLcBNPU1Bgfvf/WdhAlyleVz2dPwu5DveBQVSJFHrEe5poxuZ

oS0jPrDfkvlQOjOlTUvvEa5y+95vliYJa78DDwIDAQABAoIBAC5cdXItzV9WkLSt

oxh1DHSfIDt9o6UGkS+FIdUKuqsuUch5mmi6oya/8J1kE/EMHXZXtjTMwJzP5DXl

GfizJtOBhlP9LkuW6avpQwCRTHvjSffIWQ8iU6GYIv7rZlqXkfnGE1+tqFZLz1T6

kdcPXsEJ4fMF4FMMRwL/q3btqDMRhla4G/Yh+u7xSd3zwS4DHaqOTkC+IGLEnsKf

bZozXmp22tu9rYbQ/Vy9H0fgLQzCiskk37Sl8EwybcQ2otkjtFGdt+65Nob68USv

zXEg0QNErg9bICIfSAD1dUyF2vJaFR9ed7CEX+fEX4ULyCsNexDxE22Az7Qv+FYl

ISBCtwECgYEAuuDPIKK+0klJBx1Y4qXeKs9/MWJXkfSGrfjbMJw7XsfUD1A46NcN

Page 11: EdgeScale Solution on QorIQ Layerscape Platform

75FgTkfK52gevGc70H1HO+f4PqC1RP8RUHhl5JXD8hD22B57BBArDAm1G9+Abvdv

Y1ph6s/ARvRlLaickPHDeYw7P7CDE16wjjQfSB6OF+lY/QQX0MibeW8CgYEAu5Zu

UIYsT1/C7A4NRgP3EO/zHd8jNehGkr9xswnGHV2GC0r0UKjlSOweYIis0iWpwtCS

8pbqYTvgO7X0aWT/mBetdn6iIArHL3kCZhLAFtPgU9KHEAdjdgClo5SuuO1XrJID

0kjpFMQWAfxEtCAS040mgoG6/ntViWQSeb2KAGECgYBnbSpVZpzzpymqrVxXO/OE

gAhmHYZXuhybxmIROjZFk5TS0NReUT9eOngxetxaTC7OmNfq4Jr/Fbg3eRw5zm0X

uzqxUw36N9dV7zCoJAafB/RbM8xSHdFhDFGq8kX5PyOMLIhSU+uaprjX2+n/W2Wd

nk09zeNYaoYcqhpAK/aYMwKBgQCyaTmUNnhQKbje/+JZ9A14u25Tu9TmQXtVuOUv

rh0R8tA5T1mcmXYw6/lcQMF1wUJ7Ohp4xVY3klYLFFxYHSoHAoYFTB1wMjANk57X

a//r9inGL1YrxYswQR9IvHGNCpc3V0xxJM0h5fk0fDTvyA1/zSCSQUaTIMRSvq3f

wYhOIQKBgFFu6pvmXMz859UVomkbpape7iAIbqE7oL8vXQOBdURgMMamWkS4rQWQ

0Lk6CkKG1PSd3TFPKDHXorODVC2dL4uKU6DGUZWFuh8ClN59Mb9GBObTqm7vwRK7

3iSjfaS8xGxI/CmMeZkRKkv+3Qi8miG/nuVcZ5G6EUnYJ1GZhpl0

-----END RSA PRIVATE KEY-----

EOF

echo 3324532452345 >> /tmp/secure/device-id.ini

sync

umount /tmp/secure

dd if=secure.bin of=$1 seek=62 bs=1M

dd if=/dev/zero of=$1 seek=63 bs=1M count=1

sync

rm -r secure.bin /tmp/secure

else

echo bye

exit 1

fi

root@localhost:~# ~/test.sh /dev/mmcblk0

Install Edgescale AAA service Private key to Disk /dev/mmcblk0: 14.9 GiB, 15931539456 bytes,

31116288 sectors

--- Yes|No ---

Yes

1+0 records in

1+0 records out

1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.005288 s, 198 MB/s

mke2fs 1.42.13 (17-May-2015)

Discarding device blocks: done

Creating filesystem with 1024 1k blocks and 128 inodes

Allocating group tables: done

Writing inode tables: done

Writing superblocks and filesystem accounting information: done

1+0 records in

1+0 records out

1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00372028 s, 282 MB/s

Page 12: EdgeScale Solution on QorIQ Layerscape Platform

1+0 records in

1+0 records out

1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00221292 s, 474 MB/s

root@localhost:~# date -s "Wed Mar 12 08:14:41 UTC 2018"

Mon Mar 12 08:14:41 UTC 2018

root@localhost:~# cert-agent

exit status 1

No valid certificate found, starting 3 Phases Certificate Enrollment

starting Phase1

starting Phase2

starting Phase3

create PKCS10 request

Starting E-EST certificate Enrollment

set Hostname to b4a256278c0a56888bc0c65ca139a462.cloud.gateway.ls1046a.nxp

6. Running EdgeScale Demo Application

This section describes running face recognition application on the cloud server.

APP -> Select application: tensorflow-facerec -> Deploy

->Select one device :

#174479f41fc95b1bac6b4b09f12a165f.yun.gateway.ls1046a.nxp->Deploy App

-> Wait for the application deployed successfully and check App Log to find the IP address

-> Connect the 5000 port of the above IP address via web browser (for example,

https://<board_ip>:5100)

-> Input Your Name, then Face Left and Face Right to enroll your face

7. Dynamic Deployment of Container-Based Applications

The following describes deployment of container-based application tensorflow-facerec on

Page 13: EdgeScale Solution on QorIQ Layerscape Platform

the EdgeScale client and execute it.

root@localhost:~# docker ps

CONTAINER ID IMAGE COMMAND

CREATED STATUS PORTS NAMES

ec005ade724e edgerepos/pause-arm64:3.0 "/pause" 3 minutes

ago Up 3 minutes k8s_POD_tensorflow-facerec-

0b726c09e9e0411a993305ea095d48b6_default_ddea0bf8-25e6-11e8-948d-

0a74b85c2994_0

root@localhost:~# tail -f /var/log/kubelet.log

I0312 11:20:28.558476 5178 qos_container_manager_linux.go:286]

[ContainerManager]: Updated QoS cgroup configuration

E0312 11:20:28.752457 5178 kubelet_network.go:378] Failed to ensure marking rule

for KUBE-MARK-DROP: error appending rule: exit status 1: iptables: No chain/target/match

by that name.

W0312 11:20:31.198805 5178 helpers.go:771] eviction manager: no observation found

for eviction signal allocatableNodeFs.available

I0312 11:20:31.680346 5178 kubelet_node_status.go:422] Using node IP:

"192.168.2.232"

I0312 11:20:37.501426 5178 kube_docker_client.go:328] Pulling image

"edgerepos/tensorflow-facerec:stable": "969a08c29b83: Extracting

[=========================> ] 208.9 MB/411.7 MB"

W0312 11:20:41.259037 5178 helpers.go:771] eviction manager: no observation found

for eviction signal allocatableNodeFs.available

I0312 11:20:47.501418 5178 kube_docker_client.go:328] Pulling image

"edgerepos/tensorflow-facerec:stable": "969a08c29b83: Extracting

[=============================> ] 242.9 MB/411.7 MB"

W0312 11:20:51.319126 5178 helpers.go:771] eviction manager: no observation found

for eviction signal allocatableNodeFs.available

I0312 11:20:56.408830 5178 kubelet_node_status.go:422] Using node IP:

"192.168.2.232"

0312 11:20:57.501478 5178 kube_docker_client.go:328] Pulling image

"edgerepos/tensorflow-facerec:stable": "969a08c29b83: Extracting

[===================================> ] 291.9 MB/411.7 MB"

W0312 11:21:01.388785 5178 helpers.go:771] eviction manager: no observation found

for eviction signal allocatableNodeFs.available

I0312 11:21:07.106834 5178 kubelet_node_status.go:422] Using node IP:

"192.168.2.232"

I0312 11:21:07.501442 5178 kube_docker_client.go:328] Pulling image

"edgerepos/tensorflow-facerec:stable": "969a08c29b83: Extracting

[======================================> ] 313.6 MB/411.7 MB"

root@localhost:~# docker ps

root@localhost:~# docker ps

CONTAINER ID IMAGE

COMMAND CREATED STATUS PORTS

Page 14: EdgeScale Solution on QorIQ Layerscape Platform

NAMES

0431cce2e627 edgerepos/tensorflow-

facerec@sha256:c8a09142eed1e304e38f26f7011ba1209991cb908aef12ffb23fff944fe5ce7b

"/bin/bash -c 'cd ..." 24 seconds ago Up 23 seconds

k8s_tensorflow-facerec-0b726c09e9e0411a993305ea095d48b6_tensorflow-facerec-

0b726c09e9e0411a993305ea095d48b6_default_ddea0bf8-25e6-11e8-948d-

0a74b85c2994_0

ec005ade724e edgerepos/pause-arm64:3.0

"/pause" 12 minutes ago Up 12 minutes

k8s_POD_tensorflow-facerec-0b726c09e9e0411a993305ea095d48b6_default_ddea0bf8-

25e6-11e8-948d-0a74b85c2994_0