Skip to content

Commit

Permalink
Merge pull request #42 from unlikelyzero/simulator-restart
Browse files Browse the repository at this point in the history
[Make] Add ability to restart yamcs simulator
  • Loading branch information
fqqb authored Sep 19, 2024
2 parents a575b75 + 233124b commit f4e8643
Showing 1 changed file with 11 additions and 4 deletions.
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

0 comments on commit f4e8643

Please sign in to comment.