Cloud Native Pattern Management

Use Meshery to Deploy a Cloud Native Pattern

You can use Meshery to deploy a cloud native pattern. Cloud native patterns are detailed as a YAML file. See the Configuration Management guide.

Pattern Repository

See Meshery Catalog.

You may bring your own patterns or find them available through your chosen provider. Each service mesh pattern carries a unique identifier for reference. The patterns in this repository serve in an educational capacity, facilitating learning, and also serve in an operational capacity, facilitating implementation and validation of your service mesh deployment’s adherence to a pattern.

Sample Patterns

Basic Istio Install

pattern-id: MESHERY001
pattern-name: Basic Istio Install
service-mesh:				    # (required*) one or more service meshes
  istio-acme:				    # (required*) name of the instance mesh
    type: IstioMesh			    # (required*) type of service mesh
    namespace: istio-system		# (required*) control plane namespace required
    settings:				    # (optional) control and data plane settings
      version: 1.8.2			# (required) service mesh build version
      profile: demo				# (optional) reference to service mesh configuration
    traits:				    # (required) one or more configuration 
      mTLS:				    # (optional)
        policy: mutual			# (optional)
        namespaces:			  # (optional)
          - istio-test			 # (optional)
      automaticSidecarInjection:    # (optional)
        namespaces:			    # (optional)
          - default				# (optional)
          - istio-test			# (optional)

Duration-based Canary Rollout

pattern-id: MESHERY002
pattern-name: Duration-based Canary Rollout
namespace: meshy-app
    replicas: 5
    - name: svc-demo
        image: layer5/meshy-app:v5
        - name: http
        containerPort: 8080
        protocol: TCP
            memory: 32Mi
            cpu: 5m
    - 8080:8080
        - setWeight: 20
        - pause: {duration: 60}
        - setWeight: 40
        - pause: {duration: 10}
        - setWeight: 60
        - pause: {duration: 10}
        - setWeight: 80
        - pause: {duration: 10}

Sample Application

name: ApplicationPattern # display name in Meshery UI
    type: Application
    namespace: test
      replicas: 1
        - name: meshy
          image: utkarsh23/meshy:v5
            - name: http
              containerPort: 8080

Importing Patterns

You can import a pattern using mesheryctl or Meshery UI. Patterns can be imported from your local filesystem, an HTTP/S endpoint, or from GitHub. When provided a GitHub location (org/repo), Meshery will recursively search the given directory (or the entire repository) for existing pattern files.

Using Meshery CLI

To import a pattern, execute this command:

$ mesheryctl pattern import -f <path to the pattern>
Importing pattern…
Pattern successfully imported.

Using Meshery UI:

From Meshery UI, patterns can be imported from your local filesystem or imported from a remote URL.

To upload from url click the link icon

To deploy a pattern, execute this command:

$ mesheryctl pattern apply -f <path to the pattern>
Deploying pattern…
Pattern successfully applied.

From here, output and behavior will vary based upon the specific pattern you’re deploying. Should you find that your pattern is not successfully deployed, refer to the pattern troubleshooting guide in the Meshery documentation.

As you step through each pattern, you might choose to modify the pattern to suit your specific environment and workload, exploring in-context of your specific situation. Optionally, you may choose to use a plugin like MeshMap, or another visual service mesh topology tool, to facilitate your comprehension of the patterns and to literally see the patterns in-action.

Take time to explore. Try deploying one service mesh’s sample application onto a different service mesh and compare differences in behavior and each service mesh’s ability to manage it. If using Meshery to do so, execute the following commands as an example to deploy the sample application, BookCatalog, onto Open Service Mesh:

$ mesheryctl pattern apply -f book-catalog
Deploying application “BookCatalog”...
Deployed. Endpoint(s) available at: http://localhost:8000/catalog