Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
"
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -139,7 +141,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($<$<NOT:$<CONFIG:Debug>>:_FORTIFY_SOURCE=3>)
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-U_FORTIFY_SOURCE>)
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=3>)

# Coverage flags
if(ENABLE_COVERAGE)
Expand Down Expand Up @@ -193,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}"
Expand Down
6 changes: 4 additions & 2 deletions docs/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,21 @@ components
│ ├── secure-tunnel
│ └── localproxy
└── recipes
└── aws.greengrass.SecureTunneling-1.0.0.yaml
└── aws.greengrass.SecureTunneling-2.0.0.yaml
```

### For cloud deployment

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
32 changes: 30 additions & 2 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,25 @@ Replace `<REGION>` and `<ACCOUNT-ID>` 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
Expand All @@ -55,7 +74,6 @@ Deploy using ggl-cli:
Verify deployment:

```sh
# Check nucleus logs for SUCCEEDED status
journalctl -afu 'ggl.*'
```

Expand All @@ -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.*'
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
2.0.0