Start minikube with some additional resources
minikube --memory 8192 --cpus 2 startStart helm (install helm if missing https://helm.sh/)
helm initSetup tiller for helm
kubernetes/tiller_setup.shStart cockroachdb cluster
kubernetes/install_cockroach.sh kubectl run -it --rm cockroach-client \
--image=cockroachdb/cockroach \
--restart=Never \
--command -- ./cockroach sql --insecure --host mycockroach-cockroachdb-public.defaultcreate the db:
create database repositoryds;See "Local dev" OR "Local cluster" below.
Port-forward from localhost to cockroachdb service within cluster:
kubectl port-forward svc/mycockroach-cockroachdb-public 26257:26257This will only connect to a single node! If that node goes down, CMS goes down.
Change the conf/context.xml connection string to localhost one:
<!--snip-->
...
url="jdbc:postgresql://localhost:26257/repositoryds">
<!--snip-->Run
mvn clean verify && mvn -Pcargo.runTo be able to work with the docker daemon on your mac/linux host use the docker-env command in your shell
eval $(minikube docker-env)Build hippo project, and build docker image
./build.shChange the conf/context.xml connection string :
<!--snip-->
url="jdbc:postgresql://mycockroach-cockroachdb-public.default.svc.cluster.local:26257/repositoryds"/>
<!--snip-->
Deploy:
kubectl apply -f kubernetes/hippo-deployment.yamlAdd an entry in your /etc/hosts file. Replace <minikube_ip> with the output of the command:
minikube ipAdd the following line in your /etc/hosts file:
<minikube_ip> hippo.site hippo.cms
Enable ingress addon in minikube
minikube addons enable ingressApply ingress rules to access the cluster
kubectl apply -f kubernetes/ingress.yamlThen visit http://hippo.cms/cms