Static addresses moved to devops
This commit is contained in:
parent
048fee08ea
commit
bc03faaf92
|
@ -107,10 +107,6 @@ class CiBase(object):
|
|||
write_config(remote, '/etc/puppet/puppet.conf', agent_config)
|
||||
request_cerificate(remote)
|
||||
|
||||
def reserve_static_addresses(self, environment):
|
||||
# todo make devops to reserve ips for nodes in static networks
|
||||
pass
|
||||
|
||||
def make_vms(self):
|
||||
if not self.base_image:
|
||||
raise Exception(
|
||||
|
@ -119,7 +115,6 @@ class CiBase(object):
|
|||
environment = self.describe_environment()
|
||||
# todo environment should be saved before build
|
||||
devops.build(environment)
|
||||
self.reserve_static_addresses(environment)
|
||||
devops.save(environment)
|
||||
logging.info("Environment has been saved")
|
||||
return environment
|
||||
|
|
|
@ -45,13 +45,6 @@ class CiCobbler(CiBase):
|
|||
environment.nodes.append(client)
|
||||
return environment
|
||||
|
||||
def reserve_static_addresses(self, environment):
|
||||
addresses_iter = iter(environment.network['internal'].ip_addresses)
|
||||
addresses_iter.next()
|
||||
addresses_iter.next()
|
||||
for node in environment.nodes:
|
||||
node.interfaces[0].ip_addresses = addresses_iter.next()
|
||||
|
||||
def setup_environment(self):
|
||||
self.environment = self.make_vms()
|
||||
master_node = self.environment.node['master']
|
||||
|
|
|
@ -7,9 +7,9 @@ iface lo inet loopback
|
|||
|
||||
# The primary network interface
|
||||
auto eth0 eth1 eth2
|
||||
iface eth0 inet dhcp
|
||||
iface eth1 inet static
|
||||
iface eth0 inet static
|
||||
address %(ip)s
|
||||
netmask %(net_mask)s
|
||||
gateway %(gateway)s
|
||||
iface eth1 inet manual
|
||||
iface eth2 inet dhcp
|
||||
|
|
Loading…
Reference in New Issue