Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.

Commit 1a5371e

Browse files
committed
Add run-in-minikube make target that resolves all deps
Only enabled on Darwin (a.k.a. macOS, a.k.a. OS X) because it's the only platform that we have tested. Contributions for other platforms are welcome. We should uninstall VirtualBox, Minikube & kubectl and test that the target works from a clean slate. We are using VirtualBox as the VM driver for Minikube because kubernetes/minikube#5951 Pair @michaelklishin
1 parent ddc6f48 commit 1a5371e

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

Diff for: Makefile

+34
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,37 @@ ERLANG_MK_COMMIT = rabbitmq-tmp
1616

1717
include rabbitmq-components.mk
1818
include erlang.mk
19+
20+
PLATFORM := $(shell uname)
21+
22+
### Tested on OS X 10.14.6 & 10.15.1
23+
ifeq ($(PLATFORM),Darwin)
24+
25+
### DEPS ###
26+
#
27+
VIRTUALBOX := /usr/local/bin/VBoxManage
28+
$(VIRTUALBOX):
29+
@brew cask install virtualbox \
30+
|| ( echo "Remember to read & follow the Caveats if installation fails" ; exit 1 )
31+
32+
MINIKUBE := /usr/local/bin/minikube
33+
$(MINIKUBE): $(VIRTUALBOX)
34+
@brew install minikube
35+
36+
KUBECTL := /usr/local/bin/kubectl
37+
$(KUBECTL):
38+
@brew install kubectl
39+
40+
### TARGETS ###
41+
#
42+
.PHONY: minikube
43+
minikube: $(MINIKUBE)
44+
@$(MINIKUBE) start --vm-driver=virtualbox
45+
46+
.PHONY: run-in-minikube
47+
# run-in-minikube: minikube $(KUBECTL)
48+
run-in-minikube: $(KUBECTL)
49+
@($(KUBECTL) get namespace test-rabbitmq || $(KUBECTL) create namespace test-rabbitmq) \
50+
&& $(KUBECTL) apply -f examples/minikube
51+
52+
endif

Diff for: examples/minikube/README.md

-3
This file was deleted.

0 commit comments

Comments
 (0)