diff --git a/docs/pages/guides/index.md b/docs/pages/guides/index.md index acba19419db..3edff9e7db4 100644 --- a/docs/pages/guides/index.md +++ b/docs/pages/guides/index.md @@ -10,14 +10,25 @@ Guides to using Meshery's various features and components. {% assign sorted_guides = site.pages | sort: "type" | reverse %} -
+ +### bash >= 4.0 + ++++ source /dev/stdin <<< "$(mesheryctl system completion bash)" +
+ +### bash <= 3.2 on MacOS + ++++ source <(mesheryctl system completion bash) +
+ +### bash >= 4.0 on MacOS + ++++ brew install bash-completion # ensure you have bash-completion 1.3+ + mesheryctl system completion bash > $(brew --prefix)/etc/bash_completion.d/mesheryctl +
+ +## Autocompletion for zsh + ++++ brew install bash-completion@2 + mesheryctl system completion bash > $(brew --prefix)/etc/bash_completion.d/mesheryctl +
+++ source <(mesheryctl system completion zsh) +
+_Note_ : You might need to restart your shell for this setup to take effect. + +#### zsh on MacOS and Oh My zsh + ++++ ~/.zshrc > echo "autoload -U compinit; compinit" +
+ +### Autocompletion for fish + ++++ mesheryctl system completion zsh > "${fpath[1]}/_mesheryctl" +
+++ mesheryctl system completion fish | source +
+ +# Suggested Reading + +- For an exhaustive list of commands and syntax, refer to the **[`mesheryctl` Command Reference]({{ site.baseurl }}/guides/mesheryctl-commands)**. +- To upgrade `mesheryctl`, refer to the **[Upgrade Guide]({{ site.baseurl }}/guides/upgrade)**. diff --git a/docs/pages/guides/mesheryctl/index.md b/docs/pages/guides/mesheryctl/index.md new file mode 100644 index 00000000000..bccae7856ee --- /dev/null +++ b/docs/pages/guides/mesheryctl/index.md @@ -0,0 +1,45 @@ +--- +layout: default +title: Meshery CLI Guides +permalink: guides/mesheryctl +language: en +list: exclude +--- + +Guides to using Meshery's various features and components. + +{% assign sorted_guides = site.pages | sort: "type" | reverse %} + ++++ mesheryctl system completion fish > ~/.config/fish/completions/mesheryctl.fish +
Find an exhaustive list of commands and their syntax.
+To upgrade mesheryctl
, refer to the Upgrade Guide.
- -**Upgrading with Homebrew** - -To upgrade `mesheryctl`, execute the following command: - ---- brew tap layer5io/tap - brew install mesheryctl - mesheryctl system start -
- -#### Bash - -**Installing with Bash** - -Install `mesheryctl` and run Meshery on Mac or Linux with this script: - ---- brew upgrade mesheryctl -
- -**Upgrading with Bash** - -Upgrade `mesheryctl` and run Meshery on Mac or Linux with this script: - ---- curl -L https://git.io/meshery | bash - -
- -## Windows - -### Installing the `mesheryctl` binary - -Download and unzip `mesheryctl` from the [Meshery releases](https://github.com/layer5io/meshery/releases/latest) page. Add `mesheryctl` to your PATH for ease of use. Then, execute: - ---- curl -L https://git.io/meshery | bash - -
- -### Scoop - -Use [Scoop](https://scoop.sh) to install Meshery on your Windows machine. - -**Installing with Scoop** - -Add the Meshery Scoop Bucket and install: - ---- ./mesheryctl system start -
- -**Upgrading with Scoop** - -To upgrade `mesheryctl`, execute the following command: - ---- scoop bucket add mesheryctl https://github.com/layer5io/scoop-bucket.git - scoop install mesheryctl -
- -## Advanced Installation - -Users can control the specific container image and tag (version) of Meshery that they would like to run by editing their local *~/.meshery/meshery.yaml* (a docker compose file). -Aligned with the Meshery container image, instead of leaving the implicit :stable-latest tag behind image: layer5/meshery, users will instead identify a specific image tag like so: - -``` -bash -version: '3' -services: - meshery: - image: layer5/meshery:v0.5.0 - labels: - - "com.centurylinklabs.watchtower.enable=true" -``` - -# Configuring Autocompletion for `mesheryctl` - -If you would like to have `mesheryctl` commands automatically completed for use as you use `mesheryctl`, then use the following instructions to configure automatic completion within your environment. - -## Autocompletion for Bash - -### bash <= 3.2 - ---- scoop update mesheryctl -
- -### bash >= 4.0 - ---- source /dev/stdin <<< "$(mesheryctl system completion bash)" -
- -### bash <= 3.2 on MacOS - ---- source <(mesheryctl system completion bash) -
- -### bash >= 4.0 on MacOS - ---- brew install bash-completion # ensure you have bash-completion 1.3+ - mesheryctl system completion bash > $(brew --prefix)/etc/bash_completion.d/mesheryctl -
- -## Autocompletion for zsh - ---- brew install bash-completion@2 - mesheryctl system completion bash > $(brew --prefix)/etc/bash_completion.d/mesheryctl -
--- source <(mesheryctl system completion zsh) -
-_Note_ : You might need to restart your shell for this setup to take effect. - -#### zsh on MacOS and Oh My zsh - ---- ~/.zshrc > echo "autoload -U compinit; compinit" -
- -### Autocompletion for fish - ---- mesheryctl system completion zsh > "${fpath[1]}/_mesheryctl" -
--- mesheryctl system completion fish | source -
- -# Suggested Reading - -- For an exhaustive list of commands and syntax, refer to the **[`mesheryctl` Command Reference]({{ site.baseurl }}/guides/mesheryctl-commands)**. -- To upgrade `mesheryctl`, refer to the **[Upgrade Guide]({{ site.baseurl }}/guides/upgrade)**. diff --git a/docs/pages/installation/kubernetes.md b/docs/pages/installation/kubernetes.md index d54f0698547..b89c8fb9dd0 100644 --- a/docs/pages/installation/kubernetes.md +++ b/docs/pages/installation/kubernetes.md @@ -49,27 +49,15 @@ Deploy Meshery to your Kubernetes cluster by executing: ### **Using Helm** -#### 1. **Helm v3** Run the following:--- mesheryctl system completion fish > ~/.config/fish/completions/mesheryctl.fish -
-#### 2. **Helm v2** -Run the following: - -- $ git clone https://github.com/layer5io/meshery.git; cd meshery - $ kubectl create namespace meshery - $ helm install meshery --namespace meshery install/kubernetes/helm/meshery + $ helm repo add meshery https://meshery.io/charts/ + $ helm install my-meshery meshery/meshery --version 2.1.2
-### **Using Kubernetes Manifests** Meshery can also be deployed on an existing Kubernetes cluster. See [compatibility table](#compatibility-matrix) for version compatibility. To install Meshery on your cluster, clone the Meshery repo: @@ -118,8 +106,9 @@ If your Kubernetes cluster has a functional Ingress Controller, then you can con paths: - path: / backend: + # Please kindly check your service name and service port to confirm the Ingress can work well serviceName: meshery-service - servicePort: 8080 + servicePort: 9081 diff --git a/docs/pages/installation/mesheryctl.md b/docs/pages/installation/mesheryctl.md index 593e5964ed3..38360f89e9e 100644 --- a/docs/pages/installation/mesheryctl.md +++ b/docs/pages/installation/mesheryctl.md @@ -13,7 +13,7 @@ Meshery's command line client is `mesheryctl`. To install `mesheryctl` on your s ## Bash -**Install** +**Install** and **Upgrade**-- $ git clone https://github.com/layer5io/meshery.git; cd meshery - $ kubectl create namespace meshery - $ helm template meshery --namespace meshery install/kubernetes/helm/meshery | kubectl apply -f - -
-Continue deploying Meshery onto one of the [Supported Platforms]({{ site.baseurl }}/installation/platform). +Continue deploying Meshery onto one of the [Supported Platforms]({{ site.baseurl }}/installation/platforms). diff --git a/docs/pages/installation/platforms.md b/docs/pages/installation/platforms.md index 726533e4f04..28d0bdb0e41 100644 --- a/docs/pages/installation/platforms.md +++ b/docs/pages/installation/platforms.md @@ -13,6 +13,7 @@ Meshery deploys as a set of Docker containers, which can be deployed to either a ## Platform Compatibility Matrix + Find installation instructions for the Supported Platforms in the compatibility table. | Platform | Version | diff --git a/docs/pages/reference/mesheryctl-commands.md b/docs/pages/reference/mesheryctl-commands.md index f65407738dd..60a7f00a138 100644 --- a/docs/pages/reference/mesheryctl-commands.md +++ b/docs/pages/reference/mesheryctl-commands.md @@ -4,8 +4,8 @@ title: mesheryctl Command Reference abstract: "A guide to Meshery's CLI: mesheryctl" permalink: reference/mesheryctl redirect_from: - - guides/mesheryctl - - guides/mesheryctl-commands +# - guides/mesheryctl +# - guides/mesheryctl-commands type: Reference --- ## Categories and Command Structure diff --git a/mesheryctl/internal/cli/root/experimental/experimental.go b/mesheryctl/internal/cli/root/experimental/experimental.go index d6ae239f8f1..13c3a970c84 100644 --- a/mesheryctl/internal/cli/root/experimental/experimental.go +++ b/mesheryctl/internal/cli/root/experimental/experimental.go @@ -4,7 +4,6 @@ import ( "fmt" "github.com/layer5io/meshery/mesheryctl/internal/cli/root/mesh" - "github.com/layer5io/meshery/mesheryctl/internal/cli/root/pattern" "github.com/layer5io/meshery/mesheryctl/internal/cli/root/system/context" "github.com/layer5io/meshery/mesheryctl/pkg/utils" "github.com/pkg/errors" @@ -30,6 +29,6 @@ var ExpCmd = &cobra.Command{ } func init() { - availableSubcommands = []*cobra.Command{mesh.MeshCmd, context.ContextCmd, pattern.PatternCmd} + availableSubcommands = []*cobra.Command{mesh.MeshCmd, context.ContextCmd} ExpCmd.AddCommand(availableSubcommands...) } diff --git a/mesheryctl/internal/cli/root/root.go b/mesheryctl/internal/cli/root/root.go index dcaee19e82a..8eb716e7aa0 100644 --- a/mesheryctl/internal/cli/root/root.go +++ b/mesheryctl/internal/cli/root/root.go @@ -21,6 +21,7 @@ import ( "github.com/layer5io/meshery/mesheryctl/internal/cli/root/experimental" "github.com/layer5io/meshery/mesheryctl/internal/cli/root/mesh" + "github.com/layer5io/meshery/mesheryctl/internal/cli/root/pattern" "github.com/layer5io/meshery/mesheryctl/internal/cli/root/perf" "github.com/layer5io/meshery/mesheryctl/internal/cli/root/system" "github.com/layer5io/meshery/mesheryctl/pkg/utils" @@ -103,6 +104,7 @@ func init() { availableSubcommands = []*cobra.Command{ versionCmd, system.SystemCmd, + pattern.PatternCmd, perf.PerfCmd, mesh.MeshCmd, experimental.ExpCmd, diff --git a/mesheryctl/internal/cli/root/system/start.go b/mesheryctl/internal/cli/root/system/start.go index ae707831136..5412520f7b9 100644 --- a/mesheryctl/internal/cli/root/system/start.go +++ b/mesheryctl/internal/cli/root/system/start.go @@ -49,10 +49,13 @@ var startCmd = &cobra.Command{ Args: cobra.NoArgs, PreRunE: func(cmd *cobra.Command, args []string) error { //Check prerequisite - if tempContext != "" { - return utils.PreReqCheck(cmd.Use, tempContext) + + err := utils.PreReqCheck(cmd.Use, tempContext) + if err != nil { + cmd.SilenceUsage = true } - return utils.PreReqCheck(cmd.Use, "") + + return err }, RunE: func(cmd *cobra.Command, args []string) error { if err := start(); err != nil { diff --git a/models/meshery_pattern_persister.go b/models/meshery_pattern_persister.go index 998e31bd5a4..312894b024a 100644 --- a/models/meshery_pattern_persister.go +++ b/models/meshery_pattern_persister.go @@ -36,7 +36,7 @@ func (mpp *MesheryPatternPersister) GetMesheryPatterns(search, order string, pag if search != "" { like := "%" + strings.ToLower(search) + "%" - query = query.Where("(lower(meshery_pattern.name) like ?)", like) + query = query.Where("(lower(meshery_patterns.name) like ?)", like) } query.Table("meshery_patterns").Count(&count)@@ -97,5 +97,5 @@ scoop update mesheryctl