Skip to content

Commit

Permalink
improve configuration file handling when launching macchina.io server
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig committed Jun 7, 2020
1 parent 7f5a10e commit 86053bd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The workspace includes the macchina.io IoT Edge SDK sources via a Git submodule.
The workspace includes one sample project, a simple implementation of a
temperature sensor based on the Linux Thermal subsystem (`/sys/class/thermal`).

## Visual Studio Code
## Visual Studio Code Integration

Configuration files for Visual Studio Code are included in the workspace.
The following Visual Studio Code extensions should be installed:
Expand All @@ -22,3 +22,17 @@ The following tasks have been defined in [tasks.json](.vscode/tasks.json):
- RemoteGen: Runs the Remoting code generator. A RemoteGen.xml configuration file must be selected.

Launch configurations for debugging via gdb (on Linux) and lldb (on macOS) are also included.

## Getting Started

1. Clone the repository, including the macchina.io submodule.
Either do a recursive clone, or a normal clone followed by
a `git submodule update`.
2. Build macchina.io.
3. Open the sample-workspace directory in Visual Studio Code.

```
$ git clone --recursive https://github.com/macchina-io/sample-workspace.git
$ cd sample-workspace
$ make -s -j8 -C macchina.io
```
15 changes: 9 additions & 6 deletions etc/macchina.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#
# OSP Configuration
#
osp.codeCache = ${application.dir}../var/cache/bundles
osp.bundleRepository = ${application.configDir}../macchina.io/platform/OSP/bundles;${application.configDir}../macchina.io/devices/bundles;${application.configDir}../macchina.io/services/bundles;${application.configDir}../macchina.io/protocols/bundles;${application.configDir}../macchina.io/webui/bundles;${application.configDir}../macchina.io/samples/bundles
osp.data = ${application.configDir}../var/lib
projectDir = ${application.configDir}/../../
macchinaDir = ${application.dir}/../../../../

osp.codeCache = ${projectDir}/var/cache/bundles
osp.bundleRepository = ${projectDir}/devices/bundles;${macchinaDir}/platform/OSP/bundles;${macchinaDir}/devices/bundles;${macchinaDir}/services/bundles;${macchinaDir}/protocols/bundles;${macchinaDir}/webui/bundles;${macchinaDir}/samples/bundles
osp.data = ${projectDir}/var/lib
osp.web.cacheResources = true
osp.web.sessionManager.cookiePersistence = transient

Expand All @@ -15,7 +18,7 @@ osp.js.v8.flags = --harmony;--use-strict
#
# Settings
#
macchina.settings.path = ${application.configDir}../var/lib/settings.properties
macchina.settings.path = ${projectDir}/var/lib/settings.properties


#
Expand Down Expand Up @@ -139,14 +142,14 @@ webtunnel.password =
# for more information.
#
logging.loggers.root.channel = splitter
logging.loggers.root.level = information
logging.loggers.root.level = debug

logging.loggers.remoting.name = RemotingNG
logging.loggers.remoting.level = notice

logging.channels.file.class = FileChannel
logging.channels.file.pattern = %Y-%m-%d %H:%M:%S.%i [%p] %s<%I>: %t
logging.channels.file.path = ${application.dir}${application.baseName}.log
logging.channels.file.path = ${projectDir}/${application.baseName}.log
logging.channels.file.rotation = daily
logging.channels.file.archive = number
logging.channels.file.purgeCount = 10
Expand Down
2 changes: 1 addition & 1 deletion macchina.io

0 comments on commit 86053bd

Please sign in to comment.