123 lines
2.9 KiB
YAML
123 lines
2.9 KiB
YAML
name: tdengine
|
|
base: core18 # the base snap is the execution environment for this snap
|
|
version: '2.0.2.0' # just for humans, typically '1.2+git' or '1.3.2'
|
|
icon: snap/gui/t-dengine.svg
|
|
summary: an open-source big data platform designed and optimized for IoT.
|
|
description: |
|
|
TDengine is an open-source big data platform designed and optimized for Internet of Things (IoT), Connected Vehicles, and Industrial IoT. Besides the 10x faster time-series database, it provides caching, stream computing, message queuing and other functionalities to reduce the complexity and costs of development and operations.
|
|
|
|
grade: stable
|
|
confinement: strict
|
|
|
|
apps:
|
|
tdengine:
|
|
command: launcher.sh
|
|
daemon: simple
|
|
restart-condition: always
|
|
plugs:
|
|
- network
|
|
- network-bind
|
|
- system-observe
|
|
- systemfiles
|
|
|
|
taos:
|
|
command: taoswrapper.sh
|
|
plugs:
|
|
- network
|
|
- system-observe
|
|
- systemfiles
|
|
- historyfile
|
|
|
|
taosdemo:
|
|
command: usr/bin/taosdemo
|
|
plugs:
|
|
- network
|
|
|
|
plugs:
|
|
historyfile:
|
|
interface: personal-files
|
|
read:
|
|
- $HOME/.taos_history
|
|
write:
|
|
- $HOME/.taos_history
|
|
|
|
systemfiles:
|
|
interface: system-files
|
|
read:
|
|
- /etc/taos
|
|
- /var/lib/taos
|
|
- /var/log/taos
|
|
- /tmp
|
|
write:
|
|
- /var/log/taos
|
|
- /var/lib/taos
|
|
- /tmp
|
|
|
|
parts:
|
|
script:
|
|
plugin: dump
|
|
source: snap/local/
|
|
prime:
|
|
- launcher.sh
|
|
- taoswrapper.sh
|
|
|
|
tdengine:
|
|
source: .
|
|
source-type: local
|
|
plugin: cmake
|
|
build-packages:
|
|
- gcc
|
|
- g++
|
|
- make
|
|
- cmake
|
|
override-build: |
|
|
snapcraftctl build
|
|
if [ ! -d $SNAPCRAFT_STAGE/usr ]; then
|
|
mkdir $SNAPCRAFT_STAGE/usr
|
|
fi
|
|
|
|
if [ ! -d $SNAPCRAFT_STAGE/etc/taos ]; then
|
|
mkdir -p $SNAPCRAFT_STAGE/etc/taos
|
|
fi
|
|
|
|
cp $SNAPCRAFT_PART_BUILD/build/* -rf $SNAPCRAFT_STAGE/usr/
|
|
cp $SNAPCRAFT_PART_SRC/packaging/cfg/taos.cfg -rf $SNAPCRAFT_STAGE/etc/taos/
|
|
|
|
if [ ! -d $SNAPCRAFT_STAGE/var/lib/taos ]; then
|
|
mkdir -p $SNAPCRAFT_STAGE/var/lib/taos
|
|
fi
|
|
if [ ! -d $SNAPCRAFT_STAGE/var/log/taos ]; then
|
|
mkdir -p --mode=777 $SNAPCRAFT_STAGE/var/log/taos
|
|
fi
|
|
|
|
prime:
|
|
- etc/taos/taos.cfg
|
|
- usr/bin/taosd
|
|
- usr/bin/taos
|
|
- usr/bin/taosdemo
|
|
- usr/lib/libtaos.so.2.0.2.0
|
|
- usr/lib/libtaos.so.1
|
|
- usr/lib/libtaos.so
|
|
|
|
override-prime: |
|
|
snapcraftctl prime
|
|
if [ ! -d $SNAPCRAFT_PRIME/var/lib/taos ]; then
|
|
cp -rf $SNAPCRAFT_STAGE/var/lib/taos $SNAPCRAFT_PRIME
|
|
fi
|
|
if [ ! -d $SNAPCRAFT_PRIME/var/log/taos ]; then
|
|
cp -rf $SNAPCRAFT_STAGE/var/log/taos $SNAPCRAFT_PRIME
|
|
fi
|
|
|
|
layout:
|
|
/var/lib/taos:
|
|
bind: $SNAP_DATA/var/lib/taos
|
|
/var/log/taos:
|
|
bind: $SNAP_DATA/var/log/taos
|
|
/etc/taos:
|
|
bind: $SNAP_DATA/etc/taos
|
|
|
|
|
|
hooks:
|
|
install:
|
|
plugs: [systemfiles, historyfile]
|