CORD-714
use host specific user/pass for prod
use headnode/common as top level config keys
remove config dir
Change-Id: Idc600158d6beb1efc6c5f75977005267b141cc28
diff --git a/build.gradle b/build.gradle
index bd559e3..d6bd43b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -53,8 +53,8 @@
? project.getProperty('targetReg')
: config.docker && config.docker.registry
? config.docker.registry
- : config.seedServer.ip
- ? config.seedServer.ip + ":5000"
+ : config.headnode.ip
+ ? config.headnode.ip + ":5000"
: 'localhost:5000'
// The tag used to tag the docker images push to the target registry
@@ -315,10 +315,10 @@
task prime (type: Exec) {
executable = "ansible-playbook"
- args = ["-i", config.seedServer.ip + ',']
+ args = ["-i", config.headnode.ip + ',']
- if ( config.seedServer.ansible_user != null && config.seedServer.ansible_user != "" ) {
- args = args << "--user=$config.seedServer.ansible_user"
+ if ( config.headnode.ansible_user != null && config.headnode.ansible_user != "" ) {
+ args = args << "--user=$config.headnode.ansible_user"
}
if ( config.debug ) {
@@ -326,31 +326,31 @@
}
def extraVars = []
- if (config.seedServer) {
- extraVars = extraVars.p(config.seedServer.extraVars)
- .p(config.seedServer.ansible_ssh_pass, "ansible_ssh_pass")
- .p(config.seedServer.ansible_become_pass, "ansible_become_pass")
- .p(config.seedServer.fabric_ip, "fabric_ip")
- .p(config.seedServer.fabric_range_low, "fabric_range_low")
- .p(config.seedServer.fabric_range_high, "fabric_range_high")
- .p(config.seedServer.management_ip, "management_ip")
- .p(config.seedServer.management_range_low, "management_range_low")
- .p(config.seedServer.management_range_high, "management_range_high")
- .p(config.seedServer.management_gw, "management_gw")
- .p(config.seedServer.management_bc, "management_bc")
- .p(config.seedServer.management_network, "management_network")
- .p(config.seedServer.management_iface, "management_iface")
- .p(config.seedServer.external_ip, "external_ip")
- .p(config.seedServer.external_gw, "external_gw")
- .p(config.seedServer.external_bc, "external_bc")
- .p(config.seedServer.external_network, "external_network")
- .p(config.seedServer.external_iface, "external_iface")
- .p(config.seedServer.fabric_iface, "fabric_iface")
- .p(config.seedServer.domain, "domain")
- .p(config.seedServer.virtualbox_support, "virtualbox_support")
- .p(config.seedServer.power_helper_user, "power_helper_user")
- .p(config.seedServer.power_helper_host, "power_helper_host")
- .p(config.seedServer.ansible_ssh_port, "ansible_ssh_port")
+ if (config.common) {
+ extraVars = extraVars.p(config.common.extraVars)
+ .p(config.headnode.ansible_ssh_pass, "ansible_ssh_pass")
+ .p(config.headnode.ansible_become_pass, "ansible_become_pass")
+ .p(config.headnode.ansible_ssh_port, "ansible_ssh_port")
+ .p(config.common.fabric_ip, "fabric_ip")
+ .p(config.common.fabric_range_low, "fabric_range_low")
+ .p(config.common.fabric_range_high, "fabric_range_high")
+ .p(config.common.management_ip, "management_ip")
+ .p(config.common.management_range_low, "management_range_low")
+ .p(config.common.management_range_high, "management_range_high")
+ .p(config.common.management_gw, "management_gw")
+ .p(config.common.management_bc, "management_bc")
+ .p(config.common.management_network, "management_network")
+ .p(config.common.management_iface, "management_iface")
+ .p(config.common.external_ip, "external_ip")
+ .p(config.common.external_gw, "external_gw")
+ .p(config.common.external_bc, "external_bc")
+ .p(config.common.external_network, "external_network")
+ .p(config.common.external_iface, "external_iface")
+ .p(config.common.fabric_iface, "fabric_iface")
+ .p(config.common.domain, "domain")
+ .p(config.common.virtualbox_support, "virtualbox_support")
+ .p(config.common.power_helper_user, "power_helper_user")
+ .p(config.common.power_helper_host, "power_helper_host")
}
if (config.passwords) {
@@ -371,17 +371,17 @@
// the password set on the compute node is skipped because this is being run against the
// head node and we don't want to change the head node password as this node was manualy
// set up.
- def skipTags = [].p(config.seedServer.skipTags).p('set_compute_node_password')
+ def skipTags = [].p(config.common.skipTags).p('set_compute_node_password')
args = args.p(skipTags.asParam("skip-tags", ",")).p(extraVars.asParam("extra-vars", " ")) << "prime-node.yml"
}
task deployBase(type: Exec) {
executable = "ansible-playbook"
- args = ["-i", config.seedServer.ip + ',']
+ args = ["-i", config.headnode.ip + ',']
- if ( config.seedServer.ansible_user != null && config.seedServer.ansible_user != "" ) {
- args = args << "--user=$config.seedServer.ansible_user"
+ if ( config.headnode.ansible_user != null && config.headnode.ansible_user != "" ) {
+ args = args << "--user=$config.headnode.ansible_user"
}
if ( config.debug ) {
@@ -389,29 +389,29 @@
}
def extraVars = []
- if (config.seedServer) {
- extraVars = extraVars.p(config.seedServer.extraVars)
- .p(config.seedServer.ansible_ssh_pass, "ansible_ssh_pass")
- .p(config.seedServer.ansible_become_pass, "ansible_become_pass")
- .p(config.seedServer.fabric_ip, "fabric_ip")
- .p(config.seedServer.fabric_range_low, "fabric_range_low")
- .p(config.seedServer.fabric_range_high, "fabric_range_high")
- .p(config.seedServer.management_ip, "management_ip")
- .p(config.seedServer.management_range_low, "management_range_low")
- .p(config.seedServer.management_range_high, "management_range_high")
- .p(config.seedServer.management_gw, "management_gw")
- .p(config.seedServer.management_network, "management_network")
- .p(config.seedServer.management_iface, "management_iface")
- .p(config.seedServer.external_ip, "external_ip")
- .p(config.seedServer.external_gw, "external_gw")
- .p(config.seedServer.external_network, "external_network")
- .p(config.seedServer.external_iface, "external_iface")
- .p(config.seedServer.fabric_iface, "fabric_iface")
- .p(config.seedServer.domain, "domain")
- .p(config.seedServer.virtualbox_support, "virtualbox_support")
- .p(config.seedServer.power_helper_user, "power_helper_user")
- .p(config.seedServer.power_helper_host, "power_helper_host")
- .p(config.seedServer.ansible_ssh_port, "ansible_ssh_port")
+ if (config.common) {
+ extraVars = extraVars.p(config.common.extraVars)
+ .p(config.headnode.ansible_ssh_pass, "ansible_ssh_pass")
+ .p(config.headnode.ansible_become_pass, "ansible_become_pass")
+ .p(config.headnode.ansible_ssh_port, "ansible_ssh_port")
+ .p(config.common.fabric_ip, "fabric_ip")
+ .p(config.common.fabric_range_low, "fabric_range_low")
+ .p(config.common.fabric_range_high, "fabric_range_high")
+ .p(config.common.management_ip, "management_ip")
+ .p(config.common.management_range_low, "management_range_low")
+ .p(config.common.management_range_high, "management_range_high")
+ .p(config.common.management_gw, "management_gw")
+ .p(config.common.management_network, "management_network")
+ .p(config.common.management_iface, "management_iface")
+ .p(config.common.external_ip, "external_ip")
+ .p(config.common.external_gw, "external_gw")
+ .p(config.common.external_network, "external_network")
+ .p(config.common.external_iface, "external_iface")
+ .p(config.common.fabric_iface, "fabric_iface")
+ .p(config.common.domain, "domain")
+ .p(config.common.virtualbox_support, "virtualbox_support")
+ .p(config.common.power_helper_user, "power_helper_user")
+ .p(config.common.power_helper_host, "power_helper_host")
}
if (config.passwords) {
@@ -432,7 +432,7 @@
// the password set on the compute node is skipped because this is being run against the
// head node and we don't want to change the head node password as this node was manualy
// set up.
- def skipTags = [].p(config.seedServer.skipTags).p('set_compute_node_password')
+ def skipTags = [].p(config.common.skipTags).p('set_compute_node_password')
args = args.p(skipTags.asParam("skip-tags", ",")).p(extraVars.asParam("extra-vars", " ")) << "head-node.yml"
}
diff --git a/config/default.yml b/config/default.yml
deleted file mode 100644
index 0be591e..0000000
--- a/config/default.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# Deployment configuration for VirtualBox based head node.
-#
-# This deployment configuration can be utilized with the head node created
-# via `vargrant up headnode` from the gerrit.opencord.org/maas repository.
----
-seedServer:
- ip: '10.100.198.201'
-
- # User name and password used by Ansible to connect to the host for remote
- # provisioning
- user: 'vagrant'
- password: 'vagrant'
-
- # Specifies tasks within the head node provisioning not to execute, including:
- #
- # switch_support - don't download the switch ONL images as there are no
- # switches in this configuration
- # interface_config - don't update the network configuration of the headnode
- # as it is configured by vagrant to the proper settings
- skipTags:
- - 'switch_support'
- - 'interface_config'
-
- management_ip: '10.1.0.1/24'
- management_iface: 'eth2'
- external_iface: 'eth0'
- management_network: '10.1.0.0/24'
-
- # Specifies the extra settings required for this configuration
- #
- # virtualbox_support - install support for managing virtual box based
- # compute nodes
- virtualbox_support: 1
- power_helper_user: 'cord'
-
-docker:
- imageVersion: candidate
-
-otherServers:
- # Specifies the configuration for dynamically added compute nodes
- location: 'http://gerrit.opencord.org/maas'
- rolesPath: 'roles'
- role: 'compute-node'
- fabric:
- network: '10.1.1.1/24'
- range_low: '10.1.1.2'
- range_high: '10.1.1.253'
diff --git a/config/develop.yml b/config/develop.yml
deleted file mode 100644
index b96bf12..0000000
--- a/config/develop.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Deployment configuration for VirtualBox based head node.
-#
-# This deployment configuration can be utilized with the head node created
-# via `vargrant up headnode` from the gerrit.opencord.org/maas repository.
----
-seedServer:
- ip: '10.100.198.202'
-
- # User name and password used by Ansible to connect to the host for remote
- # provisioning
- user: 'vagrant'
- password: 'vagrant'
-
- # Specifies tasks within the head node provisioning not to execute, including:
- #
- # switch_support - don't download the switch ONL images as there are no
- # switches in this configuration
- # interface_config - don't update the network configuration of the headnode
- # as it is configured by vagrant to the proper settings
- skipTags:
- - 'switch_support'
- - 'interface_config'
-
- # Specifies the extra settings required for this configuration
- #
- # virtualbox_support - install support for managing virtual box based
- # compute nodes
- extraVars:
- - 'virtualbox_support=1'
- - 'external_iface=eth0'
-
-otherServers:
- # Specifies the configuration for dynamically added compute nodes
- location: 'http://gerrit.opencord.org/maas'
- rolesPath: 'roles'
- role: 'compute-node'
-
-docker:
- registry: '10.100.198.200:5000/opencord'
- imageVersion: 'candidate'
diff --git a/config/pod5.yml b/config/pod5.yml
deleted file mode 100644
index b001bdd..0000000
--- a/config/pod5.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-# Deployment configuration for a phyical hardware POD
----
-seedServer:
- ip: '47.135.132.21'
- # User name and password used by Ansible to connect to the host for remote
- # provisioning
- user: 'ubuntu'
- password: 'ubuntu'
-
- # Network address information for the head node:
- #
- # fabric_ip - the IP address and mask bits to be used to configure the network
- # interface connected to the leaf - spine fabric
- #
- # management_ip - the IP address and mask bits to be used to configure the network
- # interface connecting the head node to the POD internal
- # management network. The head node will deliver DHCP addresses to
- # the other compute nodes over this interface
- #
- # external_ip - the IP address and mask bits to be used to configure the network
- # interface connecting the head node (and the POD) to the
- # Internet. All traffic in the POD to external hosts will be
- # NAT-ed through this interface
- fabric_ip: '10.6.1.1/24'
- management_ip: '10.6.0.1/24'
- external_ip: '47.135.132.21/24'
-
-otherNodes:
- # Experimental
- #
- # Specifies the subnet and address range that will be used to allocate IP addresses
- # to the compute nodes as they are deployed into the POD.
- fabric:
- network: 10.6.1.1/24
- range_low: 10.6.1.2
- range_high: 10.6.1.253