forked from TrueCloudLab/frostfs-dev-env
[#208] Split basic services into basic and essential
Essential services run chains. Between basic and essential runs adm tool can deploy environment. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
This commit is contained in:
parent
c4a55445d1
commit
dff6b86f96
3 changed files with 19 additions and 5 deletions
|
@ -1,8 +1,5 @@
|
||||||
# Services start/stop order
|
# Services start/stop order
|
||||||
# Will start from top to bottom and stop in reverse
|
# Will start from top to bottom and stop in reverse
|
||||||
basenet
|
|
||||||
chain
|
|
||||||
morph_chain
|
|
||||||
nats
|
nats
|
||||||
ir
|
ir
|
||||||
storage
|
storage
|
||||||
|
|
5
.essential_services
Normal file
5
.essential_services
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Services start/stop order
|
||||||
|
# Will start from top to bottom and stop in reverse
|
||||||
|
basenet
|
||||||
|
chain
|
||||||
|
morph_chain
|
16
Makefile
16
Makefile
|
@ -28,8 +28,10 @@ PULL_SVCS = $(shell find ./services -type f -name 'docker-compose.yml' | sort -u
|
||||||
# List of services to run
|
# List of services to run
|
||||||
START_SVCS = $(shell cat .services | grep -v \\\#)
|
START_SVCS = $(shell cat .services | grep -v \\\#)
|
||||||
START_BASIC = $(shell cat .basic_services | grep -v \\\#)
|
START_BASIC = $(shell cat .basic_services | grep -v \\\#)
|
||||||
|
START_ESSENTIAL = $(shell cat .essential_services | grep -v \\\#)
|
||||||
STOP_SVCS = $(shell tac .services | grep -v \\\#)
|
STOP_SVCS = $(shell tac .services | grep -v \\\#)
|
||||||
STOP_BASIC = $(shell tac .basic_services | grep -v \\\#)
|
STOP_BASIC = $(shell tac .basic_services | grep -v \\\#)
|
||||||
|
STOP_ESSENTIAL = $(shell tac .essential_services | grep -v \\\#)
|
||||||
|
|
||||||
# List of hosts available in devenv
|
# List of hosts available in devenv
|
||||||
HOSTS_LINES = $(shell grep -Rl IPV4_PREFIX ./services/* | grep .hosts)
|
HOSTS_LINES = $(shell grep -Rl IPV4_PREFIX ./services/* | grep .hosts)
|
||||||
|
@ -60,12 +62,17 @@ up: up/basic
|
||||||
|
|
||||||
# Build up NeoFS
|
# Build up NeoFS
|
||||||
.PHONY: up/basic
|
.PHONY: up/basic
|
||||||
up/basic: get vendor/hosts
|
up/basic: up/essential
|
||||||
@$(foreach SVC, $(START_BASIC), $(shell docker-compose -f services/$(SVC)/docker-compose.yml up -d))
|
@$(foreach SVC, $(START_BASIC), $(shell docker-compose -f services/$(SVC)/docker-compose.yml up -d))
|
||||||
@./bin/tick.sh
|
@./bin/tick.sh
|
||||||
@./bin/config.sh string SystemDNS container
|
@./bin/config.sh string SystemDNS container
|
||||||
@echo "Basic NeoFS Developer Environment is ready"
|
@echo "Basic NeoFS Developer Environment is ready"
|
||||||
|
|
||||||
|
# Start essential services
|
||||||
|
.PHONY: up/essential
|
||||||
|
up/essential: get vendor/hosts
|
||||||
|
@$(foreach SVC, $(START_ESSENTIAL), $(shell docker-compose -f services/$(SVC)/docker-compose.yml up -d))
|
||||||
|
|
||||||
# Build up certain service
|
# Build up certain service
|
||||||
.PHONY: up/%
|
.PHONY: up/%
|
||||||
up/%: get vendor/hosts
|
up/%: get vendor/hosts
|
||||||
|
@ -74,7 +81,7 @@ up/%: get vendor/hosts
|
||||||
|
|
||||||
# Stop environment
|
# Stop environment
|
||||||
.PHONY: down
|
.PHONY: down
|
||||||
down: down/add down/basic
|
down: down/add down/basic down/essential
|
||||||
@echo "Full NeoFS Developer Environment is down"
|
@echo "Full NeoFS Developer Environment is down"
|
||||||
|
|
||||||
.PHONY: down/add
|
.PHONY: down/add
|
||||||
|
@ -86,6 +93,11 @@ down/add:
|
||||||
down/basic:
|
down/basic:
|
||||||
$(foreach SVC, $(STOP_BASIC), $(shell docker-compose -f services/$(SVC)/docker-compose.yml down))
|
$(foreach SVC, $(STOP_BASIC), $(shell docker-compose -f services/$(SVC)/docker-compose.yml down))
|
||||||
|
|
||||||
|
# Stop essential services
|
||||||
|
.PHONY: down/essential
|
||||||
|
down/essential:
|
||||||
|
$(foreach SVC, $(STOP_ESSENTIAL), $(shell docker-compose -f services/$(SVC)/docker-compose.yml down))
|
||||||
|
|
||||||
# Stop certain service
|
# Stop certain service
|
||||||
.PHONY: down/%
|
.PHONY: down/%
|
||||||
down/%:
|
down/%:
|
||||||
|
|
Loading…
Reference in a new issue