Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Terraform Openstack
Manage
Activity
Members
Labels
Plan
Issues
10
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
Terraform Openstack
Commits
4244145d
Commit
4244145d
authored
5 years ago
by
Ryan Randles Jones
Browse files
Options
Downloads
Patches
Plain Diff
reordered variables to improve readability
parent
0642a9af
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.tf
+16
-16
16 additions, 16 deletions
main.tf
with
16 additions
and
16 deletions
main.tf
+
16
−
16
View file @
4244145d
...
...
@@ -5,7 +5,7 @@
variable
"admin_state_up"
{
default
=
true
}
variable
"enable_dhcp"
{
default
=
true
}
# variable for floating-ip
# variable for floating-ip
- also used in exrernal network creation
variable
"public_network_name"
{
default
=
"bright-external-flat-externalnet"
}
# variables for keypair module
...
...
@@ -14,16 +14,16 @@ variable "ssh_public_key" {default = "~/.ssh/id_rsa.pub"}
# variables for instance modules
variable
"ohpc_instance_name"
{
default
=
"ohpc"
}
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
"host_prefix"
{
default
=
"164.111.161.%s"
}
variable
"ohpc_user"
{
default
=
"centos"
}
variable
"ssh_private_key"
{
default
=
"~/.ssh/id_rsa"
}
variable
"image_ood"
{
default
=
"CentOS-7-x86_64-GenericCloud-1905"
}
variable
"ood_instance_name"
{
default
=
"ood"
}
variable
"ood_user"
{
default
=
"centos"
}
variable
"ssh_private_key"
{
default
=
"~/.ssh/id_rsa"
}
# variables for node creation module
...
...
@@ -88,35 +88,35 @@ output "keypair_name" {
}
# runs the ohpc-instance module - creates ohpc instance using variables defined above
# calls functions from dmz-network,
floating-ip, and keypair
modules to get values created there for use
# calls functions from dmz-network,
keypair, and floating-ip
modules to get values created there for use
module
"ohpc-instance"
{
source
=
"./ohpc-instance"
external_subnet_id
=
"
${module
.
dmz-network
.
external_subnet_id
}
"
floating_ip_ohpc
=
"
${module
.
floating-ip
.
ohpc_address
}
"
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
host_prefix
=
var
.
host_prefix
ohpc_user
=
var
.
ohpc_user
floating_ip_ohpc
=
"
${module
.
floating-ip
.
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,
floating-ip, and keypair
modules to get values created there for use
# calls functions from cluster-network,
keypair, and floating-ip
modules to get values created there for use
module
"ood-instance"
{
source
=
"./ood-instance"
internal_subnet_id
=
"
${module
.
cluster-network
.
internal_subnet_id
}
"
floating_ip_ood
=
"
${module
.
floating-ip
.
ood_address
}
"
flavor
=
var
.
flavor
host_prefix
=
var
.
host_prefix
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
key_pair
=
"
${module
.
keypair
.
keypair_name
}
"
ood_instance_name
=
var
.
ood_instance_name
floating_ip_ood
=
"
${module
.
floating-ip
.
ood_address
}
"
host_prefix
=
var
.
host_prefix
ood_user
=
var
.
ood_user
ssh_private_key
=
var
.
ssh_private_key
}
...
...
@@ -126,11 +126,11 @@ module "ood-instance" {
module
"nodes"
{
source
=
"./nodes"
internal_subnet_id
=
"
${module
.
cluster-network
.
internal_subnet_id
}
"
key_pair
=
"
${module
.
keypair
.
keypair_name
}
"
internal_net
=
var
.
internal_net
image_compute
=
var
.
image_compute
flavor
=
var
.
flavor
key_pair
=
"
${module
.
keypair
.
keypair_name
}
"
compute_node_count
=
var
.
compute_node_count
internal_net
=
var
.
internal_net
}
# calls the outputs defined in the ohpc-instance module
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment