Skip to content

Commit a0e1941

Browse files
authored
Merge pull request #48128 from JStickler/OSSMDOC-592
OSSMDOC-592: Updated federation failover example.
2 parents e1d2088 + 76a742d commit a0e1941

9 files changed

+47
-47
lines changed

modules/ossm-federation-checklist.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ Federating services meshes involves the following activities:
2424

2525
* [ ] Federate two or more meshes by creating a `ServiceMeshPeer` resource for each mesh pair.
2626

27-
* [ ] Export services by creating an `ExportServiceSet` resource to make services available from one mesh to a peer mesh.
27+
* [ ] Export services by creating an `ExportedServiceSet` resource to make services available from one mesh to a peer mesh.
2828

29-
* [ ] Import services by creating an `ImportServiceSet` resource to import services shared by a mesh peer.
29+
* [ ] Import services by creating an `ImportedServiceSet` resource to import services shared by a mesh peer.

modules/ossm-federation-config-destinationrule-failover.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ $ oc project green-mesh-system
4040
.Example `DestinationRule`
4141
[source,yaml]
4242
----
43-
apiVersion: networking.istio.io/v1beta
43+
apiVersion: networking.istio.io/v1beta1
4444
kind: DestinationRule
4545
metadata:
46-
name: default
47-
namespace: green-mesh-system
46+
name: default-failover
47+
namespace: bookinfo
4848
spec:
49-
host: "*.green-mesh-system.svc.cluster.local"
49+
host: "ratings.bookinfo.svc.cluster.local"
5050
trafficPolicy:
5151
loadBalancer:
5252
localityLbSetting:
@@ -55,21 +55,21 @@ spec:
5555
- from: us-east
5656
to: us-west
5757
outlierDetection:
58-
consecutive5xxErrors: 1
59-
interval: 5m
58+
consecutive5xxErrors: 3
59+
interval: 10s
6060
baseEjectionTime: 1m
6161
----
6262
+
6363
. Deploy the `DestinationRule`, where `<DestinationRule>` includes the full path to your file, enter the following command:
6464
+
6565
[source,terminal]
6666
----
67-
$ oc create -n <smcp-system> -f <DestinationRule.yaml>
67+
$ oc create -n <application namespace> -f <DestinationRule.yaml>
6868
----
6969
+
7070
For example:
7171
+
7272
[source,terminal]
7373
----
74-
$ oc create -n green-mesh-system -f green-mesh-usWestDestinationRule.yaml
74+
$ oc create -n bookinfo -f green-mesh-us-west-DestinationRule.yaml
7575
----

modules/ossm-federation-config-export.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You use an `ExportedServiceSet` resource to declare the services from one mesh t
2121

2222
The following example is for services that `red-mesh` is exporting to `green-mesh`.
2323

24-
.Example ExportServiceSet resource
24+
.Example ExportedServiceSet resource
2525
[source,yaml]
2626
----
2727
kind: ExportedServiceSet
@@ -53,7 +53,7 @@ spec:
5353
namespace: bookinfo
5454
----
5555

56-
.ExportServiceSet parameters
56+
.ExportedServiceSet parameters
5757
[options="header"]
5858
[cols="l, a, a"]
5959
|===

modules/ossm-federation-config-failover-overview.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ This module included in the following assemblies:
88

99
Failover is the ability to switch automatically and seamlessly to a reliable backup system, for example another server. In the case of a federated mesh, you can configure a service in one mesh to failover to a service in another mesh.
1010

11-
You configure Federation for failover by setting the `importAsLocal` and `locality` settings in a `ServiceImportSet` resource and then configuring a `DestinationRule` that configures failover for the service to the locality specified in the `ServiceImportSet`.
11+
You configure Federation for failover by setting the `importAsLocal` and `locality` settings in an `ImportedServiceSet` resource and then configuring a `DestinationRule` that configures failover for the service to the locality specified in the `ImportedServiceSet`.
1212

1313
.Prerequisites
1414

1515
* Two or more {product-title} 4.6 or above clusters already networked and federated.
16-
* `ExportServiceSet` resources already created for each mesh peer in the federated mesh.
17-
* `ImportServiceSet` resources already created for each mesh peer in the federated mesh.
18-
* An account with the cluster-admin role.
16+
* `ExportedServiceSet` resources already created for each mesh peer in the federated mesh.
17+
* `ImportedServiceSet` resources already created for each mesh peer in the federated mesh.
18+
* An account with the `cluster-admin` role.

modules/ossm-federation-config-import.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You use an `ImportedServiceSet` resource to select services for import. Only ser
2121

2222
The following example is for the `green-mesh` importing a service that was exported by `red-mesh`.
2323

24-
.Example ImportServiceSet
24+
.Example ImportedServiceSet
2525
[source,yaml]
2626
----
2727
kind: ImportedServiceSet
@@ -43,7 +43,7 @@ spec:
4343
name: ratings
4444
----
4545

46-
.ImportServiceSet parameters
46+
.ImportedServiceSet parameters
4747
[options="header"]
4848
[cols="l, a, a"]
4949
|===

modules/ossm-federation-config-importserviceset-failover.adoc renamed to modules/ossm-federation-config-importedserviceset-failover.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ This module included in the following assemblies:
33
* service_mesh/v2x/ossm-federation.adoc
44
////
55
:_content-type: PROCEDURE
6-
[id="ossm-federation-config-importserviceset-failover_{context}"]
7-
= Configuring an ImportServiceSet for failover
6+
[id="ossm-federation-config-importedserviceset-failover_{context}"]
7+
= Configuring an ImportedServiceSet for failover
88

99
Locality-weighted load balancing allows administrators to control the distribution of traffic to endpoints based on the localities of where the traffic originates and where it will terminate. These localities are specified using arbitrary labels that designate a hierarchy of localities in {region}/{zone}/{sub-zone} form.
1010

1111
In the examples in this section, the `green-mesh` is located in the `us-east` region, and the `red-mesh` is located in the `us-west` region.
1212

13-
.Example `ImportServiceSet` resource from red-mesh to green-mesh
13+
.Example `ImportedServiceSet` resource from red-mesh to green-mesh
1414
[source,yaml]
1515
----
1616
kind: ImportedServiceSet
@@ -76,14 +76,14 @@ For example, `green-mesh-system`.
7676
$ oc project green-mesh-system
7777
----
7878
+
79-
. Edit the `ImportServiceSet` file, where `<ImportServiceSet.yaml>` includes a full path to the file you want to edit, enter the following command:
79+
. Edit the `ImportedServiceSet` file, where `<ImportedServiceSet.yaml>` includes a full path to the file you want to edit, enter the following command:
8080
+
8181
[source,terminal]
8282
----
83-
$ oc edit -n <smcp-system> -f <ImportServiceSet.yaml>
83+
$ oc edit -n <smcp-system> -f <ImportedServiceSet.yaml>
8484
----
8585
+
86-
For example, if you want to modify the file that imports from the red-mesh-system to the green-mesh-system as shown in the previous `ImportServiceSet` example.
86+
For example, if you want to modify the file that imports from the red-mesh-system to the green-mesh-system as shown in the previous `ImportedServiceSet` example.
8787
+
8888
[source,terminal]
8989
----

modules/ossm-federation-create-export.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can configure services for export even if they don't exist yet. When a servi
2525
.Procedure from the Console
2626
This is conjecture about what the flow might look like.
2727

28-
Follow this procedure to create an `ExportServiceSet` with the web console. This example shows the red-mesh exporting the ratings service from the bookinfo application to the green-mesh.
28+
Follow this procedure to create an `ExportedServiceSet` with the web console. This example shows the red-mesh exporting the ratings service from the bookinfo application to the green-mesh.
2929

3030
. Log in to the {product-title} web console as a user with the cluster-admin role.
3131
. Navigate to *Operators**Installed Operators*.
@@ -42,7 +42,7 @@ Follow this procedure to create an `ExportServiceSet` with the web console. This
4242

4343
.Procedure from the CLI
4444

45-
Follow this procedure to create an `ExportServiceSet` from the command line.
45+
Follow this procedure to create an `ExportedServiceSet` from the command line.
4646

