I find this to be unhelpful and annoying for each lab and training I would have to copy the yml code only to past it in the lab text past, then it removes the (-) and yaml sentex and spacing.
Each lab should have these practice files provided where which directory are these files located at upon starting a lab?
@Eddie7 Please elaborate more on this issue. Which lab or guided exercise ? Which chapter & section are we talking about here ? Are you saying you are not able to copy paste in the terminal ?
for example this lab. inorder to copy and past this yml into the send text to client on the workstation rewrites:
You can use a YAML file to create a VM from the command line by using the oc apply -f vm-manifest.yaml command. You must provide the manifest file that contains the configuration of the VM.
The following example shows the configuration file of a VM that uses a PostgreSQL RHEL 9-based image:
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: postgresql-rhel9
spec:
runStrategy: Always
template:
metadata:
creationTimestamp: null
spec:
dataVolumeTemplates:
- metadata:
creationTimestamp: null
name: postgresql-rhel9
spec:
source:
registry:
url: "registry.redhat.io/rhel9/postgresql-15:latest" 1
secretRef: data-source-secret 2
certConfigMap: tls-certs
domain:
devices: {}
memory:
guest: 512Mi
resources: {}
terminationGracePeriodSeconds: 180
volumes: 3
- dataVolume:
name: rhel-9-minimal-volume
name: rootdisk
status: {}
there are no lab .yml or .yaml files
@Eddie7 If I understood your query properly - It seems you are struggling to copy paste yaml and when you do it causes indentation error.
For that , please refer this thread : https://learn.redhat.com/t5/Containers-DevOps-OpenShift/Copy-tex-into-yaml/m-p/37084/emcs_t/S2h8ZW1h...
To turn off autoindent when you paste code in vim mode :
press esc then type :set paste
then press i ( to insert mode ) - Notice the “- - INSERT (paste) - -” at the bottom of the Vim window.
then paste the yaml code. See if this helps.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.