Merge "Add missing puppet configuration to undercloud deploy"
This commit is contained in:
commit
79cbcddd7e
|
@ -43,3 +43,7 @@ PLAN_ENVIRONMENT = 'plan-environment.yaml'
|
|||
|
||||
# This directory may contain additional environments to use during deploy
|
||||
DEFAULT_ENV_DIRECTORY = "~/.tripleo/environments"
|
||||
|
||||
TRIPLEO_PUPPET_MODULES = "/usr/share/openstack-puppet/modules/"
|
||||
PUPPET_MODULES = "/etc/puppet/modules/"
|
||||
PUPPET_BASE = "/etc/puppet/"
|
||||
|
|
|
@ -136,4 +136,4 @@ class UpdateOvercloud(command.Command):
|
|||
inventory_file=inventory,
|
||||
playbook=playbook,
|
||||
queue_name=str(uuid.uuid4()))
|
||||
print (output)
|
||||
print(output)
|
||||
|
|
|
@ -113,6 +113,19 @@ class DeployUndercloud(command.Command):
|
|||
print('Installing prerequisites ...')
|
||||
subprocess.check_call(['yum', '-y', 'install'] + processed)
|
||||
|
||||
def _configure_puppet(self):
|
||||
print('Configuring puppet modules symlinks ...')
|
||||
src = constants.TRIPLEO_PUPPET_MODULES
|
||||
dst = constants.PUPPET_MODULES
|
||||
subprocess.check_call(['mkdir', '-p', dst])
|
||||
tmp = tempfile.mkdtemp(dir=constants.PUPPET_BASE)
|
||||
os.chmod(tmp, 0o755)
|
||||
for obj in os.listdir(src):
|
||||
tmpf = os.path.join(tmp, obj)
|
||||
os.symlink(os.path.join(src, obj), tmpf)
|
||||
os.rename(tmpf, os.path.join(dst, obj))
|
||||
os.rmdir(tmp)
|
||||
|
||||
def _lookup_tripleo_server_stackid(self, client, stack_id):
|
||||
server_stack_id = None
|
||||
|
||||
|
@ -512,8 +525,9 @@ class DeployUndercloud(command.Command):
|
|||
if os.geteuid() != 0:
|
||||
raise exceptions.DeploymentError("Please run as root.")
|
||||
|
||||
# Install required packages
|
||||
# Install required packages and configure puppet
|
||||
self._install_prerequisites(parsed_args.heat_native)
|
||||
self._configure_puppet()
|
||||
|
||||
keystone_pid = self._fork_fake_keystone()
|
||||
|
||||
|
|
Loading…
Reference in New Issue