Example #1
0
 def fetch_dbdsn(self):
     return dbhelper.fetch_dbdsn(
         dbname=self.DB_NAME,
         utf8=True,
         dbtype=self.installer.get_option('db', 'type'),
         **utils.merge_dicts(self.installer.get_option('db'),
                             dbhelper.get_shared_passwords(self.installer)))
Example #2
0
 def _config_adjust_api_reg(self, contents, fn):
     gparams = ghelper.get_shared_params(**self.options)
     with io.BytesIO(contents) as stream:
         config = cfg.create_parser(cfg.RewritableConfigParser, self)
         config.readfp(stream)
         config.set('DEFAULT', 'debug', self.get_bool_option('verbose'))
         config.set('DEFAULT', 'verbose', self.get_bool_option('verbose'))
         if fn in [REG_CONF]:
             config.set('DEFAULT', 'bind_port', gparams['endpoints']['registry']['port'])
         else:
             config.set('DEFAULT', 'bind_port', gparams['endpoints']['public']['port'])
         config.set('DEFAULT', 'sql_connection', dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                                                      utf8=True,
                                                                      dbtype=self.get_option('db', 'type'),
                                                                      **utils.merge_dicts(self.get_option('db'),
                                                                                          dbhelper.get_shared_passwords(self))))
         config.remove_option('DEFAULT', 'log_file')
         config.set('paste_deploy', 'flavor', self.get_option('paste_flavor'))
         for (k, v) in self._fetch_keystone_params().items():
             config.set('keystone_authtoken', k, v)
         if fn in [API_CONF]:
             config.set('DEFAULT', 'default_store', 'file')
             img_store_dir = sh.joinpths(self.get_option('component_dir'), 'images')
             config.set('DEFAULT', 'filesystem_store_datadir', img_store_dir)
             LOG.debug("Ensuring file system store directory %r exists and is empty." % (img_store_dir))
             if sh.isdir(img_store_dir):
                 sh.deldir(img_store_dir)
             sh.mkdirslist(img_store_dir, tracewriter=self.tracewriter, adjust_suids=True)
         return config.stringify(fn)
Example #3
0
 def fetch_dbdsn(self):
     return dbhelper.fetch_dbdsn(
         dbname=self.DB_NAME,
         utf8=True,
         dbtype=self.installer.get_option('db', 'type'),
         **utils.merge_dicts(self.installer.get_option('db'),
                             dbhelper.get_shared_passwords(self.installer)))
Example #4
0
 def _config_adjust_api_reg(self, contents, fn):
     gparams = ghelper.get_shared_params(**self.options)
     with io.BytesIO(contents) as stream:
         config = cfg.create_parser(cfg.RewritableConfigParser, self)
         config.readfp(stream)
         config.set('DEFAULT', 'debug', self.get_bool_option('verbose'))
         config.set('DEFAULT', 'verbose', self.get_bool_option('verbose'))
         if fn in [REG_CONF]:
             config.set('DEFAULT', 'bind_port', gparams['endpoints']['registry']['port'])
         else:
             config.set('DEFAULT', 'bind_port', gparams['endpoints']['public']['port'])
         config.set('DEFAULT', 'sql_connection', dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                                                      utf8=True,
                                                                      dbtype=self.get_option('db', 'type'),
                                                                      **utils.merge_dicts(self.get_option('db'),
                                                                                          dbhelper.get_shared_passwords(self))))
         config.remove_option('DEFAULT', 'log_file')
         config.set('paste_deploy', 'flavor', self.get_option('paste_flavor'))
         for (k, v) in self._fetch_keystone_params().items():
             config.set('keystone_authtoken', k, v)
         if fn in [API_CONF]:
             config.set('DEFAULT', 'default_store', 'file')
             img_store_dir = sh.joinpths(self.get_option('component_dir'), 'images')
             config.set('DEFAULT', 'filesystem_store_datadir', img_store_dir)
             LOG.debug("Ensuring file system store directory %r exists and is empty." % (img_store_dir))
             if sh.isdir(img_store_dir):
                 sh.deldir(img_store_dir)
             sh.mkdirslist(img_store_dir, tracewriter=self.tracewriter, adjust_suids=True)
         return config.stringify(fn)
