Add missing puppet configuration to undercloud deploy
For containerized underclouds, the docker-puppet tool expects symlinks created for puppet modules by specific paths. Ensure the client creates those instead of relying on multiple external places, like quickstart or cuztom bash scripts or docs. Related-bug: #1723003 Closes-bug: #1725329 Change-Id: I60255386051b80c2fcacb4770e079fd450074c53 Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
parent
d8e2ad2694
commit
2058019c2f
@ -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…
x
Reference in New Issue
Block a user