Skip to content

Commit b113210

Browse files
committed
Merge pull request #1193 from deis/1020-make_rsync
feat(Makefile): move rsync from Vagrantfile to Makefile
2 parents e472c54 + 2b1fb73 commit b113210

12 files changed

Lines changed: 17 additions & 8 deletions

File tree

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ START_UNITS = $(foreach C,$(START_COMPONENTS),$(wildcard $(C)/systemd/*))
2929

3030
all: build run
3131

32-
build:
32+
build: rsync
3333
$(call ssh_all,'cd share && for c in $(ALL_COMPONENTS); do cd $$c && docker build -t deis/$$c . && cd ..; done')
3434

3535
clean: uninstall
@@ -56,6 +56,9 @@ pull:
5656

5757
restart: stop start
5858

59+
rsync:
60+
$(call rsync_all)
61+
5962
run: install start
6063

6164
start: check-fleet start-warning start-routers

Vagrantfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ Vagrant.configure("2") do |config|
4646
ip = "172.17.8.#{i+99}"
4747
config.vm.network :private_network, ip: ip
4848

49-
# FALLBACK Enable NFS for sharing the host machine into the coreos-vagrant VM.
50-
# config.vm.synced_folder ".", "/home/core/share", id: "core", :nfs => true, :mount_options => ['nolock,vers=3,udp']
51-
# Note that with rsync, local Deis code changes need to be re-synced to the VM by issuing a `vagrant rsync`
52-
config.vm.synced_folder ".", "/home/core/share", type: "rsync"
53-
5449
# user-data bootstrapping
5550
config.vm.provision :file, :source => "contrib/coreos/user-data", :destination => "/tmp/vagrantfile-user-data"
5651
# check that the CoreOS user-data file is valid

builder/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include ../includes.mk
22

33
build:
4+
$(call rsync_all)
45
$(call ssh_all,'cd share/builder && docker build -t deis/builder .')
56

67
install: check-fleet

cache/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include ../includes.mk
22

33
build:
4+
$(call rsync_all)
45
$(call ssh_all,'cd share/cache && sudo docker build -t deis/cache .')
56

67
install: check-fleet

contrib/ec2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ email: info@opdemand.com
9999
## Hack on Deis
100100
If you'd like to use this deployment to build Deis, you'll need to set `DEIS_HOSTS` to an array of your cluster hosts:
101101
```console
102-
$ export DEIS_HOSTS=1.2.3.4 1.2.3.5 1.2.3.6
102+
$ DEIS_HOSTS="1.2.3.4 2.3.4.5 3.4.5.6" make build
103103
```
104104

105105
This variable is used in the `make build` command.

contrib/rackspace/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ email: info@opdemand.com
8585
## Hack on Deis
8686
If you'd like to use this deployment to build Deis, you'll need to set `DEIS_HOSTS` to an array of your cluster hosts:
8787
```console
88-
$ export DEIS_HOSTS=10.21.12.1 10.21.12.2 10.21.12.3
88+
$ DEIS_HOSTS="1.2.3.4 2.3.4.5 3.4.5.6" make build
8989
```
9090

9191
This variable is used in the `make build` command.

controller/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ include ../includes.mk
55
all: build run
66

77
build:
8+
$(call rsync_all)
89
$(call ssh_all,'cd share/controller && sudo docker build -t deis/controller .')
910

1011
install: check-fleet

database/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include ../includes.mk
22

33
build:
4+
$(call rsync_all)
45
$(call ssh_all,'cd share/database && sudo docker build -t deis/database .')
56

67
install: check-fleet

includes.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ define ssh_all
2828
for host in $(DEIS_HOSTS); do ssh -o LogLevel=FATAL -o Compression=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no core@$$host -t $(1); done
2929
endef
3030

31+
define rsync_all
32+
for host in $(DEIS_HOSTS); do rsync -Pave "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --exclude=venv/ --exclude=.git/ --exclude='*.pyc' $(shell pwd)/* core@$$host:/home/core/share; done
33+
endef
34+
3135
define echo_cyan
3236
@echo "\033[0;36m$(subst ",,$(1))\033[0m"
3337
endef

logger/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include ../includes.mk
22

33
build:
4+
$(call rsync_all)
45
$(call ssh_all,'cd share/logger && sudo docker build -t deis/logger .')
56

67
install: check-fleet

0 commit comments

Comments
 (0)