Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/topic/robin/start-versioning'
Browse files Browse the repository at this point in the history
* origin/topic/robin/start-versioning:
  Starting CHANGES.
  Fix test depending on agent version.
  Update README.
  Automatically publish releases for tags.
  • Loading branch information
rsmmr committed Feb 15, 2022
2 parents 2bff2d0 + 40a98cd commit ac23a6e
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 62 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-and-test
name: CI pipeline

on: push

Expand Down Expand Up @@ -201,7 +201,6 @@ jobs:
release_source:
runs-on: ubuntu-latest
environment: ${{ github.ref_name == 'main' && 'release' || '' }}
if: github.ref_name == 'main'

steps:
- name: Prepare
Expand All @@ -227,3 +226,35 @@ jobs:
with:
name: ${{env.ZA_TGZ}}
path: build/dist/${{env.ZA_TGZ}}

publish_release:
runs-on: ubuntu-latest
if: startsWith(github.ref_name, 'v')
needs: [debug_ubuntu_latest, release_alpine_3_15_static, release_macos_11, release_source]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive

- name: Prepare release message
run: |
cat CHANGES | awk '/^[0-9]+\./{ n++; next; } n < 2 { print }' >${{ runner.temp }}/release-msg
- uses: actions/download-artifact@v2
with:
path: artifacts

- name: Display artifacts
run: ls -al artifacts/*/*

- name: Upload artifacts
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
prerelease: true
body_path: ${{ runner.temp }}/release-msg
files: |
artifacts/*/*.tar.gz
1 change: 1 addition & 0 deletions .update-changes.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
show_authors=0
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2.0.0 | 2022-02-14 16:14:48 +0100

