Add import datas for K8s
This commit is contained in:
parent
8487b3c43d
commit
8596fde233
20
deployed_config
Normal file
20
deployed_config
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
clusters:
|
||||||
|
- cluster:
|
||||||
|
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCVENDQWUyZ0F3SUJBZ0lJVFA2eU84cjFJTm93RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TlRBek16RXdOekUyTXpsYUZ3MHpOVEF6TWprd056SXhNemxhTUJVeApFekFSQmdOVkJBTVRDbXQxWW1WeWJtVjBaWE13Z2dFaU1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLCkFvSUJBUURuY0tKTEY2TGNRb2dTMS9Nclkwcm9XVVZqbzB6UE1XNmdpSzR3OWpUYmdXQnEyVlNkTWRHV01EY0YKNXREa0dwWUI2UlEwL0NEdXNPdTcyaU85bU56K0g3MWRnSDBFUG4vNUdSNDcvT2NqRzlncGwxMk9QdUVqdTJTWApZUlY1bTg0QWl5Z3FjTVJtY0greEIvVURQaTVvd2czMFByQ0xhM1E4OVdvYURIQkZZd0ZMRTNtY3NlS0cxelE4Ck9icnhISWU3TUJpUjk2bVFSbjV6dHRINlArZ2dmOTNQMUdGSk5zd2dRVmpTZC8yTlRiTXJYMWhLRG5Sa2Y1QWcKWW4vNUhidk4xeTZCOFZNc2xJUnJNNVVPNGVGY0oxamVnbDMyUFEwZm5aMm5EaGRkZ3NYb3JwbjBzK3JURkM1bApFU3VvMTlETGxTdE01bHJ3Z244TmN5eUxxSnZ4QWdNQkFBR2pXVEJYTUE0R0ExVWREd0VCL3dRRUF3SUNwREFQCkJnTlZIUk1CQWY4RUJUQURBUUgvTUIwR0ExVWREZ1FXQkJRQXlUSy9SRmsxRDZrTkJuVWRaSEdFb0M2L3ZUQVYKQmdOVkhSRUVEakFNZ2dwcmRXSmxjbTVsZEdWek1BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQ1dRZm5sNTE4Zwp1cyttdjRFN1lNS25jcnh3dnhRbEdmNWVjWXZ1eUFJMU5ScGdud2tMTm9QeWptRVdiZWE5SVo5Z2JndkVVakFQCjdJUzloQU1sc2M4M2xxQTBWT3cxa0t4YTVIb0UyL2paUDlHUElrOUhSaHVxaGljY24vNWJpZWwrRlFHYVZkY0IKMlQxdGdsU254eno5RVdzSFkvTDl3dkFJM2VuSVhjSFNsT1l6MWpia1BqOWZXZFRXZ1JEOWFhaWFwRDNUVUloTgpYTG9OVmhiMWVxTXZsa2RQeEsxaHZxVEJqVkNMQk1KOTBZTGMzUkh3TkpicG1kUXJvTkpYbzY4bE9sVmZ2Tzk5CmlHTjFkcW9zbGltOENrYXRBTlJrak54RmtITitEdXpUMFAza2RHUHJQK2ZBN1lxWWIvZEMwOGhvTDZJSi9zdUYKRWpkYTBTcHFGcEZDCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
||||||
|
server: https://127.0.0.1:36641
|
||||||
|
name: kind-opencloud
|
||||||
|
contexts:
|
||||||
|
- context:
|
||||||
|
cluster: kind-opencloud
|
||||||
|
user: kind-opencloud
|
||||||
|
name: kind-opencloud
|
||||||
|
current-context: kind-opencloud
|
||||||
|
kind: Config
|
||||||
|
preferences: {}
|
||||||
|
users:
|
||||||
|
- name: kind-opencloud
|
||||||
|
user:
|
||||||
|
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURLVENDQWhHZ0F3SUJBZ0lJR3pRd29aaDl4M3N3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TlRBek16RXdOekUyTXpsYUZ3MHlOakF6TXpFd056SXhNemxhTUR3eApIekFkQmdOVkJBb1RGbXQxWW1WaFpHMDZZMngxYzNSbGNpMWhaRzFw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ZHeTRDMzRqeTR2Rk5KWmtVS0x6KzBGSzdpNlQwdCtxbnVFdGowQjVOZ1hRNFFYS0tkb1ZrV1RPVERiCkVlMFpBb0dCQUszZzFuLzB3aktJaFhhbGxPalgraXo3NEEzaVdUWWh3SG1XMjlTR0pWL20zY3l3a1JPWVVKcjgKR1hYamo2YWsvd0g4bXFvMEtpb2pRZWpKS1dzbjVHMDJxaXFGY1FseExtM0dxYTR6OXBZd1VCTFVzL0hWdTVOTwpwanBTMHpVM01UcmVtUStYNmF2MDdQNzcyRGlDTEJyY1YwOFJybStFVDkycFNreGNUOG90Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
|
||||||
|
|
12
import_datas.sh
Executable file
12
import_datas.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
FILES=$(ls $1 | grep .json)
|
||||||
|
BRANCH=${2:-dev}
|
||||||
|
|
||||||
|
export KUBECONFIG=$(realpath ./deployed_config)
|
||||||
|
|
||||||
|
POD_NAME=$(kubectl get pods --all-namespaces -o=name | grep dev-mongodb-*)
|
||||||
|
for file in "${FILES[@]}"; do
|
||||||
|
echo "ADD file $file in collection ${file/.json/} : ${POD_NAME/pod\//}"
|
||||||
|
kubectl cp $file ${POD_NAME/pod\//}:/tmp/$file
|
||||||
|
kubectl exec ${POD_NAME/pod\//}: -- mongoimport --db DC_myDC --collection ${file/.json/} --file /tmp/$file --jsonArray
|
||||||
|
done
|
@ -4,3 +4,5 @@ RELEASE_NAME=${1:-dev}
|
|||||||
RELEASE_NAMESPACE=${1:-dev}
|
RELEASE_NAMESPACE=${1:-dev}
|
||||||
|
|
||||||
helm install ${RELEASE_NAME} opencloud -n ${RELEASE_NAMESPACE} --create-namespace -f opencloud/${RELEASE_NAME}-values.yaml
|
helm install ${RELEASE_NAME} opencloud -n ${RELEASE_NAMESPACE} --create-namespace -f opencloud/${RELEASE_NAME}-values.yaml
|
||||||
|
|
||||||
|
kind get kubeconfig --name opencloud > ./deployed_config
|
||||||
|
@ -3,3 +3,5 @@ RELEASE_NAME=${1:-dev}
|
|||||||
RELEASE_NAMESPACE=${1:-dev}
|
RELEASE_NAMESPACE=${1:-dev}
|
||||||
|
|
||||||
helm uninstall ${RELEASE_NAME} -n ${RELEASE_NAMESPACE}
|
helm uninstall ${RELEASE_NAME} -n ${RELEASE_NAMESPACE}
|
||||||
|
|
||||||
|
export KUBECONFIG=$(realpath ~/.kube/config)
|
||||||
|
Loading…
Reference in New Issue
Block a user