summaryrefslogtreecommitdiffstats
path: root/README.md
blob: 155cb10d59eba57206d2ccf04735d53dfa7ac418 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# agl-service-xds

An AGL binding used to control collected data. Those data may come from
`agl-low-collector` or from AGL `supervision`.

**UNDER DEVELOPMENT - this binding is not fully functional, it's a proof of concept for now**

## Setup

```bash
git clone --recursive https://github.com/iotbzh/agl-server-xds
cd agl-server-xds
```

## Build  for AGL

```bash
#setup your build environement
. /xdt/sdk/environment-setup-aarch64-agl-linux
#build your application
./conf.d/autobuild/agl/autobuild package
```

## Build for 'native' Linux distros (Fedora, openSUSE, Debian, Ubuntu, ...)

```bash
./conf.d/autobuild/linux/autobuild package
```

You can also use binary package from OBS: [opensuse.org/LinuxAutomotive][opensuse.org/LinuxAutomotive]

## Test

### Native setup

Here are commands used to setup some bindings in order to test on `xds-service` natively on a Linux host:

```bash
afs-supervisor --port 1712 --token HELLO --ws-server=unix:/tmp/supervisor -vv

cd $ROOT_DIR/app-framework-binder
afb-daemon -t '' -p 5555 -M --roothttp test --ws-server unix:ave --name test_server -vv
afb-daemon -t '' -p 4444 -M --roothttp test --no-ldpaths --ws-client unix:ave --name test_client -vv

cd $ROOT_DIR/agl-service-harvester
afb-daemon --port=1234 --workdir=./build/package --ldpaths=lib --roothttp=htdocs  --token= --tracereq=common -vv --ws-server unix:/tmp/harvester

cd $ROOT_DIR/agl-service-xds
./conf.d/autobuild/linux/autobuild build
afb-daemon --port=5678 --workdir=./build/package --ldpaths=lib --roothttp=htdocs  --token= --ws-client=unix:/tmp/supervisor --ws-client=unix:/tmp/harvester -vv

```

## Deploy

### AGL

TBD
_DEMO ??= " \ ${OUT_OF_TREE_CONTAINER_CONFIGS} \ ${CONTAINER_EXCHANGE_DEMO_UI} \ " # Handle modification of IMAGE_LINK_NAME done by ULCB builds with Kingfisher support MACHINE_SUFFIX = "${@bb.utils.contains('AGL_FEATURES', 'kingfisher', '-kf', '', d)}" install_container_images() { for c in ${CONTAINER_IMAGES}; do config=${c%:*} image=${c#*:} name=${image#guest-image-} rm -f "${DEPLOY_DIR_IMAGE}/${image}.ext4" src="${TOPDIR}/tmp-${config}/deploy/images/${MACHINE}/${image}-${MACHINE}${MACHINE_SUFFIX}.ext4" bbnote "Installing ${src}" ln -s ${src} "${DEPLOY_DIR_IMAGE}/${image}.ext4" done if ${@oe.utils.conditional('OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR', '', 'false', 'true', d)}; then er=0 for image in ${OUT_OF_TREE_CONTAINER_IMAGES}; do rm -f "${DEPLOY_DIR_IMAGE}/${image}.ext4" src="${OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR}/images/${MACHINE}/${image}-${MACHINE}${MACHINE_SUFFIX}.ext4" if [ ! -e ${src} ]; then bberror "File not found at ${src}." er=1 else bbnote "Installing ${src}" fi ln -s ${src} "${DEPLOY_DIR_IMAGE}/${image}.ext4" done if [ $er -eq 1 ]; then bbfatal "AGL Demo IVI images install error. Please check OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR setting and IVI side build status." fi fi } ROOTFS_POSTPROCESS_COMMAND += "install_container_images; " IMAGE_INSTALL:append = " \ ${@oe.utils.conditional('OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR', '', '', '${CONTAINER_MULTI_DEMO}', d)} \ " WKS_FILES:prepend = " \ ${@oe.utils.conditional('OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR', '', 'agl-ic-container-noloader.wks ', 'agl-ic-container-noloader-demo.wks ', d)} \ "