|
@@ -25,6 +25,7 @@ alias push="git push"
|
|
|
alias asso="aws sso login --profile $argv"
|
|
|
alias bookpull="rsync --delete -avzichP root@atlas.local:/tank/books/ ~/.calibre/"
|
|
|
alias bookpush="rsync --delete -avzichP ~/.calibre/ root@atlas.local:/tank/books/"
|
|
|
+alias chglg="git add ./changelog/ && git commit -m 'Add changelog' && git push"
|
|
|
|
|
|
|
|
|
newemail () {
|
|
@@ -50,35 +51,22 @@ sush() {
|
|
|
if [[ $1 == "sbx" ]]
|
|
|
then
|
|
|
asso sure-inc
|
|
|
- aws eks update-kubeconfig --name surepreme-sandbox-main-cluster --profile sure-inc
|
|
|
+ aws eks update-kubeconfig --name surepreme-sandbox-k8s-use1 --profile sure-inc
|
|
|
+ kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash
|
|
|
fi
|
|
|
|
|
|
if [[ $1 == "qa" ]]
|
|
|
then
|
|
|
asso np-farmers
|
|
|
- aws eks update-kubeconfig --name farmers-qa-main-cluster --profile np-farmers
|
|
|
+ aws eks update-kubeconfig --name farmers-qa-k8s-use1 --profile np-farmers
|
|
|
+ kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash
|
|
|
fi
|
|
|
|
|
|
if [[ $1 == "prod" ]]
|
|
|
then
|
|
|
asso sure-inc
|
|
|
- echo "from platform_core.apps.core_protections.models import *" | pbcopy
|
|
|
- aws eks update-kubeconfig --name surepreme-production-main-cluster --profile sure-inc
|
|
|
- kubectl exec -it -n bastion $(kubectl get po -n bastion | grep "surepreme.*bastion" | head -n 1 | awk '{print $1}') -- python manage.py shell
|
|
|
- fi
|
|
|
-
|
|
|
- if (( $2 ));
|
|
|
- then
|
|
|
- if [[ $2 = "-p" ]]
|
|
|
- then
|
|
|
- echo "Import command is on your clipboard"
|
|
|
- echo "from platform_core.apps.core_protections.models import *" | pbcopy
|
|
|
- kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash -c "python manage.py shell"
|
|
|
- else
|
|
|
- kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash
|
|
|
- fi
|
|
|
- else
|
|
|
- kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash
|
|
|
+ aws eks update-kubeconfig --name surepreme-production-k8s-use1 --profile sure-inc
|
|
|
+ kubectl exec -it -n bastion $(kubectl get pod -n bastion | grep "surepreme.*bastion" | head -n 1 | awk '{print $1}') -- bash
|
|
|
fi
|
|
|
}
|
|
|
|
|
@@ -95,7 +83,7 @@ refresh_sure_db() {
|
|
|
echo "This will likely take about 10 minutes"
|
|
|
asso np-farmers
|
|
|
aws s3 cp --profile np-farmers s3://farmers-qa-rds-exports/pg_dumps/farmers_latest.pgdump /tmp/qa_farmers_latest.pgdump
|
|
|
- dropdb -U sure surepreme
|
|
|
+ dropdb -U sure surepreme --force
|
|
|
createdb -U sure surepreme
|
|
|
psql -U sure surepreme -c "CREATE EXTENSION postgis"
|
|
|
pg_restore -d surepreme /tmp/qa_farmers_latest.pgdump
|
|
@@ -105,4 +93,7 @@ refresh_sure_db() {
|
|
|
|
|
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
|
|
|
|
+for f in ~/.dotfiles.sure/bash/*.sh; do source $f; done
|
|
|
+for f in ~/.dotfiles.sure/direnv/*.sh; do source $f; done
|
|
|
+
|
|
|
eval "$(atuin init zsh)"
|