Skip to content

Commit 90b226f

Browse files
committed
Move azure stuff to its own Makefile
Those depend on target "all" but are otherwise not related with the main Makefile.
1 parent 2b86cea commit 90b226f

File tree

2 files changed

+39
-32
lines changed

2 files changed

+39
-32
lines changed

Makefile

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -136,24 +136,6 @@ else
136136
TMUX_TOP_DIR = ./tmux/pgsql
137137
endif
138138

139-
# make azcluster arguments
140-
AZURE_PREFIX ?= ha-demo-$(shell whoami)
141-
AZURE_REGION ?= paris
142-
AZURE_LOCATION ?= francecentral
143-
144-
# Pick a version of Postgres and pg_auto_failover packages to install
145-
# in our target Azure VMs when provisionning
146-
#
147-
# sudo apt-get install -q -y postgresql-13-auto-failover-1.5=1.5.2
148-
# postgresql-${AZ_PG_VERSION}-auto-failover-${AZ_PGAF_DEB_VERSION}=${AZ_PGAF_VERSION}
149-
AZ_PG_VERSION ?= 13
150-
AZ_PGAF_DEB_VERSION ?= 1.6
151-
AZ_PGAF_DEB_REVISION ?= 1.6.4-1
152-
153-
export AZ_PG_VERSION
154-
export AZ_PGAF_DEB_VERSION
155-
export AZ_PGAF_DEB_REVISION
156-
157139
all: monitor bin ;
158140

159141
install: install-monitor install-bin ;
@@ -432,23 +414,10 @@ valgrind-session: build-test-pg$(PGVERSION)
432414
TMUX_LAYOUT=$(TMUX_LAYOUT) \
433415
tmux-session
434416

435-
azcluster: all
436-
$(PG_AUTOCTL) do azure create \
437-
--prefix $(AZURE_PREFIX) \
438-
--region $(AZURE_REGION) \
439-
--location $(AZURE_LOCATION) \
440-
--nodes $(NODES)
441-
442-
# make azcluster has been done before, just re-attach
443-
az: all
444-
$(PG_AUTOCTL) do azure tmux session
445-
446-
azdrop: all
447-
$(PG_AUTOCTL) do azure drop
417+
include Makefile.azure
448418

449419
.PHONY: all clean check install docs tikz
450420
.PHONY: monitor clean-monitor check-monitor install-monitor
451421
.PHONY: bin clean-bin install-bin maintainer-clean
452422
.PHONY: run-test spellcheck lint linting ci-test
453423
.PHONY: tmux-clean cluster compose
454-
.PHONY: azcluster azdrop az

Makefile.azure

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#
2+
# AZURE related
3+
#
4+
5+
# make azcluster arguments
6+
AZURE_PREFIX ?= ha-demo-$(shell whoami)
7+
AZURE_REGION ?= paris
8+
AZURE_LOCATION ?= francecentral
9+
10+
# Pick a version of Postgres and pg_auto_failover packages to install
11+
# in our target Azure VMs when provisionning
12+
#
13+
# sudo apt-get install -q -y postgresql-13-auto-failover-1.5=1.5.2
14+
# postgresql-${AZ_PG_VERSION}-auto-failover-${AZ_PGAF_DEB_VERSION}=${AZ_PGAF_VERSION}
15+
AZ_PG_VERSION ?= 13
16+
AZ_PGAF_DEB_VERSION ?= 1.6
17+
AZ_PGAF_DEB_REVISION ?= 1.6.4-1
18+
19+
export AZ_PG_VERSION
20+
export AZ_PGAF_DEB_VERSION
21+
export AZ_PGAF_DEB_REVISION
22+
23+
.PHONY: azcluster
24+
azcluster: all
25+
$(PG_AUTOCTL) do azure create \
26+
--prefix $(AZURE_PREFIX) \
27+
--region $(AZURE_REGION) \
28+
--location $(AZURE_LOCATION) \
29+
--nodes $(NODES)
30+
31+
# make azcluster has been done before, just re-attach
32+
.PHONY: az
33+
az: all
34+
$(PG_AUTOCTL) do azure tmux session
35+
36+
.PHONY: azdrop
37+
azdrop: all
38+
$(PG_AUTOCTL) do azure drop

0 commit comments

Comments
 (0)