Skip to content

Commit 8760eeb

Browse files
committed
added CI pipeline; setup additional repo information; updated README; added manifest
Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
1 parent 77f53f3 commit 8760eeb

File tree

6 files changed

+228
-1
lines changed

6 files changed

+228
-1
lines changed

.github/workflows/ci.yaml

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
tags:
9+
- '*'
10+
pull_request:
11+
branches:
12+
- master
13+
- dev
14+
types:
15+
- opened
16+
- edited
17+
- reopened
18+
- synchronize
19+
- ready_for_review
20+
- unlocked
21+
- review_requested
22+
workflow_dispatch:
23+
24+
env:
25+
DOCKER_REGISTRY_REPOSITORY: sysflowtelemetry/sf-policymanager
26+
27+
jobs:
28+
lint:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
- name: Setup Python
34+
uses: actions/setup-python@v2
35+
with:
36+
python-version: '3.x'
37+
- name: Install requirements
38+
run: |
39+
python -m pip install --upgrade pip
40+
python -m pip install black unimport safety bandit
41+
- name: Check style
42+
run: black --check -S -l 120 src/
43+
- name: Check imports
44+
run: unimport --check --exclude __init__.py src/
45+
- name: Check package vulnerabilities
46+
run: safety check -r src/requirements.txt
47+
- name: Check code vulnerabilities
48+
run: bandit -r src/
49+
docker:
50+
needs: lint
51+
runs-on: ubuntu-latest
52+
permissions:
53+
contents: read
54+
packages: write
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v2
58+
with:
59+
submodules: true
60+
- name: Docker meta
61+
id: meta
62+
uses: docker/metadata-action@v3
63+
with:
64+
images: |
65+
${{ env.DOCKER_REGISTRY_REPOSITORY }}
66+
ghcr.io/${{ github.repository }}
67+
tags: |
68+
type=edge,branch=master
69+
type=ref,event=branch
70+
type=ref,event=tag
71+
type=ref,event=pr
72+
labels: |
73+
org.opencontainers.image.documentation=https://sysflow.readthedocs.io/
74+
org.opencontainers.image.vendor=SysFlow
75+
- name: Set up QEMU
76+
uses: docker/setup-qemu-action@v1
77+
- name: Set up Docker Buildx
78+
uses: docker/setup-buildx-action@v1
79+
- name: Login to DockerHub
80+
uses: docker/#-action@v1
81+
if: ${{ github.event_name != 'pull_request' }}
82+
with:
83+
username: ${{ secrets.DOCKERHUB_USERNAME }}
84+
password: ${{ secrets.DOCKERHUB_TOKEN }}
85+
- name: Login to GitHub Container Registry
86+
uses: docker/#-action@v1
87+
if: ${{ github.event_name != 'pull_request' }}
88+
with:
89+
registry: ghcr.io
90+
username: ${{ github.repository_owner }}
91+
password: ${{ secrets.GITHUB_TOKEN }}
92+
- name: Set build args
93+
id: args
94+
shell: bash
95+
run: |
96+
echo "##[set-output name=ubi_version;]$(awk -F'=' '/UBI_VERSION/{print $2}' makefile.manifest.inc)"
97+
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/*/})"
98+
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
99+
- name: Build and push
100+
id: docker_build
101+
uses: docker/build-push-action@v2
102+
with:
103+
push: ${{ github.event_name != 'pull_request' }}
104+
tags: "${{ steps.meta.outputs.tags }}"
105+
labels: "${{ steps.meta.outputs.labels }}"
106+
build-args: |
107+
VERSION=${{ steps.args.outputs.branch }}
108+
RELEASE=${{ steps.args.outputs.sha_short }}
109+
UBI_VER=${{ steps.args.outputs.ubi_version }}
110+
- name: push README to Dockerhub
111+
uses: christian-korneck/update-container-description-action@v1
112+
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
113+
env:
114+
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
115+
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
116+
with:
117+
destination_container_repo: ${{ env.DOCKER_REGISTRY_REPOSITORY }}
118+
provider: dockerhub
119+
readme_file: "README.md"
120+
- name: Image digest
121+
run: echo ${{ steps.docker_build.outputs.digest }}

CHANGELOG.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
6+
7+
> **Types of changes:**
8+
>
9+
> - **Added**: for new features.
10+
> - **Changed**: for changes in existing functionality.
11+
> - **Deprecated**: for soon-to-be removed features.
12+
> - **Removed**: for now removed features.
13+
> - **Fixed**: for any bug fixes.
14+
> - **Security**: in case of vulnerabilities.
15+
16+
## [[UNRELEASED](https://github.com/sysflow-telemetry/sf-policymanager/compare/0.3.0-rc2...HEAD)]
17+
18+
## [0.3.0-rc2] - 2021-07-23
19+
20+
### Added
21+
22+
- First release candidate.

MAINTAINERS.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# MAINTAINERS
2+
3+
Frederico Araujo
4+
5+
Teryl Taylor

Makefile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (C) 2020 IBM Corporation.
3+
#
4+
# Authors:
5+
# Frederico Araujo <frederico.araujo@ibm.com>
6+
# Teryl Taylor <terylt@ibm.com>
7+
#
8+
9+
# Build environment configuration
10+
include ./makefile.manifest.inc
11+
12+
.PHONY: all
13+
all: docker-build
14+
15+
.PHONY: docker-build
16+
docker-build:
17+
docker build -t sf-policymanager --build-arg UBI_VER=$(UBI_VERSION) -f Dockerfile .

README.md

+52-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
11
# sf-policymanager
2-
SysFlow operator for managing policies mapped from a git repository
2+
[![Build Status](https://img.shields.io/github/workflow/status/sysflow-telemetry/sf-policymanager/ci)](https://github.com/sysflow-telemetry/sf-policymanager/actions)
3+
[![Docker Pulls](https://img.shields.io/docker/pulls/sysflowtelemetry/sf-policymanager)](https://hub.docker.com/r/sysflowtelemetry/sf-policymanager)
4+
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/sysflow-telemetry/sf-policymanager)
5+
[![Documentation Status](https://readthedocs.org/projects/sysflow/badge/?version=latest)](https://sysflow.readthedocs.io/en/latest/?badge=latest)
6+
[![GitHub](https://img.shields.io/github/license/sysflow-telemetry/sf-policymanager)](https://github.com/sysflow-telemetry/sf-policymanager/blob/master/LICENSE.md)
37

8+
# Supported tags and respective `Dockerfile` links
9+
10+
- [`0.3.0`, `latest`](https://github.com/sysflow-telemetry/sf-policymanager/blob/0.3.0/Dockerfile), [`edge`](https://github.com/sysflow-telemetry/sf-policymanager/blob/master/Dockerfile), [`dev`](https://github.com/sysflow-telemetry/sf-policymanager/blob/dev/Dockerfile)
11+
12+
> Note: This is an experimental utility.
13+
14+
# Quick reference
15+
16+
- **Documentation**:
17+
[the SysFlow Documentation](https://sysflow.readthedocs.io)
18+
19+
- **Where to get help**:
20+
[the SysFlow Community Slack](https://join.slack.com/t/sysflow-telemetry/shared_invite/enQtODA5OTA3NjE0MTAzLTlkMGJlZDQzYTc3MzhjMzUwNDExNmYyNWY0NWIwODNjYmRhYWEwNGU0ZmFkNGQ2NzVmYjYxMWFjYTM1MzA5YWQ)
21+
22+
- **Where to file issues**:
23+
[the github issue tracker](https://github.com/sysflow-telemetry/sysflow/issues) (include the `sf-policymanager` tag)
24+
25+
- **Source of this description**:
26+
[repo's readme](https://github.com/sysflow-telemetry/sf-policymanager/edit/master/README.md) ([history](https://github.com/sysflow-telemetry/sf-policymanager/commits/master))
27+
28+
- **Docker images**:
29+
[docker hub](https://hub.docker.com/u/sysflowtelemetry) | [GHCR](https://github.com/orgs/sysflow-telemetry/packages)
30+
31+
# What is SysFlow?
32+
33+
The SysFlow Telemetry Pipeline is a framework for monitoring cloud workloads and for creating performance and security analytics. The goal of this project is to build all the plumbing required for system telemetry so that users can focus on writing and sharing analytics on a scalable, common open-source platform. The backbone of the telemetry pipeline is a new data format called SysFlow, which lifts raw system event information into an abstraction that describes process behaviors, and their relationships with containers, files, and network. This object-relational format is highly compact, yet it provides broad visibility into container clouds. We have also built several APIs that allow users to process SysFlow with their favorite toolkits. Learn more about SysFlow in the [SysFlow specification document](https://sysflow.readthedocs.io/en/latest/spec.html).
34+
35+
The SysFlow framework consists of the following sub-projects:
36+
37+
- [sf-apis](https://github.com/sysflow-telemetry/sf-apis) provides the SysFlow schema and programatic APIs in go, python, and C++.
38+
- [sf-collector](https://github.com/sysflow-telemetry/sf-collector) monitors and collects system call and event information from hosts and exports them in the SysFlow format using Apache Avro object serialization.
39+
- [sf-processor](https://github.com/sysflow-telemetry/sf-processor) provides a performance optimized policy engine for processing, enriching, filtering SysFlow events, generating alerts, and exporting the processed data to various targets.
40+
- [sf-exporter](https://github.com/sysflow-telemetry/sf-exporter) exports SysFlow traces to S3-compliant storage systems for archival purposes.
41+
- [sf-deployments](https://github.com/sysflow-telemetry/sf-deployments) contains deployment packages for SysFlow, including Docker, Helm, and OpenShift.
42+
- [sysflow](https://github.com/sysflow-telemetry/sysflow) is the documentation repository and issue tracker for the SysFlow framework.
43+
44+
# About This Image
45+
46+
This image packages the SysFlow Policy Manager operator, which manages policies mapped from a git repository for k8s deployments.
47+
48+
# License
49+
50+
View [license information](https://github.com/sysflow-telemetry/sf-policymanager/blob/master/LICENSE.md) for the software contained in this image.
51+
52+
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
53+
54+
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

makefile.manifest.inc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright (C) 2020 IBM Corporation.
3+
#
4+
# Authors:
5+
# Frederico Araujo <frederico.araujo@ibm.com>
6+
# Teryl Taylor <terylt@ibm.com>
7+
#
8+
9+
SYSFLOW_VERSION?=0.3.0
10+
SYSFLOW_BUILD_NUMBER?=1
11+
UBI_VERSION=8.4-205

0 commit comments

Comments
 (0)