Skip to content

Commit

Permalink
Removes the parts, which belong into other repositories. Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
bmario committed Apr 24, 2020
1 parent ddaee5d commit fc9007c
Show file tree
Hide file tree
Showing 37 changed files with 19 additions and 3,689 deletions.
6 changes: 0 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@ build*
cmake-build-*
.idea/

*_pb2.py
metricq.egg-info
.eggs/
__pycache__/
venv/

.DS_STORE
81 changes: 0 additions & 81 deletions .github/workflows/pythonpackage.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "lib/date"]
path = lib/date
url = https://github.com/HowardHinnant/date.git
[submodule "lib/metricq-protobuf"]
path = lib/metricq-protobuf
url = https://github.com/metricq/metricq-protobuf.git
104 changes: 0 additions & 104 deletions .travis.yml

This file was deleted.

34 changes: 13 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ independent code" ${METRICQ_POSITION_INDEPENDENT_CODE})

add_subdirectory(lib)

protobuf_generate_cpp(PROTO_SRC PROTO_HEADER src/datachunk.proto src/history.proto)
add_library(metricq-messages ${PROTO_SRC})
protobuf_generate_cpp(PROTO_SRC PROTO_HEADER lib/metricq-protobuf/datachunk.proto lib/metricq-protobuf/history.proto)
add_library(metricq-protobuf ${PROTO_SRC})
#this is needed to get the generated protobuf files in a sane location : (
add_custom_command(TARGET metricq-messages PRE_BUILD
add_custom_command(TARGET metricq-protobuf PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/include/metricq
COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_HEADER} ${CMAKE_CURRENT_BINARY_DIR}/include/metricq
COMMENT "Copy generated protobuf headers..."
)
target_include_directories(metricq-messages
target_include_directories(metricq-protobuf
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
)
target_link_libraries(metricq-messages PUBLIC protobuf::libprotobuf)
set_target_properties(metricq-messages PROPERTIES
target_link_libraries(metricq-protobuf PUBLIC protobuf::libprotobuf)
set_target_properties(metricq-protobuf PROPERTIES
POSITION_INDEPENDENT_CODE ${METRICQ_POSITION_INDEPENDENT_CODE}
)
target_compile_features(metricq-messages PRIVATE cxx_std_14)
target_compile_features(metricq-protobuf PRIVATE cxx_std_14)

set(CORE_SRCS
src/chrono.cpp
Expand Down Expand Up @@ -65,7 +65,7 @@ target_link_libraries(metricq-core
asio::asio
amqpcpp::amqpcpp
json::json
metricq::messages
metricq::protobuf
PRIVATE
fmt::fmt-header-only
)
Expand Down Expand Up @@ -151,7 +151,7 @@ add_library(metricq::sink ALIAS metricq-sink)
add_library(metricq::transformer ALIAS metricq-transformer)
add_library(metricq::db ALIAS metricq-db)
add_library(metricq::history ALIAS metricq-history)
add_library(metricq::messages ALIAS metricq-messages)
add_library(metricq::protobuf ALIAS metricq-protobuf)


target_compile_options(metricq-core
Expand Down Expand Up @@ -196,7 +196,7 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set_target_properties(metricq-sink PROPERTIES EXPORT_NAME sink)
set_target_properties(metricq-transformer PROPERTIES EXPORT_NAME transformer)
set_target_properties(metricq-db PROPERTIES EXPORT_NAME db)
set_target_properties(metricq-messages PROPERTIES EXPORT_NAME messages)
set_target_properties(metricq-protobuf PROPERTIES EXPORT_NAME messages)

install(
TARGETS
Expand All @@ -207,7 +207,7 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
metricq-transformer
metricq-db
metricq-history
metricq-messages
metricq-protobuf
EXPORT metricqTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down Expand Up @@ -245,18 +245,10 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
if(DOCKER_CMD)
message(STATUS "Docker found. Build metricq images with 'make docker'.")

add_custom_target(docker-python
COMMAND docker build -t metricq-python -f ${CMAKE_SOURCE_DIR}/Dockerfile-python ${CMAKE_SOURCE_DIR}
COMMENT "Building metricq-python docker image"
)

add_custom_target(docker-cxx
COMMAND docker build -t metricq-cxx -f ${CMAKE_SOURCE_DIR}/Dockerfile-cxx ${CMAKE_SOURCE_DIR}
add_custom_target(docker
COMMAND docker build -t metricq-cpp ${CMAKE_SOURCE_DIR}
COMMENT "Building metricq-cxx docker image"
)


add_custom_target(docker DEPENDS docker-python docker-cxx)
else()
message(STATUS "Docker not found. SKIPPING.")
endif()
Expand Down
File renamed without changes.
21 changes: 0 additions & 21 deletions Dockerfile-python

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

42 changes: 2 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,5 @@
![BSD 3-clause](https://img.shields.io/badge/license-BSD%203--clause-blue.svg)
![Python package](https://github.com/metricq/metricq/workflows/Python%20package/badge.svg)
![C++ Interface](https://github.com/metricq/metricq/workflows/C++%20Interface/badge.svg)
![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)
[![PyPI](https://img.shields.io/pypi/v/metricq)](https://pypi.org/project/metricq/)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/metricq)
![C++ Interface](https://github.com/metricq/metricq-cpp/workflows/C++%20Interface/badge.svg)
# metricq

## Setup development environemt with ```docker-compose```

Just run:

```
docker-compose -f docker-compose-development.yml up
```

This will setup:

- [Grafana Server](http://localhost:4000) (port 3000 forwarded to localhost:4000)
- [CouchDB server](http://localhost:5984) (port 5984 forwarded to localhost)
- [RabbitMQ server](http://localhost:15672/) (port 5672 and 15672 forwarded to localhost)
- [wizard frontend](http://localhost:3000/wizard/) (port 3000 forwarded to localhost)
- wizard backend (port 8000 forwarded to localhost)
- manager
- metricq-grafana (port 4000 forwarded to localhost:3001)

To run it in the background append ```-d```:

```
docker-compose -f docker-compose-development.yml up -d
```

To stop everything run:

```
docker-compose -f docker-compose-development.yml stop
```

To stop and remove everything run

```
docker-compose -f docker-compose-development.yml down
```
The C++ API for [MetricQ](https://github.com/metricq/metricq) agents.
Loading

0 comments on commit fc9007c

Please sign in to comment.