Example #5
0
 def _config_adjust_api(self, contents, fn):
     params = ghelper.get_shared_params(**self.options)
     with io.BytesIO(contents) as stream:
         config = cfg.create_parser(cfg.RewritableConfigParser, self)
         config.readfp(stream)
         img_store_dir = sh.joinpths(self.get_option('component_dir'),
                                     'images')
         config.set('DEFAULT', 'debug', self.get_bool_option('verbose', ))
         config.set('DEFAULT', 'verbose', self.get_bool_option('verbose'))
         config.set('DEFAULT', 'default_store', 'file')
         config.set('DEFAULT', 'filesystem_store_datadir', img_store_dir)
         config.set('DEFAULT', 'bind_port',
                    params['endpoints']['public']['port'])
         config.set(
             'DEFAULT', 'sql_connection',
             dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                  utf8=True,
                                  dbtype=self.get_option('db', 'type'),
                                  **utils.merge_dicts(
                                      self.get_option('db'),
                                      dbhelper.get_shared_passwords(self))))
         config.remove_option('DEFAULT', 'log_file')
         config.set('paste_deploy', 'flavor',
                    self.get_option('paste_flavor'))
         LOG.debug(
             "Ensuring file system store directory %r exists and is empty."
             % (img_store_dir))
         sh.deldir(img_store_dir)
         self.tracewriter.dirs_made(*sh.mkdirslist(img_store_dir))
         return config.stringify(fn)
Example #6
0
 def _config_adjust_root(self, contents, fn):
     params = khelper.get_shared_params(**utils.merge_dicts(
         self.options, khelper.get_shared_passwords(self)))
     with io.BytesIO(contents) as stream:
         config = cfg.create_parser(cfg.RewritableConfigParser, self)
         config.readfp(stream)
         config.set('DEFAULT', 'admin_token', params['service_token'])
         config.set('DEFAULT', 'admin_port',
                    params['endpoints']['admin']['port'])
         config.set('DEFAULT', 'public_port',
                    params['endpoints']['public']['port'])
         config.set('DEFAULT', 'verbose', True)
         config.set('DEFAULT', 'debug', True)
         if self.get_bool_option('enable-pki'):
             config.set('signing', 'token_format', 'PKI')
             for (k, v) in PKI_FILES.items():
                 path = sh.joinpths(self.link_dir, v)
                 config.set('signing', k, path)
         else:
             config.set('signing', 'token_format', 'UUID')
         config.set('catalog', 'driver',
                    'keystone.catalog.backends.sql.Catalog')
         config.remove_option('DEFAULT', 'log_config')
         config.set(
             'sql', 'connection',
             dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                  utf8=True,
                                  dbtype=self.get_option('db', 'type'),
                                  **utils.merge_dicts(
                                      self.get_option('db'),
                                      dbhelper.get_shared_passwords(self))))
         config.set('ec2', 'driver',
                    "keystone.contrib.ec2.backends.sql.Ec2")
         contents = config.stringify(fn)
     return contents
 def _config_adjust_root(self, contents, fn):
     params = khelper.get_shared_params(**utils.merge_dicts(self.options,
                                                            khelper.get_shared_passwords(self)))
     with io.BytesIO(contents) as stream:
         config = cfg.create_parser(cfg.RewritableConfigParser, self)
         config.readfp(stream)
         config.set('DEFAULT', 'admin_token', params['service_token'])
         config.set('DEFAULT', 'admin_port', params['endpoints']['admin']['port'])
         config.set('DEFAULT', 'public_port', params['endpoints']['public']['port'])
         config.set('DEFAULT', 'verbose', True)
         config.set('DEFAULT', 'debug', True)
         if self.get_bool_option('enable-pki'):
             config.set('signing', 'token_format', 'PKI')
             for (k, v) in PKI_FILES.items():
                 path = sh.joinpths(self.link_dir, v)
                 config.set('signing', k, path)
         else:
             config.set('signing', 'token_format', 'UUID')
         config.set('catalog', 'driver', 'keystone.catalog.backends.sql.Catalog')
         config.remove_option('DEFAULT', 'log_config')
         config.set('sql', 'connection', dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                                              utf8=True,
                                                              dbtype=self.get_option('db', 'type'),
                                                              **utils.merge_dicts(self.get_option('db'),
                                                                                  dbhelper.get_shared_passwords(self))))
         config.set('ec2', 'driver', "keystone.contrib.ec2.backends.sql.Ec2")
         contents = config.stringify(fn)
     return contents
