Setup OSM

Prerequisites

This demo of OSM v1.2.0 requires:

Note: This document assumes you have already installed credentials for a Kubernetes cluster in ~/.kube/config and kubectl cluster-info executes successfully.

Download and install the OSM command-line tool

The osm command-line tool contains everything needed to install and configure Open Service Mesh. The binary is available on the OSM GitHub releases page.

For GNU/Linux and macOS

Download the 64-bit GNU/Linux or macOS binary of OSM v1.2.0:

  1. system=$(uname -s)
  2. release=v1.2.0
  3. curl -L https://github.com/openservicemesh/osm/releases/download/${release}/osm-${release}-${system}-amd64.tar.gz | tar -vxzf -
  4. ./${system}-amd64/osm version

For Windows

Download the 64-bit Windows OSM v1.2.0 binary via Powershell:

  1. wget https://github.com/openservicemesh/osm/releases/download/v1.2.0/osm-v1.2.0-windows-amd64.zip -o osm.zip
  2. unzip osm.zip
  3. .\windows-amd64\osm.exe version

The osm CLI can be compiled from source using this guide.

Installing OSM on Kubernetes

With the osm binary downloaded and unzipped, we are ready to install Open Service Mesh on a Kubernetes cluster:

The command below shows how to install OSM on your Kubernetes cluster. This command enables Prometheus, Grafana, and Jaeger integrations. The osm.enablePermissiveTrafficPolicy chart parameter in the values.yaml file instructs OSM to ignore any policies and let traffic flow freely between the pods. With Permissive Traffic Policy mode enabled, new pods will be injected with Envoy, but traffic will flow through the proxy and will not be blocked by access control policies.

Note: Permissive Traffic Policy mode is an important feature for brownfield deployments, where it may take some time to craft SMI policies. While operators design the SMI policies, existing services will continue to operate as they have been before OSM was installed.

  1. export osm_namespace=osm-system # Replace osm-system with the namespace where OSM will be installed
  2. export osm_mesh_name=osm # Replace osm with the desired OSM mesh name
  3. osm install \
  4. --mesh-name "$osm_mesh_name" \
  5. --osm-namespace "$osm_namespace" \
  6. --set=osm.enablePermissiveTrafficPolicy=true \
  7. --set=osm.deployPrometheus=true \
  8. --set=osm.deployGrafana=true \
  9. --set=osm.deployJaeger=true

Read more on OSM’s integrations with Prometheus, Grafana, and Jaeger in the observability documentation.

Next Steps

Now that the OSM control plane is up and running, add applications to the mesh.