nineskeletor/Makefile
afornerot e7f2b7185a
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
svg
2023-07-23 15:46:26 +02:00

67 lines
2.2 KiB
Makefile
Executable File

SHELL := /bin/bash
ENGINE=kind
HARBOR_USER_NAME=afornerot
CLUSTER_NAME=nineskeletor
NAMESPACE=app-dev
POD=$(shell kubectl get pods --namespace=${NAMESPACE} --no-headers -o custom-columns=":metadata.name" | grep ^${CLUSTER_NAME}-${PODNAME})
PODTOOLS=$(shell kubectl get pods --namespace=${NAMESPACE} --no-headers -o custom-columns=":metadata.name" | grep ^${CLUSTER_NAME}-adminer)
dockercomposebuild:
docker-compose build --no-cache
dockercomposeup:
docker-compose up -d
docker-compose exec app bin/console d:s:u --force --complete
docker-compose exec app bin/console app:Init
dockercomposedown:
docker-compose stop
dockercomposeinit:
docker-compose exec app bin/console d:f:l
dockercomposesh:
docker-compose exec app /bin/sh
deletecluster:
${ENGINE} delete cluster --name=${CLUSTER_NAME}
createcluster:
${ENGINE} delete cluster --name=${CLUSTER_NAME}
${ENGINE} create cluster --config misc/k8s/${ENGINE}/${ENGINE}-cluster.yaml
atachcluster:
docker login reg.cadoles.com
mkdir -p misc/k8s/kustomization/base/secrets/dockerconfig
docker --config misc/k8s/kustomization/base/secrets/dockerconfig login reg.cadoles.com
mv misc/k8s/kustomization/base/secrets/dockerconfig/config.json misc/k8s/kustomization/base/secrets/dockerconfig/.dockerconfigjson
mkdir -p misc/k8s/kustomization/overlays/dev/secrets/dockerconfig
cp misc/k8s/kustomization/base/secrets/dockerconfig/.dockerconfigjson misc/k8s/kustomization/overlays/dev/secrets/dockerconfig/.dockerconfigjson
applycluster:
kubectl apply -k misc/k8s/${ENGINE}/cluster --server-side
applylbcluster:
kubectl apply -k misc/k8s/${ENGINE}/cluster/lb --server-side
watchcluster:
skaffold dev -p dev --cleanup=false --default-repo reg.cadoles.com/${HARBOR_USER_NAME}
sh:
kubectl exec --namespace=${NAMESPACE} ${POD} -it -- sh
deletenamespace:
kubectl delete all --all --namespace ${NAMESPACE}
getpods:
kubectl get pods --namespace ${NAMESPACE}
getservices:
kubectl get services --namespace ${NAMESPACE}
ldapsearch:
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- apk update
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- apk add openldap
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- ldapsearch -x -H ldap://nineskeletor-openldap:389 -D cn=admin,dc=nine,dc=fr -w openldap