Example #8
0
 def _config_adjust_root(self, contents, fn):
     params = khelper.get_shared_params(**utils.merge_dicts(self.options, khelper.get_shared_passwords(self)))
     with io.BytesIO(contents) as stream:
         config = cfg.create_parser(cfg.RewritableConfigParser, self)
         config.readfp(stream)
         config.set("DEFAULT", "admin_token", params["service_token"])
         config.set("DEFAULT", "admin_port", params["endpoints"]["admin"]["port"])
         config.set("DEFAULT", "public_port", params["endpoints"]["public"]["port"])
         config.set("DEFAULT", "verbose", True)
         config.set("DEFAULT", "debug", True)
         config.set("catalog", "driver", "keystone.catalog.backends.sql.Catalog")
         config.remove_option("DEFAULT", "log_config")
         config.set(
             "sql",
             "connection",
             dbhelper.fetch_dbdsn(
                 dbname=DB_NAME,
                 utf8=True,
                 dbtype=self.get_option("db", "type"),
                 **utils.merge_dicts(self.get_option("db"), dbhelper.get_shared_passwords(self))
             ),
         )
         config.set("ec2", "driver", "keystone.contrib.ec2.backends.sql.Ec2")
         contents = config.stringify(fn)
     return contents
Example #9
0
 def _config_adjust_registry(self, contents, fn):
     params = ghelper.get_shared_params(**self.options)
     with io.BytesIO(contents) as stream:
         config = cfg.RewritableConfigParser()
         config.readfp(stream)
         config.set('DEFAULT', 'debug', self.get_bool_option('verbose'))
         config.set('DEFAULT', 'verbose', self.get_bool_option('verbose'))
         config.set('DEFAULT', 'bind_port', params['endpoints']['registry']['port'])
         config.set('DEFAULT', 'sql_connection', dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                                                      utf8=True,
                                                                      dbtype=self.get_option('db', 'type'),
                                                                      **utils.merge_dicts(self.get_option('db'),
                                                                                          dbhelper.get_shared_passwords(self))))
         config.remove_option('DEFAULT', 'log_file')
         config.set('paste_deploy', 'flavor', self.get_option('paste_flavor'))
         return config.stringify(fn)
     return contents
Example #10
0
 def _config_adjust_root(self, contents, fn):
     params = khelper.get_shared_params(**utils.merge_dicts(self.options,
                                                            khelper.get_shared_passwords(self)))
     with io.BytesIO(contents) as stream:
         config = cfg.RewritableConfigParser()
         config.readfp(stream)
         config.set('DEFAULT', 'admin_token', params['service_token'])
         config.set('DEFAULT', 'admin_port', params['endpoints']['admin']['port'])
         config.set('DEFAULT', 'public_port', params['endpoints']['public']['port'])
         config.set('DEFAULT', 'verbose', True)
         config.set('DEFAULT', 'debug', True)
         config.set('catalog', 'driver', 'keystone.catalog.backends.sql.Catalog')
         config.remove_option('DEFAULT', 'log_config')
         config.set('sql', 'connection', dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                                              utf8=True,
                                                              dbtype=self.get_option('db', 'type'),
                                                              **utils.merge_dicts(self.get_option('db'),
                                                                                  dbhelper.get_shared_passwords(self))))
         config.set('ec2', 'driver', "keystone.contrib.ec2.backends.sql.Ec2")
         contents = config.stringify(fn)
     return contents