4747
. Log in to the {product-title} CLI as a user with the `cluster-admin` role. Enter the following command. Then, enter your username and password when prompted.
4848
+
@@ -58,9 +58,9 @@ $ oc login --username=<NAMEOFUSER> <API token> https://<HOSTNAME>:6443
5858
$ oc project red-mesh-system
5959
----
6060
+
61-
. Create an `ExportServiceSet` file based on the following example where `red-mesh` is exporting services to `green-mesh`.
61+
. Create an `ExportedServiceSet` file based on the following example where `red-mesh` is exporting services to `green-mesh`.
6262
+
63-
.Example ExportServiceSet resource from red-mesh to green-mesh
63+
.Example ExportedServiceSet resource from red-mesh to green-mesh
6464
[source,yaml]
6565
----
6666
apiVersion: federation.maistra.io/v1
@@ -83,11 +83,11 @@ spec:
8383
name: reviews
8484
----
8585
+
86-
. Run the following command to upload and create the `ExportServiceSet` resource in the red-mesh-system namespace.
86+
. Run the following command to upload and create the `ExportedServiceSet` resource in the red-mesh-system namespace.
8787
+
8888
[source,terminal]
8989
----
90-
$ oc create -n <ControlPlaneNamespace> -f <ExportServiceSet.yaml>
90+
$ oc create -n <ControlPlaneNamespace> -f <ExportedServiceSet.yaml>
9191
----
9292
+
9393
For example:
@@ -97,7 +97,7 @@ For example:
9797
$ oc create -n red-mesh-system -f export-to-green-mesh.yaml
9898
----
9999
+
100-
. Create additional `ExportServiceSets` as needed for each mesh peer in your federated mesh.
100+
. Create additional `ExportedServiceSets` as needed for each mesh peer in your federated mesh.
101101
//TODO - Add sample output after the validation
102102
. To validate the services you've exported from `red-mesh` to share with `green-mesh`, run the following command:
103103
+

modules/ossm-federation-create-import.adoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This module included in the following assemblies:
77
[id="ossm-federation-create-import_{context}"]
88
= Creating an ImportedServiceSet
99

10-
You create an `ImportServiceSet` resource to explicitly declare the services that you want to import into your mesh.
10+
You create an `ImportedServiceSet` resource to explicitly declare the services that you want to import into your mesh.
1111

1212
Services are imported with the name `<exported-name>.<exported-namespace>.svc.<ServiceMeshPeer.name>.remote` which is a "hidden" service, visible only within the egress gateway namespace and is associated with the exported service's hostname. The service will be available locally as `<export-name>.<export-namespace>.<domainSuffix>`, where `domainSuffix` is `svc.<ServiceMeshPeer.name>-imports.local` by default, unless `importAsLocal` is set to `true`, in which case `domainSuffix` is `svc.cluster.local`. If `importAsLocal` is set to `false`, the domain suffix in the import rule will be applied. You can treat the local import just like any other service in the mesh. It automatically routes through the egress gateway, where it is redirected to the exported service's remote name.
1313

@@ -18,32 +18,32 @@ Services are imported with the name `<exported-name>.<exported-namespace>.svc.<S
1818
1919
[NOTE]
2020
====
21-
You can configure services for import even if they haven't been exported yet. When a service that matches the value specified in the ImportServiceSet is deployed and exported, it will be automatically imported.
21+
You can configure services for import even if they haven't been exported yet. When a service that matches the value specified in the ImportedServiceSet is deployed and exported, it will be automatically imported.
2222
====
2323

2424
////
2525
.Procedure from the Console
2626
This is conjecture about what the flow might look like.
2727

28-
Follow this procedure to create an `ImportServiceSet` with the web console. This example shows the green-mesh importing the ratings service that was exported by the red-mesh.
28+
Follow this procedure to create an `ImportedServiceSet` with the web console. This example shows the green-mesh importing the ratings service that was exported by the red-mesh.
2929

3030
. Log in to the {product-title} web console as a user with the cluster-admin role.
3131
. Navigate to *Operators**Installed Operators*.
3232
. Click the *Project* menu and select the project where you installed the control plane for the mesh you want to import services into. For example, `green-mesh-system`.
33-
. Click the {SMProductName} Operator, then click *Istio Service Mesh ImportServiceSet*.
34-
. On the *Istio Service Mesh ImportServiceSet* tab, click *Create ImportServiceSet*.
35-
. On the *Create ImportServiceSet* page, click *YAML* to modify your configuration.
33+
. Click the {SMProductName} Operator, then click *Istio Service Mesh ImportedServiceSet*.
34+
. On the *Istio Service Mesh ImportedServiceSet* tab, click *Create ImportedServiceSet*.
35+
. On the *Create ImportedServiceSet* page, click *YAML* to modify your configuration.
3636
. Modify the default configuration with values for your import.
3737
. Click *Create*. The Operator creates the import the based on your configuration parameters.
38-
. To verify the `ImportServiceSet` resource was created, click the *Istio Service Mesh ImportServiceSet* tab.
39-
.. Click the name of the new `ImportServiceSet`; for example, `import-from-red-mesh`.
40-
.. Click the *Resources* tab to see the `ImportServiceSet` resource the Operator created and configured.
38+
. To verify the `ImportedServiceSet` resource was created, click the *Istio Service Mesh ImportedServiceSet* tab.
39+
.. Click the name of the new `ImportedServiceSet`; for example, `import-from-red-mesh`.
40+
.. Click the *Resources* tab to see the `ImportedServiceSet` resource the Operator created and configured.
4141
////
4242

4343

4444
.Procedure from the CLI
4545

46-
Follow this procedure to create an `ImportServiceSet` from the command line.
46+
Follow this procedure to create an `ImportedServiceSet` from the command line.
4747

4848
. Log in to the {product-title} CLI as a user with the `cluster-admin` role. Enter the following command. Then, enter your username and password when prompted.
4949
+
@@ -59,9 +59,9 @@ $ oc login --username=<NAMEOFUSER> <API token> https://<HOSTNAME>:6443
5959
$ oc project green-mesh-system
6060
----
6161
+
62-
. Create an `ImportServiceSet` file based on the following example where `green-mesh` is importing services previously exported by `red-mesh`.
62+
. Create an `ImportedServiceSet` file based on the following example where `green-mesh` is importing services previously exported by `red-mesh`.
6363
+
64-
.Example ImportServiceSet resource from red-mesh to green-mesh
64+
.Example ImportedServiceSet resource from red-mesh to green-mesh
6565
[source,yaml]
6666
----
6767
kind: ImportedServiceSet
@@ -81,11 +81,11 @@ spec:
8181
name: ratings
8282
----
8383
+
84-
. Run the following command to upload and create the `ImportServiceSet` resource in the green-mesh-system namespace.
84+
. Run the following command to upload and create the `ImportedServiceSet` resource in the green-mesh-system namespace.
8585
+
8686
[source,terminal]
8787
----
88-
$ oc create -n <ControlPlaneNamespace> -f <ImportServiceSet.yaml>
88+
$ oc create -n <ControlPlaneNamespace> -f <ImportedServiceSet.yaml>
8989
----
9090
+
9191
For example:
@@ -95,7 +95,7 @@ For example:
9595
$ oc create -n green-mesh-system -f import-from-red-mesh.yaml
9696
----
9797
+
98-
. Create additional `ImportServiceSets` as needed for each mesh peer in your federated mesh.
98+
. Create additional `ImportedServiceSet` resources as needed for each mesh peer in your federated mesh.
9999
//TODO - Add sample output after the validation
100100
. To validate the services you've imported into `green-mesh`, run the following command:
101101
+

service_mesh/v2x/ossm-federation.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ include::modules/ossm-federation-create-import.adoc[leveloffset=+2]
4242

4343
include::modules/ossm-federation-config-failover-overview.adoc[leveloffset=+1]
4444

45-
include::modules/ossm-federation-config-importserviceset-failover.adoc[leveloffset=+2]
45+
include::modules/ossm-federation-config-importedserviceset-failover.adoc[leveloffset=+2]
4646

4747
include::modules/ossm-federation-config-destinationrule-failover.adoc[leveloffset=+2]
4848

0 commit comments

Comments
 (0)