2.10.2.2. Creating the member roll from the CLI
You can add a project to the ServiceMeshMemberRoll from the command line.
Prerequisites
- An installed, verified Red Hat OpenShift Service Mesh Operator.
- List of projects to add to the service mesh.
-
Access to the OpenShift CLI (
oc).
Procedure
Log in to the OpenShift Container Platform CLI.
$ oc login --username=<NAMEOFUSER> https://<HOSTNAME>:6443If you do not already have services for your mesh, or you are starting from scratch, create a project for your applications. It must be different from the project where you installed the Service Mesh control plane.
$ oc new-project <your-project>To add your projects as members, modify the following example YAML. You can add any number of projects, but a project can only belong to one
ServiceMeshMemberRollresource. In this example,istio-systemis the name of the Service Mesh control plane project.Example servicemeshmemberroll-default.yaml
apiVersion: maistra.io/v1 kind: ServiceMeshMemberRoll metadata: name: default namespace: istio-system spec: members: # a list of projects joined into the service mesh - your-project-name - another-project-nameRun the following command to upload and create the
ServiceMeshMemberRollresource in theistio-systemnamespace.$ oc create -n istio-system -f servicemeshmemberroll-default.yamlRun the following command to verify the
ServiceMeshMemberRollwas created successfully.$ oc get smmr -n istio-system defaultThe installation has finished successfully when the
STATUScolumn isConfigured.