Skip to content

Commit

Permalink
Update manifest and requirements for virtualenv (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
PFigs authored Jul 23, 2019
1 parent 4138272 commit 7623d4c
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .ci/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function _build
function _fetch_dependencies
{
# pull repository dependency
GIT_MANIFEST_FILE=gateway.xml
GIT_MANIFEST_FILE=gateway/dev.xml
GIT_MANIFEST_URL=https://github.com/wirepas/manifest.git
GIT_MANIFEST_BRANCH=master
_ROOT_PATH=$(pwd)
Expand Down Expand Up @@ -96,7 +96,7 @@ function _main
# builds x86 and arm images based on manifest files
if [[ ! -z ${BUILD_TAG} ]]
then
GIT_MANIFEST_BRANCH=gateway/${BUILD_TAG}
GIT_MANIFEST_BRANCH=refs/tags/gateway/${BUILD_TAG}
_build "${DOCKERFILE_PATH}/stable/arm/docker-compose.yml" "arm" "--no-cache"
_build "${DOCKERFILE_PATH}/stable/x86/docker-compose.yml" "x86" "--no-cache"
else
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ release/
.ci/_repo/*
dev-requirements.txt

.repo/*
_repo/*
python_transport/docs/source/api/
container/wm_gateway.env
Expand Down
45 changes: 30 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,31 @@ service, which interfaces
with the sink devices. The backend-apis contains api and message wrapper
over the protocol buffers that are transmitted over MQTT.

To clone this repository please ensure you have the [repo tool][repo_tool]
installed and type the following:
We are currently using the [repo tool][repo_tool] to upkeep the project
dependencies and for that reason we recommend that you use it as well.

The manifest files are located in at the
[manifest repository][wirepas_manifest] and are organized inside the
gateway folder as follows:

- dev.xml: points to the development branches, intended for collaborators
- stable.xml: points to the latest release

If you wish to pull the latest release then use the following command:


```shell
repo init -u https://github.com/wirepas/manifest.git -m gateway.xml
repo init -u https://github.com/wirepas/manifest.git \
-m gateway/stable.xml \
--no-clone-bundle
```

or for organization members and collaborators:
and if you wish to track the development branches, please use

```shell
repo init -u git@github.com:wirepas/manifest.git -m gateway.xml
repo init -u https://github.com/wirepas/manifest.git \
-m gateway/dev.xml \
--no-clone-bundle
```

afterwards download the repositories with
Expand All @@ -48,15 +62,18 @@ afterwards download the repositories with
repo sync
```

To clone a particular version branch, vX.Y.Z, please use repo's *-b*
switch as follows:
To clone a particular version, vX.Y.Z, please specify the tag with the
*-b* switch and use the stable manifest:

```shell
repo init (...) -b refs/heads/vX.Y.Z
repo init (...) -m gateway/stable.xml -b refs/tags/vX.Y.Z
```

Usage of repo is also documented in the release
Dockerfiles (see [Dockerfile][here_container_dockerfile])
Dockerfiles (see [Dockerfile][here_container_dockerfile]).

Please read more on the repo tool usage from
[its official documentation][repo_tool].

## Linux Requirements

Expand Down Expand Up @@ -279,11 +296,9 @@ Alternatively you can use our [ci tool][here_ci_docker_build].
We also have pre-built images available from docker hub under the
following registries:
[wirepas/gateway][dockerhub_wirepas]: multi architecture registry
[wirepas/gateway-x86][dockerhub_wirepas_x86]: x86 architecture registry
[wirepas/gateway-rpi][dockerhub_wirepas_rpi]: arm/rpi architecture registry
- [wirepas/gateway][dockerhub_wirepas]: multi architecture registry
- [wirepas/gateway-x86][dockerhub_wirepas_x86]: x86 architecture registry
- [wirepas/gateway-arm][dockerhub_wirepas_arm]: arm architecture registry
## Starting docker services
Expand Down Expand Up @@ -354,4 +369,4 @@ Copyright 2019 Wirepas Ltd licensed under Apache License, Version 2.0 See file
[dockerhub_wirepas]: https://hub.docker.com/r/wirepas/gateway
[dockerhub_wirepas_x86]: https://hub.docker.com/r/wirepas/gateway-x86
[dockerhub_wirepas_rpi]: https://hub.docker.com/r/wirepas/gateway-rpi
[dockerhub_wirepas_arm]: https://hub.docker.com/r/wirepas/gateway-arm
2 changes: 1 addition & 1 deletion container/stable/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG DOCKER_BASE=wirepas/base:1.1-ubuntu
ARG CROSS_BUILD_START_CMD=:
ARG CROSS_BUILD_END_CMD=:
ARG GIT_MANIFEST_FILE=gateway.xml
ARG GIT_MANIFEST_FILE=gateway/stable.xml
ARG GIT_MANIFEST_URL=https://github.com/wirepas/manifest.git
ARG GIT_MANIFEST_BRANCH=master

Expand Down
2 changes: 1 addition & 1 deletion container/stable/arm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
DOCKER_BASE: wirepas/base:1.1-raspbian
CROSS_BUILD_START_CMD: cross-build-start
CROSS_BUILD_END_CMD: cross-build-end
GIT_MANIFEST_FILE: ${GIT_MANIFEST_FILE:-gateway.xml}
GIT_MANIFEST_FILE: ${GIT_MANIFEST_FILE:-gateway.xml/stable.xml}
GIT_MANIFEST_URL: ${GIT_MANIFEST_URL:-https://github.com/wirepas/manifest.git}
GIT_MANIFEST_BRANCH: ${GIT_MANIFEST_BRANCH:-master}

Expand Down
2 changes: 1 addition & 1 deletion container/stable/x86/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
DOCKER_BASE: wirepas/base:1.1-ubuntu
CROSS_BUILD_START_CMD: ":"
CROSS_BUILD_END_CMD: ":"
GIT_MANIFEST_FILE: ${GIT_MANIFEST_FILE:-gateway.xml}
GIT_MANIFEST_FILE: ${GIT_MANIFEST_FILE:-gateway.xml/stable.xml}
GIT_MANIFEST_URL: ${GIT_MANIFEST_URL:-https://github.com/wirepas/manifest.git}
GIT_MANIFEST_BRANCH: ${GIT_MANIFEST_BRANCH:-master}

Expand Down
27 changes: 26 additions & 1 deletion python_transport/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,29 @@ environment such as [virtualenv][virtualenv] or [pipenv][pipenv].

To install this package run (use -e for development mode)

pip install \[-e\] .
```shell
pip install [-e] .
```

## Running inside a virtual environment

When running inside a virtual environment you will need to provide access
to system libraries. You can achieve this by using *--system-site-packages*
when setting up your environment or through [vext][vext].

If you opt to install [vext][vext], please install the
[PyGObject][pygobject] module with:

```shell
pip install vext vext.gi
```

You also need to ensure that the following packages are installed inside
the virtual environment (as well as their system dependencies):

```shell
pip install pygobject gobject
```

## Starting the service

Expand All @@ -42,3 +64,6 @@ Please read on

[virtualenv]: https://docs.python.org/3/tutorial/venv.html
[pipenv]: https://github.com/pypa/pipenv
[vext]: https://github.com/stuaxo/vext

[pygobject]: https://pygobject.readthedocs.io/en/latest/index.html

0 comments on commit 7623d4c

Please sign in to comment.