Local deployment using minikube

Prerequirements


0. Read system_deployment and start minikube

minikube start --kubernetes-version <kuber version>

1. Do step 1.

2. For step 2 create namespace with different name for example prozorro-local

  NS=prozorro-local
  kubectl create namespace $NS

3. Do steps 3,4,5

4. Instead of step 6 run minikube addons enable ingress

5. Skip step 7

6. Do steps 8, 9, 10, 11, 12

  • For step 12 you can create an empty file if you are not going to use registry importer skript

7. Create elastic-external-auth secret with empty login and pswd

kubectl -n $NS create secret generic elastic-external-auth --from-literal=LOGIN= --from-literal=PASSWORD=

8. Create your own helm values file (name it f.e. helm-values.private.yml) and put it to your global gitignore.

There you may override helm values, described in other helm config files

9. Package and install helm deployment

Version doesn't matter

helm package --app-version=1.0.1 --version=1.0.1 ./helm/prozorro-deployment 
helm upgrade -i --namespace=<namespace> <realese_name> prozorro-helm-*.tgz -f specs/base-procedure-spec.yaml -f specs/custom-procedure-spec.yaml -f values/local-values.yaml -f <your_local_helm_values>

10. Check deployment finished

kubectl -n $NS get pods

11. Get your minikube ip and update your ect/hosts with hosts with it

minikube ip

Setup hosts you defined in ingress setting. In local-values.yaml there are procedure.proz.info and auction.proz.info

/etc/hosts:

<minikube-ip> procedure.proz.info
<minikube-ip> auction.proz.info

Local and latest docker images

If it requires using local image run eval $(minikube docker-env) and then build your docker image (usually run make docker-build in target project)

Your values should have next format

  image:
    repository: prozorro-sale-auth
    tag: develop
    pullPolicy: Never

If you want to use the latest docker image update subchart values with

  image:
    repository: registry-gitlab.prozorro.sale/prozorro-sale/prozorro-auth
    tag: latest
    pullPolicy: Always

Local host naming recommendations

Don't use such names as:

.dev
.localhost
.test
.example
  • No labels