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

Use mesheryctl to deploy service meshes #25

Closed
Closed
Changes from 4 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
27 changes: 27 additions & 0 deletions .github/workflows/scripts/mesh_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
MESH=$1

echo "Checking if mesheryctl is installed"

if mesheryctl

then
echo "found mesheryctl, deploying $MESH"
mesheryctl mesh deploy $MESH

else
printf "Mesheryctl not found. \nInstalling...\n"
install_mesheryctl
echo "Installed mesheryctl successfully!"
mesheryctl mesh deploy $MESH

fi





install_mesheryctl(){
curl -L https://github.com/meshery/meshery/releases/download/v0.5.67/mesheryctl_0.5.67_Linux_x86_64.zip -o mesheryctl.zip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't hardcode the version. Use the same command from the official docs: https://meshery.io. Any reason to deviate?

unzip -n mesheryctl.zip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason we shouldn't overwrite the existing files?

mv mesheryctl /usr/local/bin/mesheryctl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember right, there would be a permission issue? Maybe there is other solution here?https://unix.stackexchange.com/questions/37724/permissions-ownership-of-usr-local-bin

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I'm not sure, as far as I know, workflow runners usually run as a privileged user

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. We don't need to change this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use the approved installation procedure, this is already considered for.

// @hexxdump

}