Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • rrand11/terraform-openstack
  • louistw/terraform-openstack
  • chirag24/terraform-openstack
  • mmoo97/terraform-openstack
  • jpr/terraform-openstack
  • ravi89/terraform-openstack
  • noe121/terraform-openstack
  • ishan747/terraform-openstack
  • clint93/terraform-openstack
  • ravi89/terraform_openstack
  • krish94/terraform-openstack
  • rc/terraform-openstack
12 results
Show changes
Commits on Source (32)
[submodule "CRI_XCBC"]
path = CRI_XCBC
url = https://github.com/jprorama/CRI_XCBC.git
branch = feat-openstack
Subproject commit 1d7a787a562130d8b96d1b85d087c4a3ecc34f41
......@@ -7,17 +7,17 @@ variable "enable_dhcp" {}
data "openstack_networking_network_v2" "public-network" {name = var.public_network_name}
data "openstack_networking_network_v2" "public_network" {name = var.public_network_name}
# creates dmznet
resource "openstack_networking_network_v2" "external_net" {
resource "openstack_networking_network_v2" "external_network" {
name = "${var.name}net"
admin_state_up = var.admin_state_up
}
resource "openstack_networking_subnet_v2" "external_subnet" {
name = "${var.name}subnet"
network_id = openstack_networking_network_v2.external_net.id
network_id = openstack_networking_network_v2.external_network.id
cidr = "192.168.100.0/24"
ip_version = 4
dns_nameservers = ["8.8.8.8"]
......@@ -28,7 +28,7 @@ resource "openstack_networking_subnet_v2" "external_subnet" {
resource "openstack_networking_router_v2" "router" {
name = "${var.name}router"
admin_state_up = var.admin_state_up
external_network_id = data.openstack_networking_network_v2.public-network.id
external_network_id = data.openstack_networking_network_v2.public_network.id
}
resource "openstack_networking_router_interface_v2" "router" {
......@@ -37,7 +37,7 @@ resource "openstack_networking_router_interface_v2" "router" {
}
output "external_network_id" {
value = data.openstack_networking_network_v2.public-network.id
value = data.openstack_networking_network_v2.public_network.id
}
output "external_subnet_id" {
......
......@@ -3,7 +3,7 @@ variable "admin_state_up" { }
variable "enable_dhcp" {}
# creates clusternet
resource "openstack_networking_network_v2" "internal_net" {
resource "openstack_networking_network_v2" "internal_network" {
name = "${var.name}net"
admin_state_up = var.admin_state_up
}
......@@ -12,14 +12,14 @@ resource "openstack_networking_network_v2" "internal_net" {
# cidr is the subnet range (that subnet range and dns nameservers from the network create file in feat-openstack)
resource "openstack_networking_subnet_v2" "internal_subnet" {
name = "${var.name}subnet"
network_id = openstack_networking_network_v2.internal_net.id
network_id = openstack_networking_network_v2.internal_network.id
cidr = "10.1.1.0/24"
ip_version = 4
enable_dhcp = var.enable_dhcp
}
output "internal_network_id" {
value = openstack_networking_network_v2.internal_net.id
value = openstack_networking_network_v2.internal_network.id
}
output "internal_subnet_id" {
......
......@@ -28,22 +28,22 @@ output "internal_network_id" {
}
# runs the floating-ip module - uses public network name defined above
module "floating-ip" {
module "floating-ip-address" {
source = "./floating-ip"
public_network_name = var.public_network_name
}
# calls the outputs defined in the floating-ip module
output "floating_ip_ohpc" {
value = "${module.floating-ip.ohpc_address}"
value = "${module.floating-ip-address.ohpc_address}"
}
output "floating_ip_ood" {
value = "${module.floating-ip.ood_address}"
value = "${module.floating-ip-address.ood_address}"
}
# runs the key-pair module - imports local public key into openstack and give it the name defined above in the variables
module "keypair" {
module "import-keypair" {
source = "./key-pair"
keypair_name = var.keypair_name
ssh_public_key = var.ssh_public_key
......@@ -51,61 +51,61 @@ module "keypair" {
# calls the outputs defined in the key-pair module
output "keypair_name" {
value = "${module.keypair.keypair_name}"
value = "${module.import-keypair.keypair_name}"
}
# runs the ohpc-instance module - creates ohpc instance using variables defined above
# calls functions from dmz-network, keypair, and floating-ip modules to get values created there for use
module "ohpc-instance" {
# calls functions from dmz-network, import-keypair, and floating-ip-address modules to get values created there for use
module "create-ohpc-instance" {
external_subnet_id = "${module.dmz-network.external_subnet_id}"
source = "./ohpc-instance"
ohpc_instance_name = var.ohpc_instance_name
image_ohpc = var.image_ohpc
flavor = var.flavor
key_pair = "${module.keypair.keypair_name}"
external_net = var.external_net
internal_net = var.internal_net
floating_ip_ohpc = "${module.floating-ip.ohpc_address}"
key_pair = "${module.import-keypair.keypair_name}"
external_network = var.external_network
internal_network = var.internal_network
floating_ip_ohpc = "${module.floating-ip-address.ohpc_address}"
host_prefix = var.host_prefix
ohpc_user = var.ohpc_user
ssh_private_key = var.ssh_private_key
}
# runs the ood-instance module - creates ood instance using variables defined above
# calls functions from cluster-network, keypair, and floating-ip modules to get values created there for use
module "ood-instance" {
# calls functions from cluster-network, import-keypair, and floating-ip-address modules to get values created there for use
module "create-ood-instance" {
internal_subnet_id = "${module.cluster-network.internal_subnet_id}"
source = "./ood-instance"
ood_instance_name = var.ood_instance_name
image_ood = var.image_ood
flavor = var.flavor
key_pair = "${module.keypair.keypair_name}"
internal_net = var.internal_net
external_net = var.external_net
floating_ip_ood = "${module.floating-ip.ood_address}"
key_pair = "${module.import-keypair.keypair_name}"
internal_network = var.internal_network
external_network = var.external_network
floating_ip_ood = "${module.floating-ip-address.ood_address}"
host_prefix = var.host_prefix
ood_user = var.ood_user
ssh_private_key = var.ssh_private_key
}
# runs the nodes module - creates nodes using variables defined above
# calls functions from cluster-network and keypair modules to get values created there for use
# calls functions from cluster-network and import-keypair modules to get values created there for use
module "nodes" {
internal_subnet_id = "${module.cluster-network.internal_subnet_id}"
source = "./nodes"
image_compute = var.image_compute
flavor = var.flavor
key_pair = "${module.keypair.keypair_name}"
key_pair = "${module.import-keypair.keypair_name}"
compute_node_count = var.compute_node_count
internal_net = var.internal_net
internal_network = var.internal_network
}
# calls the outputs defined in the ohpc-instance module
output "ohpc-ssh_host" {
value = "${module.ohpc-instance.ssh_host}"
value = "${module.create-ohpc-instance.ssh_host}"
}
# calls the outputs defined in the ood-instance module
output "ood-ssh_host" {
value = "${module.ood-instance.ssh_host}"
value = "${module.create-ood-instance.ssh_host}"
}
\ No newline at end of file
......@@ -8,7 +8,7 @@ variable "flavor" {}
variable "key_pair" {type = "string"}
variable "compute_node_count" { }
variable "internal_net" {}
variable "internal_network" {}
......@@ -24,6 +24,6 @@ resource "openstack_compute_instance_v2" "c0" {
# defines the networks of the instance
network {
name = var.internal_net
name = var.internal_network
}
}
\ No newline at end of file
......@@ -8,8 +8,8 @@ variable "flavor" {}
# is created in key-pair module and called in root module
variable "key_pair" {type = "string"}
variable "internal_net" {}
variable "external_net" {}
variable "internal_network" {}
variable "external_network" {}
# is created in floating-ip module and called in root module
variable "floating_ip_ohpc" {type = "string"}
......@@ -30,10 +30,10 @@ resource "openstack_compute_instance_v2" "ohpc" {
# defines the networks of the instance
network {
name = var.external_net
name = var.external_network
}
network {
name = var.internal_net
name = var.internal_network
}
}
......
......@@ -8,8 +8,8 @@ variable "flavor" {}
# is created in key-pair module and called in root module
variable "key_pair" {type = "string"}
variable "internal_net" {}
variable "external_net" {}
variable "internal_network" {}
variable "external_network" {}
# is created in floating-ip module and called in root module
variable "floating_ip_ood" {type = "string"}
......@@ -30,10 +30,10 @@ resource "openstack_compute_instance_v2" "ood" {
# defines the networks of the instance
network {
name = var.external_net
name = var.external_network
}
network {
name = var.internal_net
name = var.internal_network
}
}
......
......@@ -18,8 +18,8 @@ variable "ood_instance_name" { default = "ood"}
variable "image_ohpc" {default = "CentOS-7-x86_64-GenericCloud-1905"}
variable "image_ood" {default = "CentOS-7-x86_64-GenericCloud-1905"}
variable "flavor" {default = "m1.medium"}
variable "internal_net" {default = "clusternet"}
variable "external_net" {default = "dmznet"}
variable "internal_network" {default = "clusternet"}
variable "external_network" {default = "dmznet"}
variable "host_prefix" {default = "164.111.161.%s"}
variable "ohpc_user" {default = "centos"}
variable "ood_user" {default = "centos"}
......