Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • from source code
    • oc new-app /path/to/someUser/someProject
    • oc new-app https://github.com/someUser/someProject
  • from docker images
    • oc new-app someImageOnDockerHub
    • oc new-app localhost:5000/someImage
  • from templates
    • oc new-app someOpenShiftTemplate
    • oc new-app -f /path/to/someTemplate.json
  • using the web console

Deploying an App

...

When we deploy an app, we deploy three things:

  • configuration
    • this describes the desired state of your application
  • replication controller(s)
    • this is basically a snapshot of some state of your application (the system will create this for you)
  • pod(s)
    • this is basically an instance of the app you created

If you create an app, as per above, you can inspect the configuration file for your app thusly:

Expand
Code Block
[bandersen@li1397-60 docker]$ oc get route magnoliax -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  annotations:
    openshift.io/host.generated: "true"
  creationTimestamp: 2018-04-19T07:05:27Z
  labels:
    app: magnoliax
  name: magnoliax
  namespace: default
  resourceVersion: "100481"
  selfLink: /apis/route.openshift.io/v1/namespaces/default/routes/magnoliax
  uid: 09f3ab6f-43a0-11e8-ba2b-6ee30226f73c
spec:
  host: magnoliax-default.139.162.131.60.nip.io
  port:
    targetPort: 8080-tcp
  to:
    kind: Service
    name: magnoliax
    weight: 100
  wildcardPolicy: None
status:
  ingress:
  - conditions:
    - lastTransitionTime: 2018-04-19T07:05:27Z
      status: "True"
      type: Admitted
    host: magnoliax-default.139.162.131.60.nip.io
    routerName: router
    wildcardPolicy: None
[bandersen@li1397-60 docker]$


Running Magnolia on OpenShift

...