Example #11
0
 def _config_adjust_api(self, contents, fn):
     params = ghelper.get_shared_params(**self.options)
     with io.BytesIO(contents) as stream:
         config = cfg.RewritableConfigParser()
         config.readfp(stream)
         img_store_dir = sh.joinpths(self.get_option('component_dir'), 'images')
         config.set('DEFAULT', 'debug', self.get_bool_option('verbose',))
         config.set('DEFAULT', 'verbose', self.get_bool_option('verbose'))
         config.set('DEFAULT', 'default_store', 'file')
         config.set('DEFAULT', 'filesystem_store_datadir', img_store_dir)
         config.set('DEFAULT', 'bind_port', params['endpoints']['public']['port'])
         config.set('DEFAULT', 'sql_connection', dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                                                      utf8=True,
                                                                      dbtype=self.get_option('db', 'type'),
                                                                      **utils.merge_dicts(self.get_option('db'), 
                                                                                          dbhelper.get_shared_passwords(self))))
         config.remove_option('DEFAULT', 'log_file')
         config.set('paste_deploy', 'flavor', self.get_option('paste_flavor'))
         LOG.debug("Ensuring file system store directory %r exists and is empty." % (img_store_dir))
         sh.deldir(img_store_dir)
         self.tracewriter.dirs_made(*sh.mkdirslist(img_store_dir))
         return config.stringify(fn)
Example #12
0
 def _config_adjust_registry(self, contents, fn):
     params = ghelper.get_shared_params(**self.options)
     with io.BytesIO(contents) as stream:
         config = cfg.create_parser(cfg.RewritableConfigParser, self)
         config.readfp(stream)
         config.set('DEFAULT', 'debug', self.get_bool_option('verbose'))
         config.set('DEFAULT', 'verbose', self.get_bool_option('verbose'))
         config.set('DEFAULT', 'bind_port',
                    params['endpoints']['registry']['port'])
         config.set(
             'DEFAULT', 'sql_connection',
             dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                  utf8=True,
                                  dbtype=self.get_option('db', 'type'),
                                  **utils.merge_dicts(
                                      self.get_option('db'),
                                      dbhelper.get_shared_passwords(self))))
         config.remove_option('DEFAULT', 'log_file')
         config.set('paste_deploy', 'flavor',
                    self.get_option('paste_flavor'))
         return config.stringify(fn)
     return contents
