-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from aau-network-security/develop
Release v1.1.0
- Loading branch information
Showing
9 changed files
with
107 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
|
||
# This script is used to create a release of the project. | ||
# Check if the -h or --help flag is passed | ||
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then | ||
echo "Usage: $0 <version>" | ||
echo | ||
echo "This script is used to create a release of the project." | ||
echo | ||
echo "Arguments:" | ||
echo " <version> The version number for the release." | ||
echo | ||
echo "Options:" | ||
echo " -h, --help Show this help message and exit." | ||
exit 0 | ||
fi | ||
|
||
if [ -z "$1" ]; then | ||
echo "Error: Please provide the version number as an argument." | ||
echo "Usage: $0 <version>" | ||
exit 1 | ||
fi | ||
|
||
mkdir -p release | ||
|
||
# First we build the binary with the version tag | ||
echo "Building the project with version $1" | ||
date=$(date) | ||
go build --ldflags "-X 'main.version=$1' -X 'main.compileDate=$date'" -o release/haaukins-agent-$1-linux-64bit | ||
chmod +x release/haaukins-agent-$1-linux-64bit | ||
|
||
# cp assets folder to release | ||
cp -r assets release/ | ||
|
||
# cp config folder to release | ||
cp -r config release/ | ||
|
||
# cp nginx folder to release | ||
cp -r nginx release/ | ||
|
||
# copy templates folder to release | ||
cp -r templates release/ | ||
|
||
# cp the systemd service file to release | ||
cp haaukins-agent.service release/ | ||
|
||
# cp cleanup.sh to release | ||
cp cleanup.sh release/ | ||
|
||
# cd to release folder | ||
cd release | ||
|
||
# Create the tarball | ||
echo "Creating the tarball" | ||
tar -czf haaukins-agent-$1-linux-64bit.tar.gz haaukins-agent-$1-linux-64bit assets config nginx haaukins-agent.service templates cleanup.sh | ||
|
||
# remove everything exept the build binary and tarball | ||
rm -rf assets config nginx haaukins-agent.service templates cleanup.sh | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[Unit] | ||
Description=Haaukins (agent) | ||
ConditionPathExists=/home/haaukins | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
User=haaukins | ||
Group=haaukins | ||
LimitNOFILE=9223372036854775807 | ||
|
||
Restart=on-failure | ||
RestartSec=10 | ||
TimeoutStopSec=600 | ||
|
||
WorkingDirectory=/home/haaukins/haaukins-agent | ||
ExecStart=/home/haaukins/haaukins-agent/haaukins-agent | ||
|
||
StandardOutput=syslog | ||
StandardError=syslog | ||
SyslogIdentifier=haaukins-agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
upstream dev { | ||
upstream agentGrpc { | ||
server localhost:8081; | ||
} | ||
server { | ||
listen 5353 http2; #Add ssl after http2 if tls is needed | ||
#ssl_certificate /path/to/fullchain.pem; | ||
#ssl_certificate_key /path/to/privkey.pem; | ||
client_max_body_size 100M; | ||
client_max_body_size 0; | ||
location / { | ||
grpc_pass grpc://dev; | ||
grpc_pass grpc://agentGrpc; | ||
grpc_connect_timeout 600s; | ||
grpc_read_timeout 600s; | ||
grpc_send_timeout 600s; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters