Skip to content
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

[Make] Add ability to restart yamcs simulator #42

Merged
merged 1 commit into from
Sep 19, 2024
Merged
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
15 changes: 11 additions & 4 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ endef

.PHONY: all all-10hz clean yamcs-up yamcs-down yamcs-simulator yamcs-simulator-10hz yamcs-shell help

all: clean yamcs-simulator ## run all: clean, yamcs-up (yamcs-down) and yamcs-simulator
all: clean yamcs-up yamcs-simulator ## run all: clean, yamcs-up (yamcs-down) and yamcs-simulator

all-10hz: clean yamcs-simulator-10hz ## run all: clean, yamcs-up (yamcs-down) and yamcs-simulator
all-10hz: clean yamcs-up yamcs-simulator-10hz ## run all: clean, yamcs-up (yamcs-down) and yamcs-simulator

yamcs-up: | yamcs-down ## bring up yamcs system
docker compose up -d
Expand All @@ -28,14 +28,21 @@ yamcs-down: ## bring down yamcs system
$(call print_message,33,Stopping any running docker-yamcs containers...)
docker compose down -v --remove-orphans

yamcs-simulator: yamcs-up ## run yamcs simulator
yamcs-simulator: ## run yamcs simulator
$(call print_message,36,Connect via http://localhost:8090/ system may take about 50 seconds to startup)
cd .. && $(PYTHON) ./simulator.py

yamcs-simulator-10hz: yamcs-up ## run yamcs simulator at 10hz
yamcs-simulator-10hz: ## run yamcs simulator at 10hz
$(call print_message,36,Connect via http://localhost:8090/ system may take about 50 seconds to startup)
cd .. && $(PYTHON) ./simulator.py --rate=10

yamcs-simulator-down: ## stop the yamcs simulator
$(call print_message,33,Stopping the yamcs simulator...)
pkill -f simulator.py
$(call print_message,32,Simulator stopped successfully)

yamcs-simulator-restart: yamcs-simulator-down yamcs-simulator ## stop the yamcs simulator and start it again

yamcs-shell: ## shell into yamcs container
docker compose up -d && docker compose exec yamcs bash

Expand Down
Loading