File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 COMPONENTS=builder cache controller database logger registry
2222endif
2323
24+ UNIT_FILES = $(foreach C, $(COMPONENTS ) , $(wildcard $(C ) /systemd/* ) )
25+
2426all : build run
2527
2628pull :
@@ -30,17 +32,17 @@ build:
3032 $(call ssh_all,'cd share && for c in $(COMPONENTS ) ; do cd $$c && docker build -t deis/$$c . && cd ..; done')
3133
3234install :
33- for c in $( COMPONENTS ) ; do fleetctl --strict-host-key-checking=false submit $$ c/systemd/ * ; done
35+ fleetctl --strict-host-key-checking=false submit $( UNIT_FILES )
3436
35- uninstall : stop
36- for c in $( COMPONENTS ) ; do fleetctl --strict-host-key-checking=false destroy $$ c/systemd/ * ; done
37+ uninstall : stop
38+ fleetctl --strict-host-key-checking=false destroy $( UNIT_FILES )
3739
3840start :
3941 echo " \033[0;33mStarting services can take some time... grab some coffee!\033[0m"
40- for c in $( COMPONENTS ) ; do fleetctl --strict-host-key-checking=false start $$ c/systemd/ * ; done
42+ fleetctl --strict-host-key-checking=false start $( UNIT_FILES )
4143
4244stop :
43- for c in $( COMPONENTS ) ; do fleetctl --strict-host-key-checking=false stop $$ c/systemd/ * ; done
45+ fleetctl --strict-host-key-checking=false stop $( UNIT_FILES )
4446
4547restart : stop start
4648
Original file line number Diff line number Diff line change 2727
2828cd $ROOT_DIR
2929
30- # upload each component's systemd unit to the fleet cluster
31- for component in registry logger database cache controller builder router
32- do
33- pushd $component /systemd > /dev/null
34- fleetctl submit deis-$component .service
35- fleetctl start deis-$component .service
36- popd > /dev/null
30+ # upload all systemd unit to the fleet cluster
31+ units=()
32+ for component in builder cache controller database logger registry router; do
33+ units+=($component /systemd/* )
3734done
3835
36+ fleetctl submit ${units[@]}
37+ fleetctl start ${units[@]}
38+
3939echo_green " Done! Inspect the state of the services with: fleetctl list-units"
4040echo_green " Once all the services are running, you can register with your Deis cluster: deis register http://ec2-34-567-890-123.us-west-1.compute.amazonaws.com:8000"
Original file line number Diff line number Diff line change 2727
2828cd $ROOT_DIR
2929
30- # upload each component's systemd unit to the fleet cluster
31- for component in registry logger database cache controller builder router
32- do
33- pushd $component /systemd > /dev/null
34- fleetctl submit deis-$component .service
35- fleetctl start deis-$component .service
36- popd > /dev/null
30+ # upload all systemd unit to the fleet cluster
31+ units=()
32+ for component in builder cache controller database logger registry router; do
33+ units+=($component /systemd/* )
3734done
3835
36+ fleetctl submit ${units[@]}
37+ fleetctl start ${units[@]}
38+
3939echo_green " Done! Inspect the state of the services with: fleetctl list-units"
4040echo_green " Once all the services are running, you can register with your Deis cluster: deis register 1.2.3.4:8000"
You can’t perform that action at this time.
0 commit comments