-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
192 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#! /bin/bash | ||
#! /bin/sh | ||
# Exit if any of the intermediate steps fail | ||
set -e | ||
|
||
NODE_NAME=$(kubectl get pods --selector="service=$1" -n $2 -o custom-columns="NODE:.spec.nodeName" --no-headers=true) | ||
NODE_IP=$(kubectl get nodes -o wide --no-headers=true | grep -w $NODE_NAME | awk '{print $6}') | ||
NODE_NAME="$(kubectl get pods --selector="service=$1" -n $2 -o custom-columns="NODE:.spec.nodeName" --no-headers=true)" | ||
NODE_IP="$(kubectl get nodes -o wide --no-headers=true | grep -w "$NODE_NAME" | awk '{print $6}')" | ||
|
||
jq -n --arg node_ip "$NODE_IP" '{"node_ip":$node_ip}' | ||
jq -n --arg node_ip "$NODE_IP" '{"node_ip":$node_ip}' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 2 additions & 13 deletions
15
infrastructure/utils/scripts/installation/prerequisites/install-docker.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,4 @@ | ||
#!/bin/bash | ||
#! /bin/sh | ||
# This script is used to install docker | ||
|
||
# https://docs.docker.com/engine/install/ubuntu/ | ||
sudo apt update | ||
|
||
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | ||
|
||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --yes --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | ||
|
||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
|
||
sudo apt update | ||
|
||
sudo apt install -y docker-ce | ||
sudo apt install docker.io |
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/install-dotnet.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/install-git.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#! /bin/sh | ||
# This script is used to install git. | ||
|
||
sudo apt install -y git |
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/install-helm.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/install-jq.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#! /bin/sh | ||
|
||
# This script is used to install jq. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/install-k3s.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/install-kubectl.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/install-make.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#! /bin/sh | ||
|
||
# This script is used to install make. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/install-pip3.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#! /bin/sh | ||
# This script is used to install pip3. | ||
|
||
sudo apt install -y python3-pip |
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/install-python3.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#! /bin/sh | ||
# This script is used to install python3. | ||
|
||
sudo apt install -y python3 | ||
|
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/install-terraform.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
infrastructure/utils/scripts/installation/prerequisites/update-packages.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#! /bin/sh | ||
# This script is used to update packages. | ||
|
||
sudo apt update && sudo apt -y upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#! /bin/bash | ||
#! /usr/bin/env bash | ||
# Exit if any of the intermediate steps fail | ||
set -e | ||
|
||
eval kubefilelocation=$1 # ~ expand does not work in terraform so we expend it manually | ||
CONFIG_CONTEXT=$(kubectl --kubeconfig "$kubefilelocation" config current-context) | ||
eval "kubefilelocation=$1" # ~ expand does not work in terraform so we expend it manually | ||
CONFIG_CONTEXT="$(kubectl --kubeconfig "$kubefilelocation" config current-context)" | ||
|
||
jq -n --arg k8s_config_context "$CONFIG_CONTEXT" '{"k8s_config_context":$k8s_config_context}' | ||
jq -n --arg k8s_config_context "$CONFIG_CONTEXT" '{"k8s_config_context":$k8s_config_context}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#! /bin/sh | ||
|
||
# ACESS to monogodb as admin | ||
MPASS=$(kubectl get secret -n armonik mongodb-admin -o jsonpath="{.data.password}" | base64 --decode) | ||
MUSER=$(kubectl get secret -n armonik mongodb-admin -o jsonpath="{.data.username}" | base64 --decode) | ||
MPASS="$(kubectl get secret -n armonik mongodb-admin -o jsonpath="{.data.password}" | base64 --decode)" | ||
MUSER="$(kubectl get secret -n armonik mongodb-admin -o jsonpath="{.data.username}" | base64 --decode)" | ||
kubectl get secret -n armonik mongodb-user-certificates -o jsonpath="{.data.chain\.pem}" | base64 --decode > ./mongodb_chain.pem | ||
MONGO_IP=$(kubectl get svc mongodb-0 -n armonik -o custom-columns="IP:.spec.clusterIP" --no-headers=true) | ||
docker run -it -v $(pwd)/mongodb_chain.pem:/chain.pem --rm rtsp/mongosh mongosh --tlsCAFile /chain.pem --tlsAllowInvalidCertificates --tlsAllowInvalidHostnames --tls -u $MUSER -p $MPASS mongodb://$MONGO_IP:27017 | ||
MONGO_IP="$(kubectl get svc mongodb-0 -n armonik -o custom-columns="IP:.spec.clusterIP" --no-headers=true)" | ||
docker run -it -v "$(pwd)/mongodb_chain.pem:/chain.pem" --rm rtsp/mongosh mongosh --tlsCAFile /chain.pem --tlsAllowInvalidCertificates --tlsAllowInvalidHostnames --tls -u "$MUSER" -p "$MPASS" "mongodb://$MONGO_IP:27017" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#! /bin/sh | ||
|
||
# ACESS to monogodb as user | ||
MPASS=$(kubectl get secret -n armonik mongodb-user -o jsonpath="{.data.password}" | base64 --decode) | ||
MUSER=$(kubectl get secret -n armonik mongodb-user -o jsonpath="{.data.username}" | base64 --decode) | ||
MPASS="$(kubectl get secret -n armonik mongodb-user -o jsonpath="{.data.password}" | base64 --decode)" | ||
MUSER="$(kubectl get secret -n armonik mongodb-user -o jsonpath="{.data.username}" | base64 --decode)" | ||
kubectl get secret -n armonik mongodb-user-certificates -o jsonpath="{.data.chain\.pem}" | base64 --decode > ./mongodb_chain.pem | ||
MONGO_IP=$(kubectl get svc mongodb-0 -n armonik -o custom-columns="IP:.spec.clusterIP" --no-headers=true) | ||
docker run -it -v $(pwd)/mongodb_chain.pem:/chain.pem --rm rtsp/mongosh mongosh --tlsCAFile /chain.pem --tlsAllowInvalidCertificates --tlsAllowInvalidHostnames --tls -u $MUSER -p $MPASS mongodb://$MONGO_IP:27017/database #--eval 'db.serverStatus()' | ||
MONGO_IP="$(kubectl get svc mongodb-0 -n armonik -o custom-columns="IP:.spec.clusterIP" --no-headers=true)" | ||
docker run -it -v "$(pwd)/mongodb_chain.pem:/chain.pem" --rm rtsp/mongosh mongosh --tlsCAFile /chain.pem --tlsAllowInvalidCertificates --tlsAllowInvalidHostnames --tls -u "$MUSER" -p "$MPASS" "mongodb://$MONGO_IP:27017/database" #--eval 'db.serverStatus()' |
Empty file.
Oops, something went wrong.