Compare commits

..

No commits in common. "main" and "v0.0.2" have entirely different histories.
main ... v0.0.2

9 changed files with 5 additions and 55 deletions

View File

@ -1,49 +0,0 @@
# BlokWork client - Auto Installer
---
# 설명
- bwc-installer-arm32는 아키텍처 arm32 장비 등록 시, 수행해야 할 다음 내용을 자동으로 수행하고, BWc 프로세스를 설치하는 인스톨러입니다.
- SDT-Cloud에 장비의 시리얼 넘버(AssetCode) 등록
- SDT-Cloud에 장비 연결
- 장비 프로비저닝
- BWc 프로세스 설치
- 장비 헬스 데이터 수집 및 전송 프로세스 설치
- 장비 하트비트 전송 프로세스 설치
- 장비 프로세스 상태 체크 프로세스 설치
- 장비 등록이 완료되면, 이 장비는 다음 동작이 가능합니다.
- AccessKey 생성(zip 파일)
- SDT-Cloud에서 등록한 장비의 정보를 확인할 수 있습니다.
- SDT-Cloud에서 등록한 장비의 헬스 데이터를 확인할 수 있습니다.
- SDT-Cloud에서 장비의 하트비트를 확인할 수 있습니다.
- SDT-Cloud에서 장비에 명령어 제어가 가능합니다.
- Bash
- Systemd
- Docker
- Deploy
- Config Edit
# 설치 방법
- bwc-installer-arm32를 실행하기 전에, 선행 작업이 필요합니다.
1. 선행 작업
- SDT-Cloud 관리자에게 장비의 시리얼 넘버를 받아야 합니다.
- 각 장비의 종류에 마다 시리얼 넘버가 부여 됩니다.
- 부여 받은 시리얼 넘버를 관리자로부터 받습니다.
- SDT-Cloud의 조직 코드를 확인해야 합니다.
- SDT-Cloud의 조직 코드는 SDT-Cloud에 로그인 후, 아래 그림과 같이 계정을 클릭하면 조직 코드를 확인할 수 있습니다.
![](./image.png)
2. 파일 다운로드
- 릴리즈에서 최신 파일(.zip) 파일을 다운로드 합니다.
3. installer 실행
- 다운로드한 파일을 압축해제 하고 init.sh 파일을 실행합니다.
```bash
$ unzip latest.zip
$ cd bwc-installer-arm32
$ sudo su
# ./init.sh
./init.sh help
Organzation ID(58a311aa-f52a-40e3-af44-cdec82b9d0b7): <ORGAZATION_ID>
Serial Number(ECN-SJ-TEST-001): <SERIAL NUMBER>
Type(ecn or nodeq): <TYPE>
```
4. 등록 확인
- bwc-installer 실행을 완료하고, SDT-Cloud에서 장비가 등록됐는지, 헬스데이터, 장비 정보 등을 확인합니다.

BIN
bwc-init

Binary file not shown.

Binary file not shown.

View File

@ -4,7 +4,7 @@ sudo mkdir -p /etc/sdt/device-control
sudo cp config.yaml /etc/sdt/device-control
sudo sed -i "s/acode/$1/g" /etc/sdt/device-control/config.yaml
sudo sed -i "s/typecode/$2/g" /etc/sdt/device-control/config.yaml
sudo cp device-control /usr/bin/
sudo cp device-control /usr/local/bin/
sudo cp device-control.service /etc/systemd/system/
sudo systemctl start device-control
sudo systemctl enable device-control

Binary file not shown.

BIN
image.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -25,7 +25,6 @@ echo "[INIT] [1] Finish equipment registration"
echo "[INIT] [2] Start install device-control"
cd device-control
./install.sh $acode $etype
mkdir -p /usr/local/sdt/app
echo "[INIT] [2] Finish install device-control"
echo "[INIT] [3] Start install device-health"

Binary file not shown.

View File

@ -11,7 +11,7 @@ echo "[INIT] Start uninstall device-control"
systemctl disable device-control
systemctl stop device-control
rm /etc/systemd/system/device-control.service
rm /usr/bin/device-control
rm /usr/local/bin/device-control
rm -rf /etc/sdt/device-control
echo "[INIT] Finish uninstall device-control"
@ -19,7 +19,7 @@ echo "[INIT] Start uninstall device-health"
systemctl disable device-health
systemctl stop device-health
rm /etc/systemd/system/device-health.service
rm /usr/bin/device-health
rm /usr/local/bin/device-health
rm -rf /etc/sdt/device-health
echo "[INIT] Finish uninstall device-health"
@ -27,14 +27,14 @@ echo "[INIT] Start uninstall device-heartbeat"
systemctl disable device-heartbeat
systemctl stop device-heartbeat
rm /etc/systemd/system/device-heartbeat.service
rm /usr/bin/device-heartbeat
rm /usr/local/bin/device-heartbeat
echo "[INIT] Finish uninstall device-heartbeat"
echo "[INIT] Start uninstall process-checker"
systemctl disable process-checker
systemctl stop process-checker
rm /etc/systemd/system/process-checker.service
rm /usr/bin/process-checker
rm /usr/local/bin/process-checker
echo "[INIT] Finish uninstall process-checker"
echo "[INIT] Delete Cert Data"