Skip to content

Commit

Permalink
Versioning (#189)
Browse files Browse the repository at this point in the history
* use major version for URI

* more updates, also fixes up documentation
  • Loading branch information
edaniszewski committed Jul 3, 2018
1 parent 1cf90b6 commit 9afd410
Show file tree
Hide file tree
Showing 14 changed files with 232 additions and 181 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ see the [User Guide][user-guide].
with, which in this case is the [emulator][synse-emulator].
```console
$ curl http://localhost:5000/synse/2.0/scan
$ curl http://localhost:5000/synse/v2/scan
```

See the [API Documentation][synse-api] to learn what else Synse Server is capable of.
Expand Down
8 changes: 4 additions & 4 deletions bin/synse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# synse.sh
#
# This script is the entrypoint script for the Synse Server docker
# This script is the entry point script for the Synse Server docker
# images. It is used to start Synse Server and to optionally start
# an instance of the emulator plugin alongside it.
#
Expand All @@ -26,7 +26,7 @@
# ---------------------------------------------------------------------
set -o errexit -o pipefail

version="$(python /synse/synse/version.py)"
version="$(python -c "import synse ; print(synse.__version__)")"

# help
# ----
Expand Down Expand Up @@ -54,8 +54,8 @@ cat <<USAGE
docker run vaporio/synse-server [flag | subcommand]
Flags:
--help | -h Show this message.
--version | -v Show the version of Synse.
--help, -h Show this message.
--version, -v Show the version of Synse.
Subcommands:
enable-emulator
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ curl localhost:5000/synse/test
If successful, you are ready to go. Next, perform a scan to see everything that is available
via the plugin:
```
curl localhost:5000/synse/2.0/scan
curl localhost:5000/synse/v2/scan
```

This should give back a set of devices - in particular:
Expand Down
2 changes: 1 addition & 1 deletion deploy/k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ curl <pod id>:5000/synse/test
If successful, you are ready to go. Next, perform a scan to see everything that is available
via the plugin:
```
curl <pod ip>:5000/synse/2.0/scan
curl <pod ip>:5000/synse/v2/scan
```

This should give back a set of devices - in particular:
Expand Down
51 changes: 31 additions & 20 deletions deploy/k8s/synse-with-emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ metadata:
data:
config.yml: |
version: 1.0
name: emulator
debug: true
network:
type: tcp
Expand All @@ -39,29 +38,41 @@ data:
devices.yml: |
version: 1.0
locations:
r1vec:
- name: r1vec
rack:
from_env: NODE_NAME
board: vec
fromEnv: NODE_NAME
board:
name: vec
devices:
- type: temperature
model: emul8-temp
- name: temperature
metadata:
model: emul8-temp
outputs:
- type: temperature
instances:
- id: "1"
- info: Synse Temperature Sensor 1
location: r1vec
info: Synse Temperature Sensor 1
- id: "2"
data:
id: 1
- info: Synse Temperature Sensor 2
location: r1vec
info: Synse Temperature Sensor 2
- type: led
model: emul8-led
data:
id: 2
- name: led
metadata:
model: emul8-led
outputs:
- type: led.color
- type: led.state
instances:
- id: "1"
- info: Synse LED
location: r1vec
info: Synse LED
- id: "2"
data:
id: 1
- info: Synse backup LED
location: r1vec
info: Synse backup LED
data:
id: 2
---
apiVersion: extensions/v1beta1
kind: Deployment
Expand Down Expand Up @@ -97,7 +108,7 @@ spec:
- name: SYNSE_LOGGING
value: debug
# Register the Emulator Plugin via ENV config
- name: SYNSE_PLUGIN_TCP_EMULATOR
- name: SYNSE_PLUGIN_TCP
value: localhost:5001
resources:
requests:
Expand All @@ -115,7 +126,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: PLUGIN_DEVICE_PATH
- name: PLUGIN_DEVICE_CONFIG
value: /tmp/device/config
- name: PLUGIN_CONFIG
value: /tmp/plugin
Expand All @@ -125,12 +136,12 @@ spec:
memory: 100Mi
volumeMounts:
# Mount in the emulator plugin configuration to a non-default location.
# This path is registered with the plugin via the PLUGIN_CONFIG enviroment
# This path is registered with the plugin via the PLUGIN_CONFIG environment
# variable.
- name: emulator-plugin-config
mountPath: /tmp/plugin
# Mount in the emulator plugin device config to a non-default location.
# This path is registered with the plugin via the PLUGIN_DEVICE_PATH
# This path is registered with the plugin via the PLUGIN_DEVICE_CONFIG
# environment variable.
- name: emulator-device-config
mountPath: /tmp/device/config

0 comments on commit 9afd410

Please sign in to comment.