-
Download this project from git
-
Change the below values according to your cluster in the file
/src/03-subscription/21-placement.yaml
.
clusterLabels:
matchExpressions:
- key: name
operator: In
values:
- ocp43-mcm-gan-a
-
Goto
install
folder in command prompt -
Set kubetcl context in command prompt that points to your mcm hub.
-
Run the below command.
sh 01-install.sh
The application get installed in the mcm hub.
-
Login into the managed cluster with
oc login
command -
Run the below command to find the routes installed.
oc get route -n gstore-git-app-ns
It may result like the below.
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
gstore-sales gstore-sales-gstore-git-app-ns.ocp43-mcm-gan-a-.appdomain.cloud / gstore-sales my-http None
- Copy the route from the above output and open the url in the browser.
ex:
http://gstore-sales-gstore-git-app-ns.ocp43-mcm-gan-a-.appdomain.cloud
The deployed application would be like this in MCM Hub console.
Here is some details regarding yaml files used in the application located under src
folder.
Placeholder for the Deployable yaml files. Here it is pointing to github repo. (To this same repo)
To group the components
To define the target cluster
To bind the channel with the placement rule.
Also it specifies the sub path of the deployables under the github repo referred by the channel. Here repo/gstoresales
is the path.
Namespaces to deploy the app, channel and subscriptions.
The git repo sub path where the deployables are stored.
Kubernetes resource Deployment
Kubernetes resource Service
Openshift resource Route