Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing k8s action in the workflow #70

Merged
merged 24 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/configurable-benchmark-test-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ jobs:
sudo apt-cache policy docker-ce
sudo apt install -y docker-ce
sudo systemctl status docker
sudo mkdir -p ~/.kube
sudo chmod 777 ~/.kube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

- name: Setup Kubernetes
uses: manusa/[email protected]
with:
minikube version: 'v1.23.2'
kubernetes version: 'v1.23.2'
driver: docker
start args: --disk-size 10000mb
- name: Start minikube
run: |
minikube start --memory 5000
kubectl get po -A

- name: Checkout Code
uses: actions/checkout@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/configurable-benchmark-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
minikube version: v1.23.2
kubernetes version: v1.23.2
driver: docker
start args: --disk-size 10000mb

- name: Checkout Code
uses: actions/checkout@v2
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/scheduled-benchmarks-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,19 @@ jobs:
sudo systemctl status docker
sudo mkdir -p ~/.kube
sudo chmod 777 ~/.kube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

- name: Setup Kubernetes
uses: manusa/[email protected]
with:
minikube version: 'v1.23.2'
kubernetes version: 'v1.23.2'
driver: docker
start args: --disk-size 10000mb

- name: Start minikube
run: |
minikube start --memory 5000
kubectl get po -A

- name: Checkout Code
uses: actions/checkout@v2


- name: Install Service Mesh and Deploy Application
run: |
chmod +x .github/workflows/scripts/${{ matrix.service-mesh }}_deploy.sh
Expand Down Expand Up @@ -225,14 +226,14 @@ jobs:
sudo systemctl status docker
sudo mkdir -p ~/.kube
sudo chmod 777 ~/.kube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

- name: Setup Kubernetes
uses: manusa/[email protected]
with:
minikube version: 'v1.23.2'
kubernetes version: 'v1.23.2'
driver: docker
start args: --disk-size 10000mb

- name: Start minikube
run: |
minikube start --memory 5000
kubectl get po -A

- name: Checkout Code
uses: actions/checkout@v2
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/scheduled-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ jobs:
- name: Setup Kubernetes
uses: manusa/[email protected]
with:
minikube version: 'v1.23.2'
kubernetes version: 'v1.23.2'
minikube version: v1.23.2
kubernetes version: v1.23.2
driver: docker
start args: --disk-size 10000mb

- name: Checkout Code
uses: actions/checkout@v2
Expand Down Expand Up @@ -77,7 +76,6 @@ jobs:
minikube version: 'v1.23.2'
kubernetes version: 'v1.23.2'
driver: docker
start args: --disk-size 10000mb

- name: Checkout Code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ inputs:
required: false

runs:
using: "node12"
using: "node16"
main: "main.js"

branding:
Expand Down
4 changes: 2 additions & 2 deletions meshery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ main() {

parse_command_line "$@"

echo "Checking if a k8s cluster exits..."
echo "Checking if a k8s cluster exists..."
if kubectl config current-context
then
echo "Cluster found"
Expand Down Expand Up @@ -46,7 +46,7 @@ create_k8s_cluster() {
sudo apt update -y
sudo apt install conntrack
minikube version
minikube start --driver=none --kubernetes-version=v1.20.7
minikube start --driver=none --kubernetes-version=v1.23.2
sleep 40
}

Expand Down
45 changes: 27 additions & 18 deletions mesheryctl.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,43 @@ main() {
then
# get the mesh name from performance test config
service_mesh=$(mesheryctl perf view $perf_profile_name -t ~/auth.json -o json 2>&1 | jq '."service_mesh"' | tr -d '"')

if [[ $service_mesh != "null" ]]
echo "Checking service mesh list from given profile..."
#echo $service_mesh
if [[ -n $service_mesh ]]
then

shortName=$(echo ${adapters["$service_mesh"]} | cut -d ':' -f1)
echo "Service mesh is present from profile."
shortName=$(echo ${adapters[$service_mesh]} | cut -d ':' -f1)
echo $shortName
shortName=${shortName#meshery-} #remove the prefix "meshery-"
if [[ -z $shortName ]]
then
echo "'shortName' value is empty. Provide a valid profile containing with service mesh name, else contact us to raise an issue!"
exit 1
else
docker network connect bridge meshery_meshery-"$shortName"_1
docker network connect minikube meshery_meshery-"$shortName"_1
fi
docker network connect bridge meshery_meshery_1
docker network connect minikube meshery_meshery_1
docker network connect bridge meshery_meshery-"$shortName"_1
docker network connect minikube meshery_meshery-"$shortName"_1

mesheryctl system config minikube -t ~/auth.json

else
echo "Service mesh not found from profile. Invalid profile name has been provided"
exit 1
fi
rand_string=$(openssl rand -hex 3)
perf_profile_name="$rand_string-$perf_profile_name"
#rand_string=$(openssl rand -hex 3)
#perf_profile_name="$rand_string-$perf_profile_name"
echo "Running test with performance profile $perf_profile_name"
mesheryctl perf apply $perf_profile_name -t ~/auth.json --yes

else
for service_mesh in "${!adapters[@]}"
do
shortName=$(echo ${adapters["$service_mesh"]} | cut -d ':' -f1)
shortName=${shortName#meshery-} #remove the prefix "meshery-"

docker network connect bridge meshery_meshery-"$shortName"_1
docker network connect minikube meshery_meshery-"$shortName"_1
done

echo "Executing from given test config file..."
#echo $service_mesh
shortName=$(echo ${adapters[$service_mesh]} | cut -d ':' -f1)
shortName=${shortName#meshery-} #remove the prefix "meshery-"
docker network connect bridge meshery_meshery-"$shortName"_1
docker network connect minikube meshery_meshery-"$shortName"_1

docker network connect bridge meshery_meshery_1
docker network connect minikube meshery_meshery_1
mesheryctl system config minikube -t ~/auth.json
Expand Down