ODO CLI OCP Client

Mindwatering Incorporated

Author: Tripp W Black

Created: 05/23 at 08:28 PM

 

Category:
RH OpenShift
Reference

Full Red Hat example:
YML Notes:
- parent: Parent devfile containing default behavior (can be overridden)
- image-build: Image stream to deploy
- imageName: Final (renamed) image name/tags
- kubernetes-deploy: References the deploy.yaml manifest file that does the heavy lifting for installing in K8s/OCP
- commands: Defines (via id) the build-image, the deployk8s deployment component, and the composite build commands sections
- - the composite section defines a composite command consisting of the build-image and the deployk8s commands, and the group definition for the deploy
- - the commands section defines the build-image, along with both the deployk8s and deploy commands



schemaVersion: 2.2.0
metadata:
name: nodejs
version: 2.1.1
displayName: Node.js Runtime
description: Stack with Node.js
tags: ["Node.js", "Express", "ubi8"]
projectType: "Node.js"
language: "JavaScript"
provider: Red Hat
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
parent:
id: nodejs
registryUrl: "https://registry.devfile.io"
components:
- name: image-build
image:
imageName: nodejs-image:latest
dockerfile:
uri: Dockerfile
buildContext: .
rootRequired: false
- name: kubernetes-deploy
kubernetes:
uri: deploy.yaml
commands:
- id: build-image
apply:
component: image-build
- id: deployk8s
apply:
component: kubernetes-deploy
- id: deploy
composite: 6
commands:
- build-image
- deployk8s
group: 7
kind: deploy
isDefault: true




Inspect Deployment (Dry Run):
To inspect, use the -o option and the rep URL:
- Syntax:
$ oc new-app -o yaml <repo_fqdn>/<project_name_or_user_id>/<project_image_name>



previous page

×