-
Notifications
You must be signed in to change notification settings - Fork 22
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
Replace kubectl apply
with mesheryctl app onboard
command
#48
Changes from all commits
57c9a8d
1e3ff9a
c9a7601
eb8d0ff
68deb2b
ae4542f
2b78a91
e6f4b89
f7137c6
06b42ae
ba03204
74bd086
5060933
5955b0a
c51244f
592170e
d871f9d
d615a5d
99acb72
dd26f7c
2833e6c
58952bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"meshery-provider":"None","token":""} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,68 @@ | ||
# This workflow runs performance benchmarks with Meshery based on the configuration provided | ||
# This workflow needs to be triggered manually by providing the test configuration | ||
|
||
name: Configurable Benchmark Test | ||
on: | ||
# for triggering the workflow, provide these inputs | ||
workflow_dispatch: | ||
inputs: | ||
profile_name: | ||
description: "performance profile to use" | ||
required: false | ||
profile_filename: | ||
description: "test configuration file" | ||
required: false | ||
service_mesh: | ||
type: choice | ||
required: false | ||
description: "service mesh being tested" | ||
options: | ||
- istio | ||
- linkerd | ||
load_generator: | ||
type: choice | ||
required: false | ||
description: "load generator to run tests with" | ||
options: | ||
- fortio | ||
- wrk2 | ||
- nighthawk | ||
|
||
jobs: | ||
manual-test: | ||
name: Configurable Benchmark Test | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
steps: | ||
- name: Setup Kubernetes | ||
uses: manusa/[email protected] | ||
with: | ||
minikube version: 'v1.23.2' | ||
kubernetes version: 'v1.23.2' | ||
driver: docker | ||
start args: "--v=5" | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Service Mesh and Deploy Application | ||
run: | | ||
chmod +x .github/workflows/scripts/${{ github.event.inputs.service_mesh }}_deploy.sh | ||
.github/workflows/scripts/${{ github.event.inputs.service_mesh }}_deploy.sh | ||
shell: bash | ||
|
||
- name: Run Benchmark Tests | ||
uses: layer5io/meshery-smp-action@master | ||
with: | ||
provider_token: ${{ secrets.MESHERY_TOKEN }} | ||
platform: docker | ||
profile_name: ${{ github.event.inputs.profile_name }} | ||
profile_filename: ${{ github.event.inputs.profile_filename }} | ||
endpoint_url: ${{env.ENDPOINT_URL}} | ||
service_mesh: ${{env.SERVICE_MESH}} | ||
load_generator: ${{ github.event.inputs.load_generator }} | ||
test_name: '${{ github.event.inputs.service_mesh }}-${{ github.event.inputs.load_generator }}-${{ github.event.inputs.profile_filename }}${{ github.event.inputs.profile_name }}' | ||
# This workflow runs performance benchmarks with Meshery based on the configuration provided | ||
# This workflow needs to be triggered manually by providing the test configuration | ||
|
||
name: Configurable Benchmark Test | ||
on: | ||
# for triggering the workflow, provide these inputs | ||
workflow_dispatch: | ||
inputs: | ||
profile_name: | ||
description: "performance profile to use" | ||
required: false | ||
profile_filename: | ||
description: "test configuration file" | ||
required: false | ||
service_mesh: | ||
type: choice | ||
required: false | ||
description: "service mesh being tested" | ||
options: | ||
- istio | ||
- linkerd | ||
load_generator: | ||
type: choice | ||
required: false | ||
description: "load generator to run tests with" | ||
options: | ||
- fortio | ||
- wrk2 | ||
- nighthawk | ||
|
||
jobs: | ||
manual-test: | ||
name: Configurable Benchmark Test | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
steps: | ||
- name: Setup Kubernetes | ||
uses: medyagh/[email protected] | ||
with: | ||
minikube version: v1.23.2 | ||
kubernetes version: v1.23.2 | ||
driver: docker | ||
apus: 4 | ||
memory: 5192 | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Service Mesh and Deploy Application | ||
run: | | ||
chmod +x .github/workflows/scripts/${{ github.event.inputs.service_mesh }}_deploy.sh | ||
.github/workflows/scripts/${{ github.event.inputs.service_mesh }}_deploy.sh | ||
shell: bash | ||
|
||
- name: Initiate tmate session | ||
uses: mxschmitt/action-tmate@v3 | ||
|
||
- name: Run Benchmark Tests | ||
uses: layer5io/meshery-smp-action@master | ||
with: | ||
provider_token: ${{ secrets.MESHERY_TOKEN }} | ||
platform: docker | ||
profile_name: ${{ github.event.inputs.profile_name }} | ||
profile_filename: ${{ github.event.inputs.profile_filename }} | ||
endpoint_url: ${{env.ENDPOINT_URL}} | ||
service_mesh: ${{env.SERVICE_MESH}} | ||
load_generator: ${{ github.event.inputs.load_generator }} | ||
test_name: '${{ github.event.inputs.service_mesh }}-${{ github.event.inputs.load_generator }}-${{ github.event.inputs.profile_filename }}${{ github.event.inputs.profile_name }}' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script is used to deploy Istio on Kubernetes | ||
# | ||
# Also deploys the bookinfo application on Istio and passes the gateway URL to Meshery | ||
|
||
# See: https://github.com/service-mesh-performance/service-mesh-performance/blob/master/protos/service_mesh.proto | ||
|
||
export MESH_NAME='Istio' | ||
export SERVICE_MESH='ISTIO' | ||
|
||
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.11.4 sh - | ||
cd istio-1.11.4 | ||
export PATH=$PWD/bin:$PATH | ||
istioctl install --set profile=demo -y | ||
kubectl label namespace default istio-injection=enabled | ||
# Check if mesheryctl is present, else install it | ||
if ! [ -x "$(command -v mesheryctl)" ]; then | ||
echo 'mesheryctl is not installed. Installing mesheryctl client... Standby... (Starting Meshery as well...)' >&2 | ||
curl -L https://meshery.io/install | ADAPTERS=istio PLATFORM=kubernetes bash - | ||
fi | ||
|
||
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml | ||
kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml | ||
sleep 10 | ||
#mesheryctl system login --provider None | ||
echo 'E' | mesheryctl mesh deploy adapter meshery-istio:10000 --token "./.github/workflows/auth.json" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably the Istio didn't deploy completely, can we add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Istio is deployed, I found a possible cause now, size of minikube cluster isn't sufficient, I'll change size and check |
||
sleep 50 | ||
echo "Onboarding application... Standby for few minutes..." | ||
mesheryctl pattern apply -f "https://github.com/service-mesh-patterns/service-mesh-patterns/blob/master/samples/bookInfoPattern.yaml" --token "./.github/workflows/auth.json" | ||
|
||
# Wait for the application to be ready | ||
sleep 100 | ||
sleep 50 | ||
|
||
# Get the gateway URL and export it and | ||
# Expose the service inside the cluster | ||
|
@@ -31,6 +34,5 @@ minikube tunnel &> /dev/null & | |
|
||
echo "Service Mesh: $MESH_NAME - $SERVICE_MESH" | ||
echo "Gateway URL: $GATEWAY_URL" | ||
|
||
echo "ENDPOINT_URL=$GATEWAY_URL/productpage" >> $GITHUB_ENV | ||
echo "SERVICE_MESH=$SERVICE_MESH" >> $GITHUB_ENV |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -8,16 +8,18 @@ | |||||
export MESH_NAME='Linkerd' | ||||||
export SERVICE_MESH='LINKERD' | ||||||
|
||||||
curl -fsL https://run.linkerd.io/install | sh | ||||||
export PATH=$PATH:/home/runner/.linkerd2/bin | ||||||
linkerd version | ||||||
linkerd check --pre | ||||||
linkerd install | kubectl apply -f - | ||||||
linkerd check | ||||||
# Check if mesheryctl is present, else install it | ||||||
if ! [ -x "$(command -v mesheryctl)" ]; then | ||||||
echo 'mesheryctl is not installed. Installing mesheryctl client... Standby... (Starting Meshery as well...)' >&2 | ||||||
curl -L https://meshery.io/install | ADAPTERS=linkerd PLATFORM=kubernetes bash - | ||||||
fi | ||||||
|
||||||
curl -fsL https://run.linkerd.io/emojivoto.yml | kubectl apply -f - | ||||||
kubectl -n emojivoto port-forward svc/web-svc 8080:80 &> /dev/null & | ||||||
kubectl get -n emojivoto deploy -o yaml | linkerd inject - | kubectl apply -f - | ||||||
curl -fsL https://run.linkerd.io/emojivoto.yml | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The curl command isn't putting the output in a file. For reference :- https://github.com/hershd23/meshery-smp-action/runs/6868074975?check_suite_focus=true#step:4:285 We can add it explicitly like shown
Suggested change
|
||||||
sleep 10 | ||||||
mesheryctl system login --provider None | ||||||
mesheryctl mesh deploy adapter meshery-linkerd:10001 | ||||||
echo "Onboarding application... Standby for few minutes..." | ||||||
mesheryctl app onboard -f "./emojivoto.yml" | ||||||
|
||||||
# Wait for the application to be ready | ||||||
sleep 100 | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can set cpu and memory like:
start args: "--cpu 4 --memory 5192"
without changing repo.