LoginSignup
6
0

More than 3 years have passed since last update.

Chrome bookにenebular-agentをインストール

Last updated at Posted at 2019-12-04

いつのまにかChrome bookでLinux(ベータ版)が使える様になっていたのに気付きました。
Chrome bookは軽量でバッテリー持ちが良いので、ブラウザで事が済むGoogle系のサービスを使うときやMbedmicro:bitの開発で良く使っています。
enebularがサポートするデバイス向けのagent softwareとして、Linuxマシンで動作するenebular-agentがChrome bookで動作するか試してみました。
※個人的な実験の為、正式にサポートを宣言するものではありません。

使用したChrome book:ASUS C101P
image.png
image.png

Linuxのディストリビューションを調べる

以下の様に出ました。

***@penguin:/$ cat /etc/issue
Debian GNU/Linux 9 \n \l
***@penguin:/$ cat /etc/debian_version
9.9

enebular-agentが対応しているLinuxを確認するとDebian GNU/Linux 9 Stretchとあるので問題無いと思います。

enebular-agentをインストール

enebular-agentのインストール方法を確認して、インストールしてみます。インストールにはAWSのアカウントもしくはPelionのデバイスバンドルが必要になります。今回はAWSでやってみました。
nodejsやnodeRED等必要なものは自動的にインストールされるので、wgetやapt-getが使えればOKです。Chrome bookのLinuxの場合はそのまま、インストールコマンドだけでOKでした。

インストールコマンド

wget -qO- https://enebular.com/agent-install | sudo -E bash -s -- --aws-iot-thing-name=*** --aws-access-key-id=*** --aws-secret-access-key=*** --aws-iot-region=***

(***部分はお持ちのアカウントのものをセットしてください)

待つこと数分、無事インストールできました。

インストールログ(内緒の部分は伏せてます)

==========================================================================================================================
 enebular-agent installation:
   - Device name:         penguin
   - System:              Linux 4.19.60-06185-g54aa50936831 aarch64 GNU/Linux
   - Install user:        enebular
   - Install destination: /home/enebular/enebular-runtime-agent
   - Agent port:          awsiot
   - Agent version:       latest-release
==========================================================================================================================
==== Fetching updater version info ====
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    27  100    27    0     0     33      0 --:--:-- --:--:-- --:--:--    33
OK
==== Downloading updater version 2.9.0 ====
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1482k  100 1482k    0     0   511k      0  0:00:02  0:00:02 --:--:--  511k
OK
==== Installing enebular-agent-updater to /tmp/enebular-agent-updater.dwHoIVYIl ====
OK
==== Checking node.js version ====
OK
==== Checking existing node.js v9.2.1 installation ====
OK
==== Downloading https://nodejs.org/dist/v9.2.1/node-v9.2.1-linux-arm64.tar.gz ====
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 16.8M  100 16.8M    0     0  2892k      0  0:00:05  0:00:05 --:--:-- 3797k
OK
==== Checking integrity ====
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3671    0  3671    0     0   4437      0 --:--:-- --:--:-- --:--:--  4438
OK
==== Installing Node.js v9.2.1 to /home/enebular/nodejs-v9.2.1 ====
OK
==== Fetching enebular-agent ====
OK
==== Extracting enebular-agent ====
OK
==== Updating system package lists ====
OK
==== Install Debian dependencies ====
dpkg-query: no packages found matching build-essential
dpkg-query: no packages found matching python
OK
==== Building agent 2.9.0  ====
OK
==== Building Node-RED ====
OK
==== Building awsiot port ====
OK
==== Building awsiot-thing-creator ====
OK
==== Install Debian dependencies ====
OK
==== Creating Remote Maintenance User ====
Creating enebular-remote-admin using default password
OK
==== Applying file permissions ====
OK
==== Creating AWS IoT thing ====
OK
==== Registering startup service ====
OK
==========================================================================================================================
 enebular-agent has been successfully installed ✔
   - Version: 2.9.0
   - Location: /home/enebular/enebular-runtime-agent
   - User: enebular
   - Service name: enebular-agent-enebular

 AWS IoT Thing {thing name} has been created.
 enebular-agent is running as a system service.
 To check the status of agent, run the following command on the target device:
   sudo journalctl -ex -u enebular-agent-enebular.service
==========================================================================================================================
See details in full install log file: /tmp/enebular-agent-install-log.GGU8Sf

enebularからフローのデプロイ

enebularからフローがデプロイできるか試してみました。enebularからデバイスにデプロイするにはConnectionの作成が必要です。
簡単なフローを作り、デプロイしてみます。
image.png

デプロイが成功しました。
image.png

今後

実験はしてみましたが、特に何に使おうとは考えていませんでしたw
とりあえずChrome bookでnodeREDをささっとインストールする場合は楽かもしれませんね。
今後、Chrome bookの機能が扱えるノードを使った何かができればいいかなと思ってます。センサー等を繋げる場合はRaspberry-piの方が良いと思うので、ディスプレイやタッチパネルが簡単に使えるChrome bookならでは何かができれば面白いですね。

6
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
0