-
Notifications
You must be signed in to change notification settings - Fork 0
/
.almrc
65 lines (53 loc) · 2.53 KB
/
.almrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
export MAVEN_OPTS="-Djdk.tls.client.protocols=TLSv1.2"
export DOCKER_HOST="unix://${HOME}/.colima/default/docker.sock"
export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE="${HOME}/docker.sock"
export TESTCONTAINERS_RYUK_DISABLED=true
export CLOUD_HOME=~/ALM/cloud
export LOCAL_DOMAIN=arost.alm.works
alias rebuild_cloud='$CLOUD_HOME/bootstrap/rebuild.sh'
alias delete_all_jobs='kubectl delete jobs `kubectl get jobs -o custom-columns=:.metadata.name`'
alias pf='sudo pfctl -ef $CLOUD_HOME/bootstrap/devserver-pf.conf'
alias pf_clean='sudo pfctl -F all -f /etc/pf.conf'
alias arost_1_ssh='. "$HOME/.kube/arost-1.dev.alm.works/ssh.sh"'
alias arost_1_env='. "$HOME/.kube/arost-1.dev.alm.works/env.sh"'
alias cqlsh='kubectl exec -ti cassandra-0 -- cqlsh -u cassandra -p cassandra --ssl'
function scale_cloud() {
kubectl scale sts api-public --replicas=0
kubectl scale sts cloner --replicas=0
kubectl scale sts structure-export --replicas=0
kubectl scale sts roadmunk-integration --replicas=0
kubectl scale sts gantt-migration --replicas=0
kubectl scale deploy domain-data --replicas=0
kubectl scale deploy confluence-integration --replicas=0
kubectl scale deploy customcharts-integration --replicas=0
kubectl scale deployment effectors --replicas=0
kubectl scale deploy item-attribute-store --replicas=1
kubectl scale deploy item-attribute-subscription-hub --replicas=1
}
function mvnDocker() {
eval "$(minikube docker-env)"
# export DOCKER_HOST=tcp://192.168.57.3:2376
mvn install -DskipTests -P docker,minikube -T4 "$@"
}
function start_standalone() {
npm start -- \
--env domainId=bae8f490-8b7f-11ed-931b-07f40f220c03 \
--env appHost=arost-1.dev.alm.works \
--env cert=$HOME/.cloud/standalone.pem \
--env key=$HOME/.cloud/standalone-key.pem
}
function start_qa_standalone() {
npm start -- \
--env domainId=26f15200-a8d2-11eb-926f-d3c5ea2ec8d3 \
--env appHost=s7e-qa.alm.works \
--env cert=$HOME/.cloud/standalone.pem \
--env key=$HOME/.cloud/standalone-key.pem
}
function logs() {
stern -o raw "$1" | jq -rR '. as $raw | try (fromjson | (."@timestamp" | split("T") | last) +" \u001b[32m"+ .level +"\u001b[0m "+ (.thread_name) + " \u001b[33m" + (.attributeSpec) +"\u001b[0m [\u001b[34m"+ (.logger_name | split(".") | last) +"\u001b[0m] - "+.message + .stack_trace) catch ("\u001b[31m" + $raw + "\u001b[0m")'
}
# snyk
# export SNYK_API_ENDPOINT="https://snyk.io/"
export SNYK_ORG="arost-s3v"
export SNYK_POLICY_PATH="$CLOUD_HOME/security-check/src/main/resources/.snyk"