nineskeletor/Makefile

67 lines
2.2 KiB
Makefile
Raw Normal View History

2022-09-21 12:16:27 +02:00
SHELL := /bin/bash
2023-06-26 09:20:23 +02:00
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)
2022-09-21 12:16:27 +02:00
2023-07-23 15:46:26 +02:00
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
2023-06-26 09:20:23 +02:00
deletecluster:
${ENGINE} delete cluster --name=${CLUSTER_NAME}
createcluster:
${ENGINE} delete cluster --name=${CLUSTER_NAME}
${ENGINE} create cluster --config misc/k8s/${ENGINE}/${ENGINE}-cluster.yaml
2022-09-21 12:16:27 +02:00
2023-06-26 09:20:23 +02:00
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
2022-09-21 12:16:27 +02:00
2023-06-26 09:20:23 +02:00
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