-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add ovirt installer provider #1948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-robot
merged 16 commits into
openshift:master
from
rgolangh:ovirt_provider
Jan 13, 2020
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
271068b
ovirt: Vendor ovirt dependencies
rgolangh e46aea4
Add oVirt platform
rgolangh a392e8d
ovirt: bootstrap: Prepend nameserver 127.0.0.1
rgolangh 0517783
ovirt: Implement destroy
rgolangh 29d4ac4
ovirt: Implement gather
rgolangh be23cb0
ovirt: Add terraform files
rgolangh d0192c0
ovirt: Store credentials in cloud secrets
rgolangh 8f6252c
ovirt: Add an IPI installation doc
rgolangh 8d61080
Fix terraform fmt issue
rgolangh 30ca930
ovirt: BaseImage handling
rgolangh 5a11171
ovirt: update cluster api provider
rgolangh 113bc84
ovirt: Hadle image release, allow standard override using env
rgolangh 85b8d12
ovirt: update to latest cluster-api-provider
rgolangh 3e3e4c0
ovirt: Allow overiding memory and cpus
rgolangh a777d60
ovirt: Allow overriding template disk size
rgolangh d77c58a
ovirt: optionally use a different logical network for instances
rgolangh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| oVirt needs the same assets during setup except for ironic. | ||
| Please refer to https://github.com/openshift/installer/tree/master/data/data/bootstrap/baremetal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Specifies that the bootstrap node should use its own local DNS server for | ||
| # name resolution. | ||
| # | ||
| # For more information, see installer/data/data/bootstrap/baremetal/README.md | ||
| # | ||
|
|
||
| prepend domain-name-servers 127.0.0.1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| resource "ovirt_vm" "bootstrap" { | ||
| name = "${var.cluster_id}-bootstrap" | ||
| memory = "8192" | ||
| cores = "4" | ||
| cluster_id = var.ovirt_cluster_id | ||
| template_id = var.ovirt_template_id | ||
|
|
||
| initialization { | ||
| custom_script = var.ignition_bootstrap | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| variable "cluster_id" { | ||
| description = "The ID of Openshift cluster" | ||
| } | ||
|
|
||
| variable "ovirt_cluster_id" { | ||
| type = string | ||
| description = "The ID of oVirt's cluster" | ||
| } | ||
|
|
||
| variable "ovirt_template_id" { | ||
| type = string | ||
| description = "The ID of oVirt's VM template" | ||
| } | ||
|
|
||
| variable "ignition_bootstrap" { | ||
| type = string | ||
| description = "bootstrap ignition config" | ||
| } | ||
|
|
||
| variable "openstack_base_image_name" { | ||
| type = string | ||
| description = "Name of the base image to use for the nodes." | ||
| } | ||
|
|
||
| variable "openstack_base_image_local_file_path" { | ||
| type = string | ||
| default = "" | ||
| description = "Local file path of the base image file to use for the nodes." | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| terraform { | ||
| required_version = ">= 0.12" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| provider "ovirt" { | ||
| url = var.ovirt_url | ||
| username = var.ovirt_username | ||
| password = var.ovirt_password | ||
| } | ||
|
|
||
| module "template" { | ||
| source = "./template" | ||
| ovirt_cluster_id = var.ovirt_cluster_id | ||
| ovirt_storage_domain_id = var.ovirt_storage_domain_id | ||
| ignition_bootstrap = var.ignition_bootstrap | ||
| cluster_id = var.cluster_id | ||
| openstack_base_image_name = var.openstack_base_image_name | ||
| openstack_base_image_local_file_path = var.openstack_base_image_local_file_path | ||
| ovirt_template_cpu = var.ovirt_template_cpu | ||
| ovirt_template_mem = var.ovirt_template_mem | ||
| disk_size_gib = var.ovirt_template_disk_size_gib | ||
| ovirt_network_name = var.ovirt_network_name | ||
| } | ||
|
|
||
| module "bootstrap" { | ||
| source = "./bootstrap" | ||
| ovirt_cluster_id = var.ovirt_cluster_id | ||
| ovirt_template_id = module.template.releaseimage_template_id | ||
| ignition_bootstrap = var.ignition_bootstrap | ||
| cluster_id = var.cluster_id | ||
| openstack_base_image_name = var.openstack_base_image_name | ||
| openstack_base_image_local_file_path = var.openstack_base_image_local_file_path | ||
| } | ||
|
|
||
| module "masters" { | ||
| source = "./masters" | ||
| master_count = var.master_count | ||
| ovirt_cluster_id = var.ovirt_cluster_id | ||
| ovirt_template_id = module.template.releaseimage_template_id | ||
| ignition_master = var.ignition_master | ||
| cluster_domain = var.cluster_domain | ||
| cluster_id = var.cluster_id | ||
| ovirt_master_cpu = var.ovirt_master_cpu | ||
| ovirt_master_mem = var.ovirt_master_mem | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| resource "ovirt_vm" "master" { | ||
| count = var.master_count | ||
| name = "${var.cluster_id}-master-${count.index}" | ||
| cluster_id = var.ovirt_cluster_id | ||
| template_id = var.ovirt_template_id | ||
| cores = var.ovirt_master_cpu | ||
| memory = var.ovirt_master_mem | ||
|
|
||
| initialization { | ||
| host_name = "${var.cluster_id}-master-${count.index}" | ||
| custom_script = var.ignition_master | ||
| } | ||
| } | ||
|
|
||
| resource "ovirt_tag" "cluster_tag" { | ||
| name = var.cluster_id | ||
| vm_ids = [for instance in ovirt_vm.master.* : instance.id] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| variable "cluster_id" { | ||
| description = "The ID of Openshift cluster" | ||
| } | ||
|
|
||
| variable "cluster_domain" { | ||
| description = "The domain name of Openshift cluster" | ||
| } | ||
|
|
||
| variable "master_count" { | ||
| type = string | ||
| description = "Number of masters" | ||
| default = 3 | ||
| } | ||
|
|
||
| variable "ovirt_cluster_id" { | ||
| type = string | ||
| description = "The ID of oVirt's cluster" | ||
| } | ||
|
|
||
| variable "ovirt_template_id" { | ||
| type = string | ||
| description = "The ID of oVirt's VM template" | ||
| } | ||
|
|
||
| variable "ignition_master" { | ||
| type = string | ||
| description = "master ignition config" | ||
| } | ||
|
|
||
| variable "ovirt_master_mem" { | ||
| type = string | ||
| } | ||
|
|
||
| variable "ovirt_master_cpu" { | ||
| type = string | ||
| } | ||
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: new line required here.