From 91efec28e008ee282cec9810cf5ae787d44a5c95 Mon Sep 17 00:00:00 2001 From: Anubhav Rawal Date: Thu, 15 Jan 2026 19:29:35 +0000 Subject: [PATCH 1/4] Update the version number --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index 4a36342..227cea2 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.0.0 +2.0.0 From 22210a304988bc0eec4486246ab939b6684334ff Mon Sep 17 00:00:00 2001 From: Anubhav Rawal Date: Thu, 15 Jan 2026 19:31:39 +0000 Subject: [PATCH 2/4] Fix for fortify redefined error --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e609f4..fee765c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,7 +139,8 @@ string(STRIP "${SEC_TUN_VERSION}" SEC_TUN_VERSION) add_compile_definitions("SEC_TUN_VERSION=\"${SEC_TUN_VERSION}\"") add_compile_definitions(_GNU_SOURCE) -add_compile_definitions($<$>:_FORTIFY_SOURCE=3>) +add_compile_options($<$>:-U_FORTIFY_SOURCE>) +add_compile_options($<$>:-D_FORTIFY_SOURCE=3>) # Coverage flags if(ENABLE_COVERAGE) From 38aee31a8c2e2488d2702290adeec34eb20a2ff6 Mon Sep 17 00:00:00 2001 From: Anubhav Rawal Date: Thu, 15 Jan 2026 19:38:40 +0000 Subject: [PATCH 3/4] Add support for log level for ggl-sdk as well --- .github/workflows/release.yml | 4 ++-- CMakeLists.txt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1376617..368916f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: - name: Build run: | - cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel -DGGL_LOG_LEVEL=INFO + cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel make -C build -j$(nproc) strip build/bin/aws-greengrass-secure-tunnel @@ -82,7 +82,7 @@ jobs: bash -c " apt-get update && \ apt-get install -y build-essential cmake pkg-config git libssl-dev && \ - cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel -DGGL_LOG_LEVEL=INFO && \ + cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel && \ make -C build -j\$(nproc) && \ strip build/bin/aws-greengrass-secure-tunnel " diff --git a/CMakeLists.txt b/CMakeLists.txt index fee765c..61eb548 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,8 @@ cmake_minimum_required(VERSION 3.22) project(aws-greengrass-secure-tunnel C) +set(GG_LOG_LEVEL CACHE STRING "GG log level") + option(ENABLE_WERROR "Compile warnings as errors") option(BUILD_TESTING "Build tests" OFF) option(ENABLE_COVERAGE "Enable code coverage" OFF) @@ -194,6 +196,7 @@ endif() # Fetch gg_sdk string(JSON dep_url GET "${FC_DEPS_JSON}" gg_sdk url) string(JSON dep_rev GET "${FC_DEPS_JSON}" gg_sdk rev) + fetchcontent_declare( gg_sdk GIT_REPOSITORY "${dep_url}" From 948c0a0e0810fb7b27652dc01858fd652a85814b Mon Sep 17 00:00:00 2001 From: Anubhav Rawal Date: Thu, 15 Jan 2026 20:06:24 +0000 Subject: [PATCH 4/4] Update documentation to cover both nucleus --- docs/BUILD.md | 6 ++++-- docs/deployment.md | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/docs/BUILD.md b/docs/BUILD.md index 1143de4..2bc0bb8 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -68,7 +68,7 @@ components │ ├── secure-tunnel │ └── localproxy └── recipes - └── aws.greengrass.SecureTunneling-1.0.0.yaml + └── aws.greengrass.SecureTunneling-2.0.0.yaml ``` ### For cloud deployment @@ -76,11 +76,13 @@ components For Greengrass Cloud deployment, create a zip file with this structure: ``` -aws.greengrass.SecureTunneling-1.0.0.zip +aws.greengrass.SecureTunneling-2.0.0.zip ├── secure-tunnel └── localproxy ``` +and then you can upload the zip to a S3 bucket. + - `secure-tunnel`: Built binary from `./build/bin` - `localproxy`: Binary from [localproxy.md](localproxy.md) - Recipe: Component configuration file diff --git a/docs/deployment.md b/docs/deployment.md index 93016c9..f562ad9 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -43,6 +43,25 @@ Replace `` and `` with your values. ## Local Deployment +### Greengrass Nucleus + +Deploy using greengrass-cli: + +```sh +sudo /greengrass/v2/bin/greengrass-cli deployment create \ + --recipeDir components/recipes \ + --artifactDir components/artifacts \ + --merge "aws.greengrass.SecureTunneling=1.0.0" +``` + +Verify deployment: + +```sh +tail -f /greengrass/v2/logs/greengrass.log +``` + +### Greengrass Nucleus Lite + Deploy using ggl-cli: ```sh @@ -55,7 +74,6 @@ Deploy using ggl-cli: Verify deployment: ```sh -# Check nucleus logs for SUCCEEDED status journalctl -afu 'ggl.*' ``` @@ -72,7 +90,17 @@ for detailed guidance. ## Monitoring -Follow nucleus logs +### Greengrass Nucleus + +View logs in the Greengrass root directory: + +```sh +tail -f /greengrass/v2/logs/aws.greengrass.SecureTunneling.log +``` + +### Greengrass Nucleus Lite + +Follow nucleus logs: ```sh journalctl -afu 'ggl.*'