LoginSignup
1
0

More than 1 year has passed since last update.

Raspberry Pi OS Bullseyeにenebular-agentをインストールする

Posted at

Debian Bullseyeをベースとした、Raspberry Pi OSが2021/10/30にリリースされました。

image.png

このRaspberry Pi OSにenebular-agentをインストールしようとするとエラーが起こり、インストールができません。
これは、インストーラーの問題によるもので、現在、対応を予定していますが、インストーラーではenebular-agentがインストール出来ないのが現状です。
インストーラーを使用しないで、手動であればインストールできますので、その方法を解説します。

enebular-agentの手動インストール

enebular-agentは、githubにソースコードが公開されています。githubからソースコードをダウンロードし、npmでインストールすれば、インストールできますが、素のRaspberry Pi OSにインストールするためには以下の手順で、モジュールを事前にインストールする必要があります。

$ sudo apt install -y cmake

次にNodejsとnpmをインストールしますが、ここではnを使用して、enebular-agentでサポート対応しているNodejs v2.22.5をインストールします。

$ curl -L https://git.io/n-install | bash
$ sudo ./n/bin/n 12.22.5

enebular-agentのソースコードをgithubからクローンして、インストールしていきます。

$ git clone https://github.com/enebular/enebular-runtime-agent.git
$ cd enebular-runtime-agent
$ cd agent
$ npm ci && npm run build
$ cd ..
$ cd node-red
$ npm ci
$ cd ..
$ cd port/awsiot
$ npm ci && npm run build

enebular-agentはenebularとの接続にAWS IoTを使用します。インストーラーを使えば、自動的に設定されますが、手動で設定します。
設定方法については、AWSIoTの環境をセットアップするを参照下さい。

enebular-agentとAWS IoTを接続するための設定方法は、enebular-agentとAWSIoTの接続設定を参照下さい。

enebular-agentを動作させる

enebular-agentは、./enebular-runtime-agent/ports/awsiot/のパスの上で、以下のコマンドで起動します。

$ DEBUG=info npm run start

最終的に以下のように表示されれば、正常に起動しています。

internal: aws-iot: Connected to AWS IoT
internal: aws-iot: Thing shadow registered

最後に

とりあえず、enebular-agentが動作することが確認できました。ちなみにこの手順では、enebular-agentのリモートメンテナンスの機能は使用できません。
その他の機能もすべて確認はしていないので、その点はご了承下さい。
フォルダのパーミッション設定やアプリケーションが動作する権限もインストーラーでインストールされるものとは異なります。

※本記事は、enebular公式に動作を保証するものではありません。

1
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
1
0