Skip to content

Commit

Permalink
Merge pull request #65 from netfoundry/v0.8.9-release-candidate
Browse files Browse the repository at this point in the history
V0.8.9 release candidate
  • Loading branch information
r-caamano authored Jul 28, 2024
2 parents 7f81af2 + 0cf1f4d commit 4ef220a
Show file tree
Hide file tree
Showing 8 changed files with 181 additions and 80 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get upgrade -yqq
sudo apt-get install -y jq gcc clang libbpfcc-dev libbpf-dev libjson-c-dev alien
sudo apt-get install -y jq gcc clang libbpfcc-dev libbpf-dev libjson-c-dev
sudo apt-get install -y linux-headers-$(uname -r)
- name: Compile Object file from Source
Expand Down Expand Up @@ -230,20 +230,9 @@ jobs:
- name: Build deb package
run: |
dpkg-deb --build -Z gzip --root-owner-group ${{ steps.deb_dir.outputs.deb_dir }}
- name: Build rpm package
run: |
sudo alien -r ${{ steps.deb_dir.outputs.deb_dir }}.deb
mv ${{ env.APP_NAME }}-${{ matrix.ziti_type }}-${{ steps.version.outputs.version }}-2.${{ matrix.goarch }}.rpm ${{ env.APP_NAME }}-${{ matrix.ziti_type }}-${{ steps.version.outputs.version }}.${{ matrix.goarch }}.rpm
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.ziti_type }}-${{ matrix.goarch }}-deb
path: |
./*.deb
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.ziti_type }}-${{ matrix.goarch }}-rpm
path: |
./*.rpm
31 changes: 9 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get upgrade -yqq
sudo apt-get install -y jq gcc clang libbpfcc-dev libbpf-dev libjson-c-dev alien
sudo apt-get install -y jq gcc clang libbpfcc-dev libbpf-dev libjson-c-dev
sudo apt-get install -y linux-headers-$(uname -r)
- name: Compile Object file from Source
Expand Down Expand Up @@ -231,23 +231,12 @@ jobs:
- name: Build deb package
run: |
dpkg-deb --build -Z gzip --root-owner-group ${{ steps.deb_dir.outputs.deb_dir }}
- name: Build rpm package
run: |
sudo alien -r ${{ steps.deb_dir.outputs.deb_dir }}.deb
mv ${{ env.APP_NAME }}-${{ matrix.ziti_type }}-${{ steps.version.outputs.version }}-2.${{ matrix.goarch }}.rpm ${{ env.APP_NAME }}-${{ matrix.ziti_type }}-${{ steps.version.outputs.version }}.${{ matrix.goarch }}.rpm
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.ziti_type }}-${{ matrix.goarch }}-deb
path: |
./*.deb
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.ziti_type }}-${{ matrix.goarch }}-rpm
path: |
./*.rpm
deploy_release:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -281,7 +270,14 @@ jobs:
goarch: [amd64, arm64]
pkg_type: [deb, rpm]
steps:
- uses: actions/download-artifact@v4
- name: download x86 artifacts
if: ${{ (matrix.goarch == 'amd64') && ((matrix.pkg_type != 'deb') || (matrix.pkg_type != 'rpm')) }}
uses: actions/download-artifact@v4
with:
name: artifact-${{ matrix.ziti_type }}-${{ matrix.goarch }}-${{ matrix.pkg_type }}
- name: download arm64 artifacts
if: ${{ (matrix.goarch == 'arm64') && (matrix.pkg_type == 'deb') }}
uses: actions/download-artifact@v4
with:
name: artifact-${{ matrix.ziti_type }}-${{ matrix.goarch }}-${{ matrix.pkg_type }}
- name: Upload built deb artifacts
Expand All @@ -302,12 +298,3 @@ jobs:
file: ./${{ env.APP_NAME }}-${{ matrix.ziti_type }}-${{ needs.build_amd64_release.outputs.version }}.x86_64.${{ matrix.pkg_type }}
release_name: ${{ needs.build_amd64_release.outputs.version }}
tag: v${{ needs.build_amd64_release.outputs.version }}
- name: Upload built arm64 rpm artifacts
if: ${{ (matrix.pkg_type == 'rpm') && (matrix.goarch == 'arm64') }}
uses: svenstaro/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
file: ./${{ env.APP_NAME }}-${{ matrix.ziti_type }}-${{ needs.build_amd64_release.outputs.version }}.${{ matrix.goarch }}.${{ matrix.pkg_type }}
release_name: ${{ needs.build_amd64_release.outputs.version }}
tag: v${{ needs.build_amd64_release.outputs.version }}
33 changes: 15 additions & 18 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Build from source
---
- OS/Platform: Ubuntu 22.04 / amd64
- OS/Platform: Ubuntu 22.04+ / amd64
1. install libraries

**Ubuntu 22.04 server / amd64** (kernel 5.15 or higher)
Expand All @@ -12,18 +12,8 @@
sudo apt install -y gcc clang libc6-dev-i386 libbpfcc-dev libbpf-dev libjson-c-dev make
```

1. Compile:

```bash
mkdir ~/repos
cd repos
git clone https://github.com/netfoundry/zfw.git
cd zfw/src
make all
sudo make install ARGS=<router|tunnel>
```

- OS/Platform: Ubuntu 22.04 / arm64
- OS/Platform: Ubuntu 22.04+ / arm64
1. install libraries

**Ubuntu 22.04 server / arm** (kernel 5.15 or higher)
Expand All @@ -35,16 +25,23 @@
sudo apt-get install -y gcc clang libbpfcc-dev libbpf-dev libjson-c-dev make
```

1. Compile:
- OS/Platform: RH 9.4 / x86_64
1. install libraries

```bash
sudo yum update
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
sudo yum install -y clang bcc-devel libbpf-devel iproute-devel iproute-tc glibc-devel.i686 git json-c-devel
```

- Build
1. compile binaries
```bash
mkdir ~/repos
cd repos
git clone https://github.com/netfoundry/zfw.git
git clone https://github.com/netfoundry/zfw.git
cd zfw/src
make all
sudo make install ARGS=<router|tunnel>
```



```
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

---
###
# [0.8.9] - 2024-07-28

- Removed arm64 rpm package build for RH from workflows
- updated BUILD.md with info on x86_64 RH build prerequisites
- Fixed issue with -F, --flush introduced when adding flush for all, ingress and egress
- Updated start_ebpf_router.py and start_ebpf_tunnel.py to only clear ingress filters on restart.

###
# [0.8.8] - 2024-07-24

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ The program is designed to integrated into an existing Openziti ziti-router inst
```
sudo dpkg -i zfw-router_<ver>_<arch>.deb
```
Install from source ubuntu 22.04+ / Debian 12
Install from source ubuntu 22.04+ / Debian 12 / Redhat 9.4
[build / install zfw from source](./BUILD.md)

**The following instructions pertain to both zfw-tunnel and zfw-router. Platform specific functions will be noted explicitly**
Expand Down
2 changes: 1 addition & 1 deletion files/scripts/start_ebpf_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def set_local_rules(resolver):
os.system("/opt/openziti/bin/user/user_rules.sh")
else:
print("ebpf already running!");
os.system("/usr/sbin/zfw -F -r")
os.system("/usr/sbin/zfw -F -z ingress -r")
print("Flushed Table")
for i in internal_list:
if(not tc_status(i, "ingress")):
Expand Down
2 changes: 1 addition & 1 deletion files/scripts/start_ebpf_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def tc_status(interface, direction):
os.system("/opt/openziti/bin/user/user_rules.sh")
else:
print("ebpf already running!");
os.system("/usr/sbin/zfw -F")
os.system("/usr/sbin/zfw -F -z ingress")
print("Flushed Table")
for i in internal_list:
if(not tc_status(i, "ingress")):
Expand Down
Loading

0 comments on commit 4ef220a

Please sign in to comment.