cancel
Showing results for 
Search instead for 
Did you mean: 
DerekYeo
Mission Specialist
Mission Specialist
  • 7,949 Views

Fail to create install-config.yaml for Openshift

Jump to solution

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

Labels (1)
2 Solutions

Accepted Solutions
oldbenko
Moderator
Moderator
  • 7,924 Views

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

A black cat crossing the street signifies that the animal is going somewhere.
[don't forget to kudo a helpful post or mark it as a solution!]

View solution in original post

beelandc
Flight Engineer Flight Engineer
Flight Engineer
  • 7,844 Views

@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:Capture.PNG

References:

  1. https://docs.openshift.com/container-platform/4.1/installing/installing_vsphere/installing-vsphere.h...

View solution in original post

0 Kudos
7 Replies
beelandc
Flight Engineer Flight Engineer
Flight Engineer
  • 7,938 Views

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: 

https://docs.openshift.com/container-platform/4.1/installing/installing_vsphere/installing-vsphere.h...

0 Kudos
DerekYeo
Mission Specialist
Mission Specialist
  • 7,934 Views

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?

0 Kudos
oldbenko
Moderator
Moderator
  • 7,925 Views

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

A black cat crossing the street signifies that the animal is going somewhere.
[don't forget to kudo a helpful post or mark it as a solution!]
beelandc
Flight Engineer Flight Engineer
Flight Engineer
  • 7,918 Views

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

0 Kudos
DerekYeo
Mission Specialist
Mission Specialist
  • 7,860 Views

@beelandc @oldbenko 

Now i get this error after creating the install-configs.yaml file. Did i miss any steps?

Capture.JPG

This is my install-configs.yaml file.

 


Capture.JPG

0 Kudos
beelandc
Flight Engineer Flight Engineer
Flight Engineer
  • 7,845 Views

@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:Capture.PNG

References:

  1. https://docs.openshift.com/container-platform/4.1/installing/installing_vsphere/installing-vsphere.h...
0 Kudos
DerekYeo
Mission Specialist
Mission Specialist
  • 7,829 Views

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!

Join the discussion
You must log in to join this conversation.