v1.1.2 : Travis build test integration & changes to docker deployment
This commit is contained in:
+5
-1
@@ -40,4 +40,8 @@ build/
|
|||||||
# Deps
|
# Deps
|
||||||
deps/boost/
|
deps/boost/
|
||||||
deps/jsoncpp/
|
deps/jsoncpp/
|
||||||
mysql-connector/
|
mysql-connector/
|
||||||
|
|
||||||
|
# Test
|
||||||
|
test/cameradartest.conf.json
|
||||||
|
test/cameradar_*_Debug_Linux.tar.gz
|
||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
language: generic
|
||||||
|
sudo: required
|
||||||
|
dist: trusty
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- sudo apt-get update -qq
|
||||||
|
- sudo apt-get install -y software-properties-common
|
||||||
|
- sudo add-apt-repository -y ppa:mc3man/trusty-media
|
||||||
|
- sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
|
||||||
|
- sudo apt-get update -qq
|
||||||
|
- sudo apt-get install -y nmap
|
||||||
|
- sudo apt-get install -y ffmpeg
|
||||||
|
- sudo apt-get install -y cmake
|
||||||
|
- sudo apt-get install -y libboost-all-dev
|
||||||
|
- sudo apt-get install -y libgstreamer1.0-dev
|
||||||
|
- sudo apt-get install -y gstreamer1.0-plugins-base
|
||||||
|
- sudo apt-get install -y gstreamer1.0-plugins-good
|
||||||
|
- sudo apt-get install -y libcurl4-openssl-dev
|
||||||
|
- sudo apt-get install -y libmysqlclient18
|
||||||
|
- sudo apt-get install -y mysql-client
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
env: COMPILER_NAME=gcc CXX=g++-5 CC=gcc-5 CMAKE_CXX_COMPILER=g++-5
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-5
|
||||||
|
sources: &sources
|
||||||
|
- llvm-toolchain-precise-3.8
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
|
script:
|
||||||
|
- cd deployment
|
||||||
|
- ./build_last_package.sh Debug
|
||||||
|
- tar xvf cameradar_*_Debug_Linux.tar.gz
|
||||||
|
- cp /home/travis/build/EtixLabs/cameradar/deps/jsoncpp/src/deps.jsoncpp/src/lib_json/libjsoncpp*.so* cameradar_*_Debug_Linux/libraries/
|
||||||
|
- cp /home/travis/build/EtixLabs/cameradar/deps/mysql-connector/lib/libmysqlcppconn.so* cameradar_*_Debug_Linux/libraries/
|
||||||
|
- tar -czvf cameradar_*_Debug_Linux.tar.gz cameradar_*_Debug_Linux
|
||||||
|
- docker build -t cameradar .
|
||||||
|
- docker run -v /tmp/thumbs:/tmp/thumbs cameradar
|
||||||
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
This file lists all versions of the repository and precises all changes.
|
This file lists all versions of the repository and precises all changes.
|
||||||
|
|
||||||
|
## v1.1.2
|
||||||
|
|
||||||
|
#### Minor changes :
|
||||||
|
* Added travis integration
|
||||||
|
* Added default environment value for Docker deployment
|
||||||
|
* Updated docker image description with new easy usage
|
||||||
|
* Updated README badges style (replaced flat with square-flat)
|
||||||
|
* Build last package can now also generate a debug package if given the `Debug` command-line argument
|
||||||
|
|
||||||
|
#### Known issues :
|
||||||
|
* There is still the issue with Camera Emulation Server, see the [previous version's patchnote](#v1.1.1) for more information.
|
||||||
|
|
||||||
## v1.1.1
|
## v1.1.1
|
||||||
|
|
||||||
#### Minor changes :
|
#### Minor changes :
|
||||||
|
|||||||
+1
-2
@@ -21,7 +21,7 @@ project (${PROJECT_NAME})
|
|||||||
|
|
||||||
set (${PROJECT_NAME}_VERSION_MAJOR 1)
|
set (${PROJECT_NAME}_VERSION_MAJOR 1)
|
||||||
set (${PROJECT_NAME}_VERSION_MINOR 1)
|
set (${PROJECT_NAME}_VERSION_MINOR 1)
|
||||||
set (${PROJECT_NAME}_VERSION_PATCH 1)
|
set (${PROJECT_NAME}_VERSION_PATCH 2)
|
||||||
set (${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}${${PROJECT_NAME}_SUFFIX}")
|
set (${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}${${PROJECT_NAME}_SUFFIX}")
|
||||||
|
|
||||||
find_package(Git REQUIRED)
|
find_package(Git REQUIRED)
|
||||||
@@ -102,7 +102,6 @@ set (${CAMERADAR_LIBRARIES} "")
|
|||||||
|
|
||||||
# Build cache managers
|
# Build cache managers
|
||||||
add_subdirectory (deps)
|
add_subdirectory (deps)
|
||||||
message ("Debug")
|
|
||||||
add_subdirectory (cameradar_standalone)
|
add_subdirectory (cameradar_standalone)
|
||||||
add_subdirectory (cache_managers)
|
add_subdirectory (cache_managers)
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
## An RTSP surveillance camera access multitool
|
## An RTSP surveillance camera access multitool
|
||||||
|
|
||||||
[](#license)
|
[](#license)
|
||||||
[](https://hub.docker.com/r/ullaakut/cameradar/)
|
[](https://hub.docker.com/r/ullaakut/cameradar/)
|
||||||
[](https://github.com/EtixLabs/cameradar/releases/latest)
|
[](https://travis-ci.org/EtixLabs/cameradar)
|
||||||
|
[](https://github.com/EtixLabs/cameradar/releases/latest)
|
||||||
|
|
||||||
|
|
||||||
#### Cameradar allows you to:
|
#### Cameradar allows you to:
|
||||||
@@ -54,17 +55,15 @@ Run
|
|||||||
```
|
```
|
||||||
docker run \
|
docker run \
|
||||||
-v /tmp/thumbs/:/tmp/thumbs \
|
-v /tmp/thumbs/:/tmp/thumbs \
|
||||||
-e CACHE_MANAGER=your_manager \
|
|
||||||
-e CAMERAS_PORTS=your_ports \
|
|
||||||
-e CAMERAS_SUBNETWORKS=your_subnetwork \
|
-e CAMERAS_SUBNETWORKS=your_subnetwork \
|
||||||
ullaakut/cameradar:tag
|
ullaakut/cameradar:tag
|
||||||
```
|
```
|
||||||
|
|
||||||
* `your_subnetwork` can be a subnet (e.g.: `172.16.100.0/24`) or even an IP (e.g.: `172.16.100.10`).
|
* `your_subnetwork` can be a subnet (e.g.: `172.16.100.0/24`) or even an IP (e.g.: `172.16.100.10`).
|
||||||
* `your_ports` can be one port, multiple ports and even port ranges (e.g.: `554,8554,9000-9554`)
|
|
||||||
* `your_manager` can be either `dumb` or `mysql` but you probably want to use `dumb`. Check [Cameradar's readme on the Docker Hub](https://hub.docker.com/r/ullaakut/cameradar/) for more information.
|
|
||||||
* `tag` allows you to specify a specific version for camerada. If you don't specify any tag, you will use the latest version by default (recommended)
|
* `tag` allows you to specify a specific version for camerada. If you don't specify any tag, you will use the latest version by default (recommended)
|
||||||
|
|
||||||
|
Check [Cameradar's readme on the Docker Hub](https://hub.docker.com/r/ullaakut/cameradar/) for more information and more command-line options.
|
||||||
|
|
||||||
The generated thumbnails will be in `/tmp/thumbs` on both your machine and the `cameradar` container.
|
The generated thumbnails will be in `/tmp/thumbs` on both your machine and the `cameradar` container.
|
||||||
|
|
||||||
For more complex use of the Docker image, see the `Environment variables` part of [Cameradar's readme on the Docker Hub](https://hub.docker.com/r/ullaakut/cameradar/).
|
For more complex use of the Docker image, see the `Environment variables` part of [Cameradar's readme on the Docker Hub](https://hub.docker.com/r/ullaakut/cameradar/).
|
||||||
|
|||||||
@@ -88,14 +88,13 @@ check_storage_path(const std::string& thumbnail_storage_path) {
|
|||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char* argv[]) {
|
main(int argc, char* argv[]) {
|
||||||
etix::tool::logger::get_instance("cameradar");
|
etix::tool::logger::get_instance("cameradar").set_level(etix::tool::loglevel::DEBUG);
|
||||||
auto args = parse_cmdline(argc, argv);
|
auto args = parse_cmdline(argc, argv);
|
||||||
if (not args.first) return EXIT_FAILURE;
|
if (not args.first) return EXIT_FAILURE;
|
||||||
|
|
||||||
print_version();
|
print_version();
|
||||||
|
|
||||||
if (not args.second.exist("-l")) {
|
if (not args.second.exist("-l")) {
|
||||||
etix::tool::logger::get_instance("cameradar").set_level(etix::tool::loglevel::DEBUG);
|
|
||||||
LOG_INFO_("No log level set, using log level 1", "main");
|
LOG_INFO_("No log level set, using log level 1", "main");
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
|||||||
+1
-2
@@ -42,7 +42,6 @@ set (JSONCPP_INCLUDE_DIR "${SOURCE_DIR}/include" PARENT_SCOPE)
|
|||||||
set (JSONCPP_LIBRARY_DIR "${SOURCE_DIR}/src/lib_json")
|
set (JSONCPP_LIBRARY_DIR "${SOURCE_DIR}/src/lib_json")
|
||||||
set (JSONCPP_LIBRARY_DIR ${JSONCPP_LIBRARY_DIR} PARENT_SCOPE)
|
set (JSONCPP_LIBRARY_DIR ${JSONCPP_LIBRARY_DIR} PARENT_SCOPE)
|
||||||
|
|
||||||
file(GLOB JSONCPP_INSTALL_DEPENDENCIES "${JSONCPP_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}jsoncpp*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
|
file(GLOB JSONCPP_INSTALL_DEPENDENCIES "${JSONCPP_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}jsoncpp${CMAKE_SHARED_LIBRARY_SUFFIX}*")
|
||||||
list (APPEND CAMERADAR_INSTALL_DEPENDENCIES ${JSONCPP_INSTALL_DEPENDENCIES})
|
list (APPEND CAMERADAR_INSTALL_DEPENDENCIES ${JSONCPP_INSTALL_DEPENDENCIES})
|
||||||
|
|
||||||
set(CAMERADAR_INSTALL_DEPENDENCIES ${CAMERADAR_INSTALL_DEPENDENCIES} PARENT_SCOPE)
|
set(CAMERADAR_INSTALL_DEPENDENCIES ${CAMERADAR_INSTALL_DEPENDENCIES} PARENT_SCOPE)
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ set (MYSQL_CONNECTOR_LIBRARY_DIR "${MYSQL_CONNECTOR_PATH}/lib")
|
|||||||
|
|
||||||
set (MYSQL_CONNECTOR_LIBRARY_DIR ${MYSQL_CONNECTOR_LIBRARY_DIR} PARENT_SCOPE)
|
set (MYSQL_CONNECTOR_LIBRARY_DIR ${MYSQL_CONNECTOR_LIBRARY_DIR} PARENT_SCOPE)
|
||||||
|
|
||||||
# list all the hiredis libraries
|
# list all the mysql libraries
|
||||||
file(GLOB MYSQL_CONNECTOR_INSTALL_DEPENDENCIES "${MYSQL_CONNECTOR_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}mysqlcppconn*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
|
file(GLOB MYSQL_CONNECTOR_INSTALL_DEPENDENCIES "${MYSQL_CONNECTOR_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}mysqlcppconn${CMAKE_SHARED_LIBRARY_SUFFIX}*")
|
||||||
list (APPEND CAMERADAR_INSTALL_DEPENDENCIES ${MYSQL_CONNECTOR_INSTALL_DEPENDENCIES})
|
list (APPEND CAMERADAR_INSTALL_DEPENDENCIES ${MYSQL_CONNECTOR_INSTALL_DEPENDENCIES})
|
||||||
|
|
||||||
set(CAMERADAR_INSTALL_DEPENDENCIES ${CAMERADAR_INSTALL_DEPENDENCIES} PARENT_SCOPE)
|
set(CAMERADAR_INSTALL_DEPENDENCIES ${CAMERADAR_INSTALL_DEPENDENCIES} PARENT_SCOPE)
|
||||||
|
|||||||
@@ -10,18 +10,16 @@ COL_MAGENTA=$ESC_SEQ"35;01m"
|
|||||||
COL_CYAN=$ESC_SEQ"36;01m"
|
COL_CYAN=$ESC_SEQ"36;01m"
|
||||||
|
|
||||||
echo -e $COL_YELLOW"Deleting old package ... "$COL_RESET
|
echo -e $COL_YELLOW"Deleting old package ... "$COL_RESET
|
||||||
rm -f cameradar_*_Release_Linux.tar.gz
|
rm -f cameradar_*_${1:-"Release"}_Linux.tar.gz
|
||||||
echo -e $COL_GREEN"OK!"$COL_RESET
|
echo -e $COL_GREEN"OK!"$COL_RESET
|
||||||
|
|
||||||
echo -e $COL_YELLOW"Creating package ... "$COL_RESET
|
echo -e $COL_YELLOW"Creating package ... "$COL_RESET
|
||||||
{
|
|
||||||
cd ..
|
cd ..
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
rm -f cameradar_*_Release_Linux.tar.gz
|
rm -f cameradar_*_${1:-"Release"}_Linux.tar.gz
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
cmake .. -DCMAKE_BUILD_TYPE=${1:-"Release"}
|
||||||
make package
|
make package
|
||||||
cp cameradar_*_Release_Linux.tar.gz ../deployment
|
cp cameradar_*_${1:-"Release"}_Linux.tar.gz ../deployment
|
||||||
cd ../deployment
|
cd ../deployment
|
||||||
} &> /dev/null
|
|
||||||
echo -e $COL_GREEN"OK!"$COL_RESET
|
echo -e $COL_GREEN"OK!"$COL_RESET
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -21,8 +21,21 @@ for arg; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$CACHE_MANAGER" == "" ]; then
|
||||||
|
export CACHE_MANAGER="dumb"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CAMERAS_SUBNETWORKS" == "" ]; then
|
||||||
|
export CAMERAS_SUBNETWORKS="0.0.0.0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CAMERAS_PORTS" == "" ]; then
|
||||||
|
export CAMERAS_PORTS="554,8554"
|
||||||
|
fi
|
||||||
|
|
||||||
envsubst < /cameradar/conf/cameradar.tmpl.conf.json > /cameradar/conf/cameradar.conf.json
|
envsubst < /cameradar/conf/cameradar.tmpl.conf.json > /cameradar/conf/cameradar.conf.json
|
||||||
|
|
||||||
|
|
||||||
if [ "$CACHE_MANAGER" == "mysql" ] && [ "$1" = '/cameradar/bin/cameradar' -a -z "$wantHelp" ]; then
|
if [ "$CACHE_MANAGER" == "mysql" ] && [ "$1" = '/cameradar/bin/cameradar' -a -z "$wantHelp" ]; then
|
||||||
echo -n "Waiting for cameradar-database to be ready..."
|
echo -n "Waiting for cameradar-database to be ready..."
|
||||||
while ! mysqladmin ping -h "cameradar-database" -P3306 --silent; do
|
while ! mysqladmin ping -h "cameradar-database" -P3306 --silent; do
|
||||||
|
|||||||
Reference in New Issue
Block a user