Hi all expert,
I am beginner to the openshift world and now learning how to deploy it. I currently failed to create the install-config.yaml file on my vsphere platform. Can you please show me how to create this file?
Is there a command to create the file OR is it just normal linux VI command to create? Please advise
Hey, @DerekYeo,
Both options are possible, but probably the easiest is to use openshift-install to generate the install-config.yaml file like this:
$ ./openshift-install create install-config
Then edit it to suit your taste and install the cluster:
$ ./openshift-install create cluster
Be careful though - if you want to preserve a copy of install-config.yaml, make a backup as it gets deleted during the installation process.
Cheers,
Grega
@DerekYeo I'm not entirely sure what is causing the error and don't have an OCP 4 environment to test right now, but I would definitely check your indentations in your install-config.yaml file. Since indentations in YAML indicate scope, it can be particular about that.
The indentation is different than yours in the example vsphere install-config file(1) in our documentation. Specifically, the number of spaces that are indented, and the fact that the attributes under "vsphere" should be indented further. I also don't see a "vcenter" line in yours:
References:
Hi,
Have you seen the official documentation that describes how to manually create the install-config.yaml file? It even has a sample file for VSphere:
Hi beelandc, Tq for the reply. I have gone through this document but dont really understand how to create it. Is the install-config files created using the ./openshift-install command? Or is it just #vi install-config.yaml and configure the parameters?
Hey, @DerekYeo,
Both options are possible, but probably the easiest is to use openshift-install to generate the install-config.yaml file like this:
$ ./openshift-install create install-config
Then edit it to suit your taste and install the cluster:
$ ./openshift-install create cluster
Be careful though - if you want to preserve a copy of install-config.yaml, make a backup as it gets deleted during the installation process.
Cheers,
Grega
install-config.yaml is simply a yaml file, so you can create it manually if you want/need to. The instructions I linked to describe how to manually create the file. You would use VI or whatever is the text editor of your choice.
However, as benko noted, you can use the ./openshift-install command to generate an initial version of the file, and then edit that file in a text editor to match your desired configuration
@DerekYeo I'm not entirely sure what is causing the error and don't have an OCP 4 environment to test right now, but I would definitely check your indentations in your install-config.yaml file. Since indentations in YAML indicate scope, it can be particular about that.
The indentation is different than yours in the example vsphere install-config file(1) in our documentation. Specifically, the number of spaces that are indented, and the fact that the attributes under "vsphere" should be indented further. I also don't see a "vcenter" line in yours:
References:
Finally got it work.
Its really just a syntax error. I found this website which is good to debug yaml syntax. http://www.yamllint.com/.
Thanks for all the advises and help. Appreciate it very much!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.