From 3503b580b49152da89b5b817f2968d31751b402d Mon Sep 17 00:00:00 2001 From: cglewis Date: Fri, 3 May 2019 09:31:39 -0700 Subject: [PATCH 1/3] print fields --- poseidon/cli/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/poseidon/cli/cli.py b/poseidon/cli/cli.py index 7a7f2d752..002f40010 100644 --- a/poseidon/cli/cli.py +++ b/poseidon/cli/cli.py @@ -455,6 +455,7 @@ def display_results(self, endpoints, fields, sort_by=0, max_width=0, unique=Fals matrix = sorted(matrix, key=lambda endpoint: endpoint[sort_by]) # swap out field names for header fields_header = [] + print(fields) for field in fields: fields_header.append( self.all_fields[fields_lookup[field.lower()][1]]) From cbf6cab2064319ec7c371e70aee2b465df26928c Mon Sep 17 00:00:00 2001 From: cglewis Date: Fri, 3 May 2019 10:01:08 -0700 Subject: [PATCH 2/3] release v0.5.9 --- .vent_startup.yml | 20 ++++++++-------- CHANGELOG.md | 8 +++++++ Makefile | 48 +++++++++++++++++++------------------- README.md | 2 +- bin/poseidon | 2 +- installers/debian/control | 2 +- installers/debian/postinst | 22 ++++++++--------- 7 files changed, 56 insertions(+), 48 deletions(-) diff --git a/.vent_startup.yml b/.vent_startup.yml index dd037b5de..7e5e64160 100644 --- a/.vent_startup.yml +++ b/.vent_startup.yml @@ -1,41 +1,41 @@ https://github.com/cyberreboot/vent: file_drop: - branch: v0.8.3 + branch: v0.9.0 build: yes start: yes network_tap: - branch: v0.8.3 + branch: v0.9.0 build: yes start: yes rabbitmq: - branch: v0.8.3 + branch: v0.9.0 build: yes start: yes redis: - branch: v0.8.3 + branch: v0.9.0 build: yes start: yes rq_dashboard: - branch: v0.8.3 + branch: v0.9.0 build: yes start: yes rq_worker: - branch: v0.8.3 + branch: v0.9.0 build: yes start: yes settings: instances: 4 syslog: - branch: v0.8.3 + branch: v0.9.0 build: yes start: yes https://github.com/cyberreboot/poseidon: '@': - branch: v0.5.8 + branch: v0.5.9 build: yes start: yes api: - branch: v0.5.8 + branch: v0.5.9 build: yes start: yes https://github.com/cyberreboot/vent-plugins: @@ -50,7 +50,7 @@ https://github.com/cyberreboot/vent-plugins: build: yes https://github.com/cyberreboot/crviz: '@': - branch: v0.2.10 + branch: v0.2.11 build: yes start: yes https://github.com/cyberreboot/poseidonml: diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d27a45d5..b90cf39b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# v0.5.9 (2019-05-03) + + - Packaged new version of components, including CRviz v0.2.11 and vent v0.9.0 + - Add support for Ubuntu Disco and removed support for Ubuntu Trusty + - Cleanup documentation + - Updated version of pip, cmd2, falcon, mock, and pytest-cov + - Add new `show version` option in the CLI + # v0.5.8 (2019-04-19) - Packaged new versions of components, including poseidonml v0.3.1 and vent v0.8.3 diff --git a/Makefile b/Makefile index cd528270d..973345a0b 100644 --- a/Makefile +++ b/Makefile @@ -33,36 +33,36 @@ build_debian: cp .vent_startup.yml installers/debian/$(TAG)-$(VERSION)/opt/poseidon/ cp -R .git installers/debian/$(TAG)-$(VERSION)/opt/poseidon/ cp -R bin/* installers/debian/$(TAG)-$(VERSION)/usr/bin/ - docker pull cyberreboot/vent:v0.8.3 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent.tar cyberreboot/vent:v0.8.3 - docker pull cyberreboot/vent-file-drop:v0.8.3 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-file-drop.tar cyberreboot/vent-file-drop:v0.8.3 - docker pull cyberreboot/vent-network-tap:v0.8.3 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-network-tap.tar cyberreboot/vent-network-tap:v0.8.3 - docker pull cyberreboot/vent-rabbitmq:v0.8.3 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-rabbitmq.tar cyberreboot/vent-rabbitmq:v0.8.3 - docker pull cyberreboot/vent-redis:v0.8.3 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-redis.tar cyberreboot/vent-redis:v0.8.3 - docker pull cyberreboot/vent-rq-dashboard:v0.8.3 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-rq-dashboard.tar cyberreboot/vent-rq-dashboard:v0.8.3 - docker pull cyberreboot/vent-rq-worker:v0.8.3 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-rq-worker.tar cyberreboot/vent-rq-worker:v0.8.3 - docker pull cyberreboot/vent-syslog:v0.8.3 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-syslog.tar cyberreboot/vent-syslog:v0.8.3 - docker pull cyberreboot/poseidon-api:v0.5.8 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-poseidon-api.tar cyberreboot/poseidon-api:v0.5.8 + docker pull cyberreboot/vent:v0.9.0 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent.tar cyberreboot/vent:v0.9.0 + docker pull cyberreboot/vent-file-drop:v0.9.0 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-file-drop.tar cyberreboot/vent-file-drop:v0.9.0 + docker pull cyberreboot/vent-network-tap:v0.9.0 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-network-tap.tar cyberreboot/vent-network-tap:v0.9.0 + docker pull cyberreboot/vent-rabbitmq:v0.9.0 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-rabbitmq.tar cyberreboot/vent-rabbitmq:v0.9.0 + docker pull cyberreboot/vent-redis:v0.9.0 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-redis.tar cyberreboot/vent-redis:v0.9.0 + docker pull cyberreboot/vent-rq-dashboard:v0.9.0 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-rq-dashboard.tar cyberreboot/vent-rq-dashboard:v0.9.0 + docker pull cyberreboot/vent-rq-worker:v0.9.0 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-rq-worker.tar cyberreboot/vent-rq-worker:v0.9.0 + docker pull cyberreboot/vent-syslog:v0.9.0 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-syslog.tar cyberreboot/vent-syslog:v0.9.0 + docker pull cyberreboot/poseidon-api:v0.5.9 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-poseidon-api.tar cyberreboot/poseidon-api:v0.5.9 docker pull cyberreboot/vent-plugins-pcap-to-node-pcap:v0.1.1 docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-plugins-pcap-to-node-pcap.tar cyberreboot/vent-plugins-pcap-to-node-pcap:v0.1.1 docker pull cyberreboot/vent-plugins-p0f:v0.1.1 docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-plugins-p0f.tar cyberreboot/vent-plugins-p0f:v0.1.1 docker pull cyberreboot/vent-plugins-tcprewrite-dot1q:v0.1.1 docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent-plugins-tcprewrite-dot1q.tar cyberreboot/vent-plugins-tcprewrite-dot1q:v0.1.1 - docker pull cyberreboot/crviz:v0.2.10 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-crviz.tar cyberreboot/crviz:v0.2.10 + docker pull cyberreboot/crviz:v0.2.11 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-crviz.tar cyberreboot/crviz:v0.2.11 docker pull cyberreboot/poseidonml:v0.3.1 docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-poseidonml.tar cyberreboot/poseidonml:v0.3.1 - docker pull cyberreboot/poseidon:v0.5.8 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-poseidon.tar cyberreboot/poseidon:v0.5.8 + docker pull cyberreboot/poseidon:v0.5.9 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-poseidon.tar cyberreboot/poseidon:v0.5.9 mkdir -p dist docker build -t poseidon-dpkg -f Dockerfile.dpkg . docker run --rm poseidon-dpkg > dist/$(TAG)-$(VERSION).deb @@ -89,8 +89,8 @@ build_debian_net: cp .vent_startup.yml installers/debian/$(TAG)-$(VERSION)/opt/poseidon/ cp -R .git installers/debian/$(TAG)-$(VERSION)/opt/poseidon/ cp -R bin/* installers/debian/$(TAG)-$(VERSION)/usr/bin/ - docker pull cyberreboot/vent:v0.8.3 - docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent.tar cyberreboot/vent:v0.8.3 + docker pull cyberreboot/vent:v0.9.0 + docker save -o installers/debian/$(TAG)-$(VERSION)/opt/poseidon/dist/cyberreboot-vent.tar cyberreboot/vent:v0.9.0 mkdir -p dist docker build -t poseidon-dpkg --build-arg PKG_NAME=poseidon-net -f Dockerfile.dpkg . docker run --rm poseidon-dpkg > dist/$(TAG)-$(VERSION)-net.deb diff --git a/README.md b/README.md index b8c19e524..d7a81520e 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ NEW: If you have used the .DEB installer previously, it is worth noting that Pos After installation you'll have a new command `poseidon` available for looking at the status, logs, changing the configuration, or stopping and starting the service. ``` $ poseidon help -Poseidon 0.5.8, an application that leverages software defined networks (SDN) to acquire and then feed network traffic to a number of machine learning techniques. For more info visit: https://github.com/CyberReboot/poseidon +Poseidon 0.5.9, an application that leverages software defined networks (SDN) to acquire and then feed network traffic to a number of machine learning techniques. For more info visit: https://github.com/CyberReboot/poseidon Usage: poseidon [option] Options: diff --git a/bin/poseidon b/bin/poseidon index 9bdd77530..bd2d4d375 100755 --- a/bin/poseidon +++ b/bin/poseidon @@ -134,7 +134,7 @@ function check_args() echo "Checking volumes..." check_files echo "Starting Poseidon..." - docker run -dit --rm -v /var/run/docker.sock:/var/run/docker.sock -v /opt/vent_files:/opt/vent_files -v /opt/poseidon/.plugin_config.yml:/root/.plugin_config.yml -v /opt/poseidon/.vent_startup.yml:/root/.vent_startup.yml --env-file /etc/poseidon/default.conf --name vent cyberreboot/vent:v0.8.3 + docker run -dit --rm -v /var/run/docker.sock:/var/run/docker.sock -v /opt/vent_files:/opt/vent_files -v /opt/poseidon/.plugin_config.yml:/root/.plugin_config.yml -v /opt/poseidon/.vent_startup.yml:/root/.vent_startup.yml --env-file /etc/poseidon/default.conf --name vent cyberreboot/vent:v0.9.0 until [ "$(docker ps -q -f name=-poseidon-)" ] && [ "$(docker ps -q -f name=-poseidon- | head -1 | xargs docker container inspect -f \{\{.State.Health.Status\}\})" = "healthy" ] do # TODO do more checks and be verbose in here diff --git a/installers/debian/control b/installers/debian/control index b6bc892f0..af489f7c6 100644 --- a/installers/debian/control +++ b/installers/debian/control @@ -1,5 +1,5 @@ Package: poseidon -Version: 0.5.9.dev +Version: 0.5.9 Section: base Priority: optional Architecture: all diff --git a/installers/debian/postinst b/installers/debian/postinst index 5e613660a..fea709495 100755 --- a/installers/debian/postinst +++ b/installers/debian/postinst @@ -222,47 +222,47 @@ if db_go; then # load or pull required images if [ ! -f /opt/poseidon/dist/cyberreboot-vent.tar ]; then - docker pull cyberreboot/vent:v0.8.3 + docker pull cyberreboot/vent:v0.9.0 else docker load -i /opt/poseidon/dist/cyberreboot-vent.tar fi if [ ! -f /opt/poseidon/dist/cyberreboot-vent-file-drop.tar ]; then - docker pull cyberreboot/vent-file-drop:v0.8.3 + docker pull cyberreboot/vent-file-drop:v0.9.0 else docker load -i /opt/poseidon/dist/cyberreboot-vent-file-drop.tar fi if [ ! -f /opt/poseidon/dist/cyberreboot-vent-network-tap.tar ]; then - docker pull cyberreboot/vent-network-tap:v0.8.3 + docker pull cyberreboot/vent-network-tap:v0.9.0 else docker load -i /opt/poseidon/dist/cyberreboot-vent-network-tap.tar fi if [ ! -f /opt/poseidon/dist/cyberreboot-vent-rabbitmq.tar ]; then - docker pull cyberreboot/vent-rabbitmq:v0.8.3 + docker pull cyberreboot/vent-rabbitmq:v0.9.0 else docker load -i /opt/poseidon/dist/cyberreboot-vent-rabbitmq.tar fi if [ ! -f /opt/poseidon/dist/cyberreboot-vent-redis.tar ]; then - docker pull cyberreboot/vent-redis:v0.8.3 + docker pull cyberreboot/vent-redis:v0.9.0 else docker load -i /opt/poseidon/dist/cyberreboot-vent-redis.tar fi if [ ! -f /opt/poseidon/dist/cyberreboot-vent-rq-dashboard.tar ]; then - docker pull cyberreboot/vent-rq-dashboard:v0.8.3 + docker pull cyberreboot/vent-rq-dashboard:v0.9.0 else docker load -i /opt/poseidon/dist/cyberreboot-vent-rq-dashboard.tar fi if [ ! -f /opt/poseidon/dist/cyberreboot-vent-rq-worker.tar ]; then - docker pull cyberreboot/vent-rq-worker:v0.8.3 + docker pull cyberreboot/vent-rq-worker:v0.9.0 else docker load -i /opt/poseidon/dist/cyberreboot-vent-rq-worker.tar fi if [ ! -f /opt/poseidon/dist/cyberreboot-vent-syslog.tar ]; then - docker pull cyberreboot/vent-syslog:v0.8.3 + docker pull cyberreboot/vent-syslog:v0.9.0 else docker load -i /opt/poseidon/dist/cyberreboot-vent-syslog.tar fi if [ ! -f /opt/poseidon/dist/cyberreboot-poseidon-api.tar ]; then - docker pull cyberreboot/poseidon-api:v0.5.8 + docker pull cyberreboot/poseidon-api:v0.5.9 else docker load -i /opt/poseidon/dist/cyberreboot-poseidon-api.tar fi @@ -282,7 +282,7 @@ if db_go; then docker load -i /opt/poseidon/dist/cyberreboot-vent-plugins-tcprewrite-dot1q.tar fi if [ ! -f /opt/poseidon/dist/cyberreboot-crviz.tar ]; then - docker pull cyberreboot/crviz:v0.2.10 + docker pull cyberreboot/crviz:v0.2.11 else docker load -i /opt/poseidon/dist/cyberreboot-crviz.tar fi @@ -292,7 +292,7 @@ if db_go; then docker load -i /opt/poseidon/dist/cyberreboot-poseidonml.tar fi if [ ! -f /opt/poseidon/dist/cyberreboot-poseidon.tar ]; then - docker pull cyberreboot/poseidon:v0.5.8 + docker pull cyberreboot/poseidon:v0.5.9 else docker load -i /opt/poseidon/dist/cyberreboot-poseidon.tar fi From 6792bbe7d80e4715c9b90442a781a973a595183b Mon Sep 17 00:00:00 2001 From: cglewis Date: Fri, 3 May 2019 10:02:13 -0700 Subject: [PATCH 3/3] don't print fields --- poseidon/cli/cli.py | 1 - 1 file changed, 1 deletion(-) diff --git a/poseidon/cli/cli.py b/poseidon/cli/cli.py index 002f40010..7a7f2d752 100644 --- a/poseidon/cli/cli.py +++ b/poseidon/cli/cli.py @@ -455,7 +455,6 @@ def display_results(self, endpoints, fields, sort_by=0, max_width=0, unique=Fals matrix = sorted(matrix, key=lambda endpoint: endpoint[sort_by]) # swap out field names for header fields_header = [] - print(fields) for field in fields: fields_header.append( self.all_fields[fields_lookup[field.lower()][1]])