Example #13
0
    def generate(self, fn):

        # Everything built goes in here
        nova_conf = Conf(fn, self.installer)

        # Used more than once so we calculate it ahead of time
        hostip = self.installer.get_option('ip')

        nova_conf.add('verbose', self.installer.get_bool_option('log_verbose'))

        # Allow destination machine to match source for resize.
        nova_conf.add('allow_resize_to_same_host', True)

        # Which scheduler do u want?
        nova_conf.add('compute_scheduler_driver',
                      self.installer.get_option('scheduler', default_value='nova.scheduler.filter_scheduler.FilterScheduler'))

        # Rate limit the api??
        nova_conf.add('api_rate_limit', self.installer.get_bool_option('api_rate_limit'))

        # Ensure the policy.json is referenced correctly
        nova_conf.add('policy_file', '/etc/nova/policy.json')

        # Setup nova network/settings
        self._configure_network_settings(nova_conf)

        # Setup nova volume/settings
        if self.installer.get_option('volumes'):
            self._configure_vols(nova_conf)

        # The ip of where we are running
        nova_conf.add('my_ip', hostip)

        # Setup your sql connection
        dbdsn = dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                     utf8=True,
                                     dbtype=self.installer.get_option('db', 'type'),
                                     **utils.merge_dicts(self.installer.get_option('db'),
                                                         dbhelper.get_shared_passwords(self.installer)))
        nova_conf.add('sql_connection', dbdsn)

        # Configure anything libvirt related?
        virt_driver = canon_virt_driver(self.installer.get_option('virt_driver'))
        if virt_driver == 'libvirt':
            self._configure_libvirt(lv.canon_libvirt_type(self.installer.get_option('libvirt_type')), nova_conf)

        # How instances will be presented
        instance_template = "%s%s" % (self.installer.get_option('instance_name_prefix'),
                                      self.installer.get_option('instance_name_postfix'))
        if not instance_template:
            instance_template = 'instance-%08x'
        nova_conf.add('instance_name_template', instance_template)

        # Enable the standard extensions
        nova_conf.add('osapi_compute_extension',
                      'nova.api.openstack.compute.contrib.standard_extensions')

        # Auth will be using keystone
        nova_conf.add('auth_strategy', 'keystone')

        # Is config drive being forced on?
        if self.installer.get_bool_option('force_cfg_drive'):
            nova_conf.add('force_config_drive', 'always')

        # Don't always force images to raw, which makes things take time to get to raw...
        nova_conf.add('force_raw_images', self.installer.get_bool_option('force_raw_images'))

        # Add a checksum for images fetched for each hypervisor?
        # This check absorbs cpu cycles, warning....
        nova_conf.add('checksum_base_images', self.installer.get_bool_option('checksum_base_images'))

        # Setup the interprocess locking directory (don't put me on shared storage)
        lock_path = self.installer.get_option('lock_path')
        if not lock_path:
            lock_path = sh.joinpths(self.installer.get_option('component_dir'), 'locks')
        sh.mkdirslist(lock_path, tracewriter=self.tracewriter)
        nova_conf.add('lock_path', lock_path)

        # Vnc settings setup
        self._configure_vnc(nova_conf)

        # Where our paste config is
        nova_conf.add('api_paste_config', self.installer.target_config(PASTE_CONF))

        # What our imaging service will be
        self._configure_image_service(nova_conf, hostip)

        # Configs for ec2 / s3 stuff
        nova_conf.add('ec2_dmz_host', self.installer.get_option('ec2_dmz_host', default_value=hostip))
        nova_conf.add('s3_host', hostip)

        # How is your message queue setup?
        mq_type = canon_mq_type(self.installer.get_option('mq-type'))
        if mq_type == 'rabbit':
            nova_conf.add('rabbit_host', self.installer.get_option('rabbit', 'host', default_value=hostip))
            nova_conf.add('rabbit_password', rbhelper.get_shared_passwords(self.installer)['pw'])
            nova_conf.add('rabbit_userid', self.installer.get_option('rabbit', 'user_id'))
            nova_conf.add('rpc_backend', 'nova.rpc.impl_kombu')

        # The USB tablet device is meant to improve mouse behavior in
        # the VNC console, but it has the side effect of increasing
        # the CPU usage of an idle VM tenfold.
        nova_conf.add('use_usb_tablet', False)

        # Where instances will be stored
        instances_path = self.installer.get_option('instances_path')
        if not instances_path:
            instances_path = sh.joinpths(self.installer.get_option('component_dir'), 'instances')
        self._configure_instances_path(instances_path, nova_conf)

        # Is this a multihost setup?
        self._configure_multihost(nova_conf)

        # Handle any virt driver specifics
        self._configure_virt_driver(nova_conf)

        # Handle configuring the conductor service
        self._configure_conductor(nova_conf)

        # Annnnnd extract to finish
        return self._get_content(nova_conf)
Example #14
0
    def generate(self, fn):

        # Everything built goes in here
        nova_conf = Conf(fn)

        # Used more than once so we calculate it ahead of time
        hostip = self.installer.get_option('ip')

        nova_conf.add('verbose', self.installer.get_bool_option('verbose'))

        # Allow destination machine to match source for resize. 
        nova_conf.add('allow_resize_to_same_host', True)

        # Which scheduler do u want?
        nova_conf.add('compute_scheduler_driver',
                      self.installer.get_option('scheduler', default_value='nova.scheduler.filter_scheduler.FilterScheduler'))

        # Rate limit the api??
        nova_conf.add('api_rate_limit', self.installer.get_bool_option('api_rate_limit'))

        # Setup nova network/settings
        self._configure_network_settings(nova_conf)

        # Setup nova volume/settings
        if self.installer.get_option('volumes'):
            self._configure_vols(nova_conf)

        # The ip of where we are running
        nova_conf.add('my_ip', hostip)

        # Setup your sql connection
        dbdsn = dbhelper.fetch_dbdsn(dbname=DB_NAME,
                                     utf8=True,
                                     dbtype=self.installer.get_option('db', 'type'),
                                     **utils.merge_dicts(self.installer.get_option('db'),
                                                         dbhelper.get_shared_passwords(self.installer)))
        nova_conf.add('sql_connection', dbdsn)

        # Configure anything libvirt related?
        virt_driver = canon_virt_driver(self.installer.get_option('virt_driver'))
        if virt_driver == 'libvirt':
            self._configure_libvirt(lv.canon_libvirt_type(self.installer.get_option('libvirt_type')), nova_conf)

        # How instances will be presented
        instance_template = "%s%s" % (self.installer.get_option('instance_name_prefix'),
                                      self.installer.get_option('instance_name_postfix'))
        if not instance_template:
            instance_template = 'instance-%08x'
        nova_conf.add('instance_name_template', instance_template)

        # Enable the standard extensions
        nova_conf.add('osapi_compute_extension',
                      'nova.api.openstack.compute.contrib.standard_extensions')

        # Auth will be using keystone
        nova_conf.add('auth_strategy', 'keystone')

        # Don't always force images to raw
        nova_conf.add('force_raw_images', self.installer.get_bool_option('force_raw_images'))

        # Add a checksum for images fetched to a hypervisor
        nova_conf.add('checksum_base_images', self.installer.get_bool_option('checksum_base_images'))

        # Vnc settings setup
        self._configure_vnc(nova_conf)

        # Where our paste config is
        nova_conf.add('api_paste_config',
                      self.installer.target_config(PASTE_CONF))

        # What our imaging service will be
        self._configure_image_service(nova_conf, hostip)

        # Configs for ec2 / s3 stuff
        nova_conf.add('ec2_dmz_host', self.installer.get_option('ec2_dmz_host', default_value=hostip))
        nova_conf.add('s3_host', hostip)

        # How is your message queue setup?
        mq_type = canon_mq_type(self.installer.get_option('mq-type'))
        if mq_type == 'rabbit':
            nova_conf.add('rabbit_host', self.installer.get_option('rabbit', 'host', default_value=hostip))
            nova_conf.add('rabbit_password', rbhelper.get_shared_passwords(self.installer)['pw'])
            nova_conf.add('rabbit_userid', self.installer.get_option('rabbit', 'user_id'))
            nova_conf.add('rpc_backend', 'nova.rpc.impl_kombu')

        # Where instances will be stored
        instances_path = self.installer.get_option('instances_path')
        if not instances_path:
            instances_path = sh.joinpths(self.installer.get_option('component_dir'), 'instances')
        self._configure_instances_path(instances_path, nova_conf)

        # Is this a multihost setup?
        self._configure_multihost(nova_conf)

        # Handle any virt driver specifics
        self._configure_virt_driver(nova_conf)

        # Annnnnd extract to finish
        return self._get_content(nova_conf)
Example #15
0
    def generate(self, fn):

        # Everything built goes in here
        nova_conf = Conf(fn, self.installer)

        # Used more than once so we calculate it ahead of time
        hostip = self.installer.get_option('ip')

        nova_conf.add('verbose', self.installer.get_bool_option('verbose'))

        # Allow destination machine to match source for resize.
        nova_conf.add('allow_resize_to_same_host', True)

        # Which scheduler do u want?
        nova_conf.add(
            'compute_scheduler_driver',
            self.installer.get_option(
                'scheduler',
                default_value='nova.scheduler.filter_scheduler.FilterScheduler'
            ))

        # Rate limit the api??
        nova_conf.add('api_rate_limit',
                      self.installer.get_bool_option('api_rate_limit'))

        # Setup nova network/settings
        self._configure_network_settings(nova_conf)

        # Setup nova volume/settings
        if self.installer.get_option('volumes'):
            self._configure_vols(nova_conf)

        # The ip of where we are running
        nova_conf.add('my_ip', hostip)

        # Setup your sql connection
        dbdsn = dbhelper.fetch_dbdsn(
            dbname=DB_NAME,
            utf8=True,
            dbtype=self.installer.get_option('db', 'type'),
            **utils.merge_dicts(self.installer.get_option('db'),
                                dbhelper.get_shared_passwords(self.installer)))
        nova_conf.add('sql_connection', dbdsn)

        # Configure anything libvirt related?
        virt_driver = canon_virt_driver(
            self.installer.get_option('virt_driver'))
        if virt_driver == 'libvirt':
            self._configure_libvirt(
                lv.canon_libvirt_type(
                    self.installer.get_option('libvirt_type')), nova_conf)

        # How instances will be presented
        instance_template = "%s%s" % (
            self.installer.get_option('instance_name_prefix'),
            self.installer.get_option('instance_name_postfix'))
        if not instance_template:
            instance_template = 'instance-%08x'
        nova_conf.add('instance_name_template', instance_template)

        # Enable the standard extensions
        nova_conf.add(
            'osapi_compute_extension',
            'nova.api.openstack.compute.contrib.standard_extensions')

        # Auth will be using keystone
        nova_conf.add('auth_strategy', 'keystone')

        # Is config drive being forced?
        if self.installer.get_bool_option('force_cfg_drive'):
            nova_conf.add('force_config_drive', 'always')

        # Don't always force images to raw
        nova_conf.add('force_raw_images',
                      self.installer.get_bool_option('force_raw_images'))

        # Add a checksum for images fetched to a hypervisor
        nova_conf.add('checksum_base_images',
                      self.installer.get_bool_option('checksum_base_images'))

        # Vnc settings setup
        self._configure_vnc(nova_conf)

        # Where our paste config is
        nova_conf.add('api_paste_config',
                      self.installer.target_config(PASTE_CONF))

        # What our imaging service will be
        self._configure_image_service(nova_conf, hostip)

        # Configs for ec2 / s3 stuff
        nova_conf.add(
            'ec2_dmz_host',
            self.installer.get_option('ec2_dmz_host', default_value=hostip))
        nova_conf.add('s3_host', hostip)

        # How is your message queue setup?
        mq_type = canon_mq_type(self.installer.get_option('mq-type'))
        if mq_type == 'rabbit':
            nova_conf.add(
                'rabbit_host',
                self.installer.get_option('rabbit',
                                          'host',
                                          default_value=hostip))
            nova_conf.add('rabbit_password',
                          rbhelper.get_shared_passwords(self.installer)['pw'])
            nova_conf.add('rabbit_userid',
                          self.installer.get_option('rabbit', 'user_id'))
            nova_conf.add('rpc_backend', 'nova.rpc.impl_kombu')

        # The USB tablet device is meant to improve mouse behavior in
        # the VNC console, but it has the side effect of increasing
        # the CPU usage of an idle VM tenfold.
        nova_conf.add('use_usb_tablet', False)

        # Where instances will be stored
        instances_path = self.installer.get_option('instances_path')
        if not instances_path:
            instances_path = sh.joinpths(
                self.installer.get_option('component_dir'), 'instances')
        self._configure_instances_path(instances_path, nova_conf)

        # Is this a multihost setup?
        self._configure_multihost(nova_conf)

        # Handle any virt driver specifics
        self._configure_virt_driver(nova_conf)

        # Annnnnd extract to finish
        return self._get_content(nova_conf)