Skip to content

[das-toolbox#170] Integrate port management subsystem into DAS packages #399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ build-all: build-image
@bash -x src/scripts/build.sh

run-query-agent:
@bash -x src/scripts/run.sh query_broker 31700
@PORT=$$(bash src/scripts/gkctl_auto_join_and_reserve.sh | tail -n 1); \
bash -x src/scripts/run.sh query_broker $$PORT

run-attention-broker:
@bash -x src/scripts/run.sh attention_broker_service 37007
@PORT=$$(bash src/scripts/gkctl_auto_join_and_reserve.sh | tail -n 1); \
bash -x src/scripts/run.sh attention_broker_service $$PORT

run-link-creation-agent:
@bash -x src/scripts/run.sh link_creation_server $(OPTIONS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

local file_path="src/config/config.py"
local file_path="das-cli/src/settings/config.py"

if [ -f "$file_path" ]; then
sed_inplace "s/^VERSION = .*/VERSION = '$new_package_version'/g" "$file_path"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

local config_file_path="src/config/config.py"
local config_file_path="das-cli/src/settings/config.py"

if ! source "$hooks_path/common/dependency-check.sh"; then
return 0
Expand Down
14 changes: 14 additions & 0 deletions src/scripts/gkctl_auto_join_and_reserve.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -euo pipefail

gkctl instance list --current > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "[INFO] Current instance not found. Joining..."
gkctl instance join
else
echo "[INFO] Current instance already exists."
fi

echo "[INFO] Reserving port..."
gkctl port reserve
Loading