Skip to content

Commit

Permalink
manifests: store docs manifests in same repo (openservicemesh#308)
Browse files Browse the repository at this point in the history
Stores the manifests used by the docs repo
from osm/docs/examples/manifests in the osm-docs
repo. This makes it easier to update and maintain
the manifests used by the website without needing
to make changes across 2 repos.

Resolves openservicemesh#242

Signed-off-by: Shashank Ram <shashr2204@gmail.com>
  • Loading branch information
shashankram authored Jan 14, 2022
1 parent 2bce33b commit e276b34
Show file tree
Hide file tree
Showing 33 changed files with 1,006 additions and 36 deletions.
8 changes: 4 additions & 4 deletions content/docs/demos/canary_rollout.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The following steps demonstrate the canary rollout deployment strategy.
osm namespace add curl
# Deploy curl client in the curl namespace
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/curl/curl.yaml -n curl
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/curl/curl.yaml -n curl
```

Confirm the `curl` client pod is up and running.
Expand All @@ -62,13 +62,13 @@ The following steps demonstrate the canary rollout deployment strategy.
osm namespace add httpbin
# Create the httpbin root service and service account
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/canary/httpbin.yaml -n httpbin
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/canary/httpbin.yaml -n httpbin
```

1. Deploy version `v1` of the `httpbin` service. The service `httpbin-v1` has the selector `app: httpbin, version: v1`, and the deployment `httpbin-v1` has the labels `app: httpbin, version: v1` matching the selector of both the `httpbin` root service and `httpbin-v1` service.

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/canary/httpbin-v1.yaml -n httpbin
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/canary/httpbin-v1.yaml -n httpbin
```

1. Create an SMI TrafficSplit resource that directs all traffic to the `httpbin-v1` service.
Expand Down Expand Up @@ -119,7 +119,7 @@ The following steps demonstrate the canary rollout deployment strategy.
1. Prepare the canary rollout by deploying version `v2` of the `httpbin` service. The service `httpbin-v2` has the selector `app: httpbin, version: v2`, and the deployment `httpbin-v2` has the labels `app: httpbin, version: v2` matching the selector of both the `httpbin` root service and `httpbin-v2` service.
```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/canary/httpbin-v2.yaml -n httpbin
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/canary/httpbin-v2.yaml -n httpbin
```
1. Perform the canary rollout by updating the SMI TrafficSplit resource to split traffic directed to the root service FQDN `httpbin.httpbin.svc.cluster.local` to both the `httpbin-v1` and `httpbin-v2` services, fronting the `v1` and `v2` versions of the `httpbin` service respectively. We will distribute the weight equally to demonstrate traffic splitting.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/demos/egress_passthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This guide demonstrates a client within the service mesh accessing destinations
osm namespace add curl
# Deploy curl client in the curl namespace
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/curl/curl.yaml -n curl
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/curl/curl.yaml -n curl
```

Confirm the `curl` client pod is up and running.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/demos/egress_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This guide demonstrates a client within the service mesh accessing destinations
osm namespace add curl
# Deploy curl client in the curl namespace
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/curl/curl.yaml -n curl
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/curl/curl.yaml -n curl
```

Confirm the `curl` client pod is up and running.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/demos/ingress_contour.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ kubectl create ns httpbin
osm namespace add httpbin

# Deploy the application
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/httpbin/httpbin.yaml -n httpbin
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/httpbin/httpbin.yaml -n httpbin
```

Confirm the `httpbin` service and pod is up and running:
Expand Down
2 changes: 1 addition & 1 deletion content/docs/demos/ingress_k8s_nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ kubectl create ns httpbin
osm namespace add httpbin

# Deploy the application
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/httpbin/httpbin.yaml -n httpbin
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/httpbin/httpbin.yaml -n httpbin
```

Confirm the `httpbin` service and pod is up and running:
Expand Down
2 changes: 1 addition & 1 deletion content/docs/demos/outbound_ip_exclusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The following demo shows an HTTP `curl` client making HTTP requests to the `http
osm namespace add curl
# Deploy curl client in the curl namespace
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/curl/curl.yaml -n curl
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/curl/curl.yaml -n curl
```

Confirm the `curl` client pod is up and running.
Expand Down
4 changes: 2 additions & 2 deletions content/docs/demos/permissive_traffic_mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The following demo shows an HTTP `curl` client making HTTP requests to the `http
osm namespace add httpbin
# Deploy httpbin service in the httpbin namespace
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/httpbin/httpbin.yaml -n httpbin
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/httpbin/httpbin.yaml -n httpbin
```

Confirm the `httpbin` service and pods are up and running.
Expand All @@ -63,7 +63,7 @@ The following demo shows an HTTP `curl` client making HTTP requests to the `http
osm namespace add curl
# Deploy curl client in the curl namespace
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/curl/curl.yaml -n curl
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/curl/curl.yaml -n curl
```

Confirm the `curl` client pod is up and running.
Expand Down
4 changes: 2 additions & 2 deletions content/docs/demos/tcp_traffic_routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The following demo shows a TCP client sending data to a `tcp-echo` server, which
osm namespace add tcp-demo
# Deploy the service
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/apps/tcp-echo.yaml -n tcp-demo
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/apps/tcp-echo.yaml -n tcp-demo
```

Confirm the `tcp-echo` service and pod is up and running.
Expand All @@ -58,7 +58,7 @@ The following demo shows a TCP client sending data to a `tcp-echo` server, which
osm namespace add curl
# Deploy curl client in the curl namespace
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/samples/curl/curl.yaml -n curl
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/curl/curl.yaml -n curl
```

Confirm the `curl` client pod is up and running.
Expand Down
22 changes: 11 additions & 11 deletions content/docs/getting_started/install_apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ We are going to define and deploy traffic access policies using [SMI](https://sm
state of allowed and blocked traffic between pods:

| from / to: | bookbuyer | bookthief | bookstore | bookwarehouse | mysql |
|---------------|-----------|-----------|-----------|---------------|-------|
| bookbuyer | n/a | | | | |
| bookthief | | n/a | | | |
| bookstore | | | n/a | | |
| bookwarehouse | | | | n/a | |
| mysql | | | | | n/a |
| ------------- | --------- | --------- | --------- | ------------- | ----- |
| bookbuyer | n/a | | | | |
| bookthief | | n/a | | | |
| bookstore | | | n/a | | |
| bookwarehouse | | | | n/a | |
| mysql | | | | | n/a |


To show how to split traffic using SMI Traffic Split, we will deploy an additional application:
Expand Down Expand Up @@ -60,31 +60,31 @@ on these namespaces, will start injecting all **new** pods with Envoy sidecars.
Create the `bookbuyer` service account and deployment:

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/apps/bookbuyer.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/apps/bookbuyer.yaml
```

Create the `bookthief` service account and deployment:

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/apps/bookthief.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/apps/bookthief.yaml
```

Create the `bookstore` service account, service, and deployment:

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/apps/bookstore.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/apps/bookstore.yaml
```

Create the `bookwarehouse` service account, service, and deployment:

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/apps/bookwarehouse.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/apps/bookwarehouse.yaml
```

Create the `mysql` service account, service, and stateful set:

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/apps/mysql.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/apps/mysql.yaml
```

### Checkpoint: What Got Installed?
Expand Down
8 changes: 4 additions & 4 deletions content/docs/getting_started/traffic_policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ In permissive traffic policy mode, application connectivity within the mesh is a

Before proceeding, [verify the traffic policy mode](#verify-the-traffic-policy-mode) and ensure the `enablePermissiveTrafficPolicyMode` key is set to `true` in the `osm-mesh-config` `MeshConfig` resource. Refer to the section above to enable permissive traffic policy mode.

In step [Deploy the Bookstore Application](#deploy-the-bookstore-application), we have already deployed the applications needed to verify traffic flow in permissive traffic policy mode. The `bookstore` service we previously deployed is encoded with an identity of `bookstore-v1` for demo purpose, as can be seen in the [Deployment's manifest](https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/apps/bookstore.yaml). The identity reflects which counter increments in the `bookbuyer` and `bookthief` UI, and the identity displayed in the `bookstore` UI.
In step [Deploy the Bookstore Application](#deploy-the-bookstore-application), we have already deployed the applications needed to verify traffic flow in permissive traffic policy mode. The `bookstore` service we previously deployed is encoded with an identity of `bookstore-v1` for demo purpose, as can be seen in the [Deployment's manifest](https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/apps/bookstore.yaml). The identity reflects which counter increments in the `bookbuyer` and `bookthief` UI, and the identity displayed in the `bookstore` UI.

The counter in the `bookbuyer`, `bookthief` UI for the books bought and stolen respectively from `bookstore v1` should now be incrementing:

Expand Down Expand Up @@ -93,7 +93,7 @@ Apply the [SMI Traffic Target][https://github.com/servicemeshinterface/smi-spec/
Deploy SMI TrafficTarget and HTTPRouteGroup policy:

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/access/traffic-access-v1.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/access/traffic-access-v1.yaml
```

The counters should now be incrementing for the `bookbuyer`, and `bookstore` applications:
Expand Down Expand Up @@ -167,7 +167,7 @@ spec:
Apply the updated TrafficTarget:

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/access/traffic-access-v1-allow-bookthief.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/access/traffic-access-v1-allow-bookthief.yaml
```

The counter in the `bookthief` window will start incrementing.
Expand All @@ -177,7 +177,7 @@ The counter in the `bookthief` window will start incrementing.
Apply the original Traffic Target object without the bookthief listed as an allowed source:

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/access/traffic-access-v1.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/access/traffic-access-v1.yaml
```

The counter in the `bookthief` window will stop incrementing.
Expand Down
8 changes: 4 additions & 4 deletions content/docs/getting_started/traffic_split.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To demonstrate usage of SMI traffic access and split policies, we will now deplo
```bash
# Contains the bookstore-v2 Kubernetes Service, Service Account, Deployment and SMI Traffic Target resource to allow
# `bookbuyer` to communicate with `bookstore-v2` pods
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/apps/bookstore-v2.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/apps/bookstore-v2.yaml
```

Wait for the `bookstore-v2` pod to be running in the `bookstore` namespace. Next, exit and restart the `./scripts/port-forward-all.sh` script in order to access v2 of bookstore.
Expand All @@ -30,7 +30,7 @@ The counter should _not_ be incrementing because no traffic is flowing yet to th
Deploy the SMI traffic split policy to direct 100 percent of the traffic sent to the root `bookstore` service to the `bookstore` service backend:

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/split/traffic-split-v1.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/split/traffic-split-v1.yaml
```

_Note: The root service can be any Kubernetes service. It does not have any label selectors. It also doesn't need to overlap with any of the Backend services specified in the Traffic Split resource. The root service can be referred to in the SMI Traffic Split resource as the name of the service with or without the `.<namespace>` suffix._
Expand All @@ -46,7 +46,7 @@ kubectl describe trafficsplit bookstore-split -n bookstore
Update the SMI Traffic Split policy to direct 50 percent of the traffic sent to the root `bookstore` service to the `bookstore` service and 50 perfect to `bookstore-v2` service by adding the `bookstore-v2` backend to the spec and modifying the weight fields.

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/split/traffic-split-50-50.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/split/traffic-split-50-50.yaml
```

Wait for the changes to propagate and observe the counters increment for `bookstore` and `bookstore-v2` in your browser windows. Both
Expand All @@ -60,7 +60,7 @@ counters should be incrementing:
Update the `bookstore-split` TrafficSplit to configure all traffic to go to `bookstore-v2`:

```bash
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/split/traffic-split-v2.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/split/traffic-split-v2.yaml
```

Wait for the changes to propagate and observe the counters increment for `bookstore-v2` and freeze for `bookstore` in your
Expand Down
4 changes: 2 additions & 2 deletions content/docs/guides/integrations/external_auth_opa.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ cd <PATH_TO_OSM_REPO>
demo/run-osm-demo.sh # wait for all services to come up
```

- When OSM's demo is up and running, proceed to deploy `opa-envoy-plugin`. OSM provides a [curated standalone opa-envoy-plugin deployment chart](https://github.com/openservicemesh/osm/blob/{{< param osm_branch >}}/docs/example/manifests/opa/deploy-opa-envoy.yaml) which exposes `opa-envoy-plugin`'s gRPC port (default `9191`) through a service, over the network. This is the endpoint that OSM will configure the proxies with when enabling external authorization. The following snippet creates an `opa` namespace and deploys `opa-envoy-plugin` in it with minimal deny-all configuration:
- When OSM's demo is up and running, proceed to deploy `opa-envoy-plugin`. OSM provides a [curated standalone opa-envoy-plugin deployment chart](https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/opa/deploy-opa-envoy.yaml) which exposes `opa-envoy-plugin`'s gRPC port (default `9191`) through a service, over the network. This is the endpoint that OSM will configure the proxies with when enabling external authorization. The following snippet creates an `opa` namespace and deploys `opa-envoy-plugin` in it with minimal deny-all configuration:

```
kubectl create namespace opa
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm/{{< param osm_branch >}}/docs/example/manifests/opa/deploy-opa-envoy.yaml
kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/opa/deploy-opa-envoy.yaml
```

- Once OSM's demo is up and running, proceed to edit OSM's MeshConfig to add external authorization to the mesh. For that, configure the `inboundExternalAuthorization` to point to the remote external authorization endpoint as follows:
Expand Down
4 changes: 2 additions & 2 deletions content/docs/guides/integrations/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ To familiarize yourself on how OSM works with Prometheus, try installing a new m
1. Install sample applications:

```console
$ kubectl apply -f docs/example/manifests/samples/curl/curl.yaml -n metrics-demo
$ kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/curl/curl.yaml -n metrics-demo
serviceaccount/curl created
deployment.apps/curl created
$ kubectl apply -f docs/example/manifests/samples/httpbin/httpbin.yaml -n metrics-demo
$ kubectl apply -f https://raw.githubusercontent.com/openservicemesh/osm-docs/{{< param osm_branch >}}/manifests/samples/httpbin/httpbin.yaml -n metrics-demo
serviceaccount/httpbin created
service/httpbin created
deployment.apps/httpbin created
Expand Down
Loading

0 comments on commit e276b34

Please sign in to comment.