* Initial release.
82 changes: 31 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,16 @@ older implementations (see the [history](#history)). It remains
experimental and in development for now, but we're working on making
it stable. We are interested in any feedback you may have.


#### Contents
<!-- begin table of contents -->
- [Getting Started](#getting-started)
- [Zeek Agent](#zeek-agent)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Zeek Package](#zeek-package)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Getting in Touch](#getting-in-touch)
- [Zeek API](#zeek-api)
- [Interactive Usage](#interactive-usage)
- [Table Reference](#table-reference)
- [Caveats](#caveats)
- [Versioning](#versioning)
- [Status](#status)
- [Getting in Touch](#getting-in-touch)
- [License](#license)
- [History](#history)
<!-- end table of contents -->
Expand All @@ -57,35 +49,30 @@ it stable. We are interested in any feedback you may have.
system libraries. (Individual tables may not be available if they
don't find on the system what they need.)

#### Installation

- **Linux**: We are providing a static binary that should work on most
systems.
#### Download & Installation

- Download [Zeek Agent for
Linux](https://nightly.link/zeek/zeek-agent-v2/workflows/main/main/zeek-agent-2.0.0-pre-linux-x86_64.tar.gz.zip?status=completed).
On our [releases
page](https://github.com/zeek/zeek-agent-v2/releases), you will find
pre-built agent versions for:

- **macOS**: We are providing a signed binary that works on Big Sur and newer.
- **Linux**: We are providing static binaries that work on all recent
x86_64 systems.

- Download [Zeek Agent for macOS](https://nightly.link/zeek/zeek-agent-v2/workflows/main/main/zeek-agent-2.0.0-pre-macos11.tar.gz.zip?status=completed).
- **macOS**: We are providing signed binaries that work on Big Sur and newer.

- **Build yourself**:
To build the agent yourself, download the source distribution for the
current release, or clone the code directly from git (make sure to include
submodules through `--recursive`). Then run:

- Download [Zeek Agent source
code](https://nightly.link/zeek/zeek-agent-v2/workflows/main/main/zeek-agent-2.0.0-pre.tar.gz.zip?status=completed). You can also get it directly from git, of course.

To build from source, use:

```
# ./configure [<options>] && make -j 4 && make test && make install
```

Selected `configure` options:
Selected `configure` options (see `--help` for more):

- `--prefix=<path>`: installation prefix
- `--with-openssl=<path>`: path to OpenSSL installation.

On macOS with Homebrew, use `--with-openssl={/usr/local,/opt/homebrew}/opt/openssl@1.1`
On macOS with Homebrew, use `--with-openssl={/usr/local,/opt/homebrew}/opt/openssl@1.1`

#### Usage

Expand Down Expand Up @@ -134,17 +121,6 @@ You should now see new log files recording endpoint activity:

You will also find a new `zeek-agent.log` tracking agent connectivity.

## Getting in Touch

Having trouble using the agent? Have ideas how to make the agent
better? We'd like to hear from you!

- Report problems on the [GitHub issue
tracker](https://github.com/zeek/zeek-agent-v2/issues).

- Ask the `#zeek-agent` channel [on Zeek's
Slack](https://zeek.org/connect).

## Zeek API

[More to come here.]
Expand Down Expand Up @@ -345,29 +321,33 @@ Agent process and the endpoint it's running on.

<!-- end table reference -->

## Caveats
## Status

- The supply of tables and Zeek logs is currently limited; we are
planning to add more in the future.
- The agent remains experimental for now, and APIs and table schemas
are still evolving. Specifics may still change without much notice.

- The supply of tables and Zeek logs is still limited; we are
planning to add more in the future (contributions welcome!).

- Currently, most data is collected in regular intervals only, meaning
that short-lived activity happening between the agent’s regular
snapshots might be missed (e.g., a process terminating quickly after
it started up). The agent’s internal infrastructure supports “event
tables” that don’t have that limitation, and we plan to make more
use of that in the future. Doing so typically requires usage of
it started up). The agent’s internal infrastructure already supports
“event tables” that don’t have that limitation, and we plan to make
more use of that in the future. Doing so typically requires usage of
OS-specific APIs, which makes these tables more complex to
implement.

## Versioning
## Getting in Touch

We do not provide stable/tagged releases yet, there’s just a `main`
branch in Git; binaries are cut from there. We also still commit
directly to `main`, so things may occasionally break for a little
while. APIs and table schemas are still evolving as well and may
change without much notice.
Having trouble using the agent? Have ideas how to make the agent
better? We'd like to hear from you!

- Report problems on the [GitHub issue
tracker](https://github.com/zeek/zeek-agent-v2/issues).

We will move to more stable processes as the agent matures.
- Ask the `#zeek-agent` channel [on Zeek's
Slack](https://zeek.org/connect).

## License

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0-pre
2.0.0
2 changes: 1 addition & 1 deletion auxil/md-to-toc
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ function fmt_entry(prefix, line) {
/^#.* Contents/ { next; }
/^## / { fmt_entry("-", $0); }
/^### / { fmt_entry(" -", $0); }
/^#### / { fmt_entry(" -", $0); }
#/^#### / { fmt_entry(" -", $0); }
'
2 changes: 1 addition & 1 deletion packaging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CPACK_PACKAGE_VERSION_MINOR "${ZEEK_AGENT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${ZEEK_AGENT_VERSION_PATCH}")
set(CPACK_SET_DESTDIR no)
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "zeek-agent-${ZEEK_AGENT_VERSION}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "zeek-agent-${ZEEK_AGENT_VERSION}-source")
set(CPACK_SOURCE_IGNORE_FILES "build[^/]*/;\.cache/;\.clangd;\.git;compile_commands.json;tmp/;\.swp$;\.pyc$;")

if ( HAVE_DARWIN )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
Hurz, [version=20000]
Hurz, [version=<version>]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
got result:, [id=<uuid>, version=20000]
got result:, [id=<uuid>, version=20000]
got result:, [id=<uuid>, version=<version>]
got result:, [id=<uuid>, version=<version>]
terminating soon - there should not be another 'got result' after this
3 changes: 2 additions & 1 deletion tests/zeek/query.zeek
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# @TEST-EXEC: btest-bg-run zeek zeek ${FRAMEWORK} %INPUT
# @TEST-EXEC: btest-bg-run agent zeek-agent -c ${CONFIG} -L info -N -z localhost:${ZEEK_PORT}
# @TEST-EXEC: btest-bg-wait 20
# @TEST-EXEC: btest-diff zeek/.stdout
# @TEST-EXEC: cat zeek/.stdout | sed 's/version=[0-9]\{1,\}/version=<version>/g' >zeek/output
# @TEST-EXEC: btest-diff zeek/output

@if ( getenv("ZEEK_PORT") != "" )
redef Broker::default_port = to_port(getenv("ZEEK_PORT"));
Expand Down
3 changes: 2 additions & 1 deletion tests/zeek/scheduled.zeek
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# @TEST-EXEC: btest-bg-run zeek zeek ${FRAMEWORK} %INPUT
# @TEST-EXEC: btest-bg-run agent zeek-agent -c ${CONFIG} -L info -N -z localhost:${ZEEK_PORT} >output
# @TEST-EXEC: btest-bg-wait 20
# @TEST-EXEC: btest-diff zeek/.stdout
# @TEST-EXEC: cat zeek/.stdout | sed 's/version=[0-9]\{1,\}/version=<version>/g' >zeek/output
# @TEST-EXEC: btest-diff zeek/output

@if ( getenv("ZEEK_PORT") != "" )
redef Broker::default_port = to_port(getenv("ZEEK_PORT"));
Expand Down
2 changes: 1 addition & 1 deletion zeek-agent
Submodule zeek-agent updated 2 files
+3 −0 CHANGES
+1 −0 VERSION

0 comments on commit ac23a6e

Please sign in to comment.