[PKG-Openstack-devel] OpenStack switching to a unified template system

Thomas Goirand zigo at debian.org
Tue Mar 6 00:19:22 UTC 2018


Hi there!

In OpenStack, we use debconf to configure the same thing on a number of
services (ie: different package). It used to be that OpenStack services
were in a small number, and the debconf templates were maintainable in
each service, with translators sending translations to each and every
individual packages.

However, OpenStack in Debian has grown to more than 25 services, and it
becomes unrealistic to duplicate 23 debconf templates across 25 packages.

Therefore, I've moved the shared debconf templates from each individual
services to openstack-pkg-tools. When building, packages are copying the
templates from /usr/share/openstack-pkg-tools/debconf, and merge the
translations into debian/po from
/usr/share/openstack-pkg-tools/debconf/po using msgmerge.

There's 4 templates, each for a different topic of configuration within
OpenStack service.

1/ configure_db: a small template to activate dbconfig-common
2/ api-endpoing: registration of the OpenStack APIs within Keystone catalog
3/ rabbitmq: configuration of access to the message queue server
4/ ksat: configuration of the keystone_authtoken, ie: credentials to the
Keystone auth server.

One or more (usually all) templates are copied at build time from
openstack-pkg-tools to the debian/ folder of each package, then a sed
replaces "ospt" by individual package names (nova, cinder, glance, etc.)
so that templates are owned by each package.

Doing this work, I had to remove all traces of package names within the
templates, so that they can be generic enough. Therefore, it is
reasonable to send these templates to this list, before asking
translation updates for each languages.

The openstack-pkg-tools version 70, which includes these generic
templates, hasn't been released yet, though we will upload soon.

I've attached the templates. Please review them for English exactitude.

Cheers,

Thomas Goirand (zigo)
-------------- next part --------------
# ### database configuration ###
Template: ospt/configure_db
Type: boolean
Default: false
_Description: Set up a database for this package?
 No database has been set up for this package. Before continuing, you should
 make sure you have the following information:
 .
  * the type of database that you want to use, generally MySQL is a good
    choice, other implementation like Postgress or SQLite are often
    problematic with OpenStack (this depends on each service);
  * the database server hostname (that server must allow TCP connections from
    this machine);
  * a username and password to access the database.
 .
 Note that if you plan on using a remote database server, you must first
 configure dbconfig-common to do so (using dpkg-reconfigure dbconfig-common),
 and the remote database server needs to be configured with adequate
 credentials.
 .
 If some of these requirements are missing, do not choose this option and run with
 regular SQLite support.
 .
 You can change this setting later on by running "dpkg-reconfigure -plow".

-------------- next part --------------
# ### service and endpoint registration ###
Template: ospt/configure_api-endpoint
Type: boolean
Default: false
_Description: Register this service in the Keystone endpoint catalog?
 Each OpenStack service (each API) must be registered in the Keystone catalog
 in order to be accessible. This is done using "openstack service create" and
 "openstack endpoint create". This can be done automatically now.
 .
 Note that you will need to have an up and running Keystone server on which to
 connect using a known admin project name, admin username and password. The
 admin auth token is not used anymore.
 .
 Also, if a service of the matching name for this service is already present
 in the Keystone catalog, endpoint registration will be aborted.

Template: ospt/api-keystone-address
Type: string
_Description: Keystone server address:
 Please enter the address (IP or resolvable address) of the Keystone server,
 for creating the new service and endpoints.
 .
 Any non-valid ipv4, ipv6 or host address string will abort the endpoint
 registration.

Template: ospt/api-keystone-admin-username
Type: string
Default: admin
_Description: Keystone admin name:
 To create the service endpoint, this package needs to know the Admin login,
 name, project name, and password, so it can issue commands through the the
 Keystone API.

Template: ospt/api-keystone-admin-project-name
Type: string
Default: admin
_Description: Keystone admin project name:
 To create the service endpoint, this package needs to know the Admin login,
 name, project name, and password, so it can issue commands through the the
 Keystone API.

Template: ospt/api-keystone-admin-password
Type: password
_Description: Keystone admin password:
 To create the service endpoint, this package needs to know the Admin login,
 name, project name, and password, so it can issue commands through the the
 Keystone API.

Template: ospt/api-endpoint-address
Type: string
_Description: This service endpoint IP address:
 Please enter the endpoint address that will be used to contact this service.
 .
 This address should be accessible from the clients that will use this
 service, so if you are installing a public cloud, this should be a public
 address. You can specify either a Fully Qualified Domain Name (FQDN) or an IP
 address. If you specify an FQDN, it must be resolvable for every host in this
 cloud, preferably through the /etc/hosts file rather than a DNS query.

Template: ospt/api-endpoint-region-name
Type: string
Default: regionOne
_Description: Name of the region to register:
 OpenStack supports using regions, with each region representing a different
 location (usually a different data center). Please enter the region name that
 you wish to use when registering the endpoint.
 .
 The region name is usually a string containing only valid latin alphabet
 chars, dots and dashes. A non-valid string will abort the API endpoint
 registration.

-------------- next part --------------
# ### keystone_authtoken configuration ###
# ksat stands for keystone authtoken
Template: ospt/configure_ksat
Type: boolean
Default: false
_Description: Manage keystone_authtoken with debconf?
 Every OpenStack service must contact Keystone, and this is configured through
 the [keystone_authtoken] section of the configuration. Specify if you wish to
 handle this configuration through debconf.

Template: ospt/ksat-public-url
Type: string
Default: http://localhost:5000
_Description: Auth server public endpoint url:
 Specify the URL of your Keystone authentication server public endpoint. This
 value will be set in the www_authenticate_uri directive.

Template: ospt/ksat-admin-url
Type: string
Default: http://localhost:35357
_Description: Auth server admin endpoint url:
 Specify the URL of your Keystone authentication server admin endpoint. This
 value will be set in auth_url.

Template: ospt/ksat-region
Type: string
Default: regionOne
_Description: Keystone region:
 Specify the Keystone region to use.

Template: ospt/ksat-create-service-user
Type: boolean
Default: true
_Description: Create service user?
 This package can reuse an already existing username, or create one right now.
 If you wish to create one, then you will be prompt for the admin credentials.

Template: ospt/ksat-admin-username
Type: string
Default: admin
_Description: Auth server admin username:

Template: ospt/ksat-admin-project-name
Type: string
Default: admin
_Description: Auth server admin project name:

Template: ospt/ksat-admin-password
Type: password
_Description: Auth server admin password:

Template: ospt/ksat-service-username
Type: string
_Description: Auth server service username:

Template: ospt/ksat-service-project-name
Type: string
Default: service
_Description: Auth server service project name:

Template: ospt/ksat-service-password
Type: password
_Description: Auth server service password:

-------------- next part --------------
# ### rabbitmq access configuration ###
Template: ospt/configure_rabbit
Type: boolean
Default: false
_Description: Configure rabbitmq with debconf?
 OpenStack services needs access to a message queue server. This is
 configured through the transport_url directive. Specify if you
 wish this package configuration to be handled through debconf.
 .
 Note that only access to rabbitmq is handled, and that rabbitmq-server user
 creation isn't performed (you must create usernames and set passwords
 before installing this package). Also, the standard rabbitmq-server guest
 account cannot be used for remote connection.

Template: ospt/rabbit-host
Type: string
Default: localhost
_Description: IP address of your RabbitMQ host:
 In order to interoperate with other components of OpenStack, this package
 needs to connect to a central RabbitMQ server.
 .
 Please specify the IP address of that server.

Template: ospt/rabbit-userid
Type: string
Default: guest
_Description: Username for connection to the RabbitMQ server:
 In order to interoperate with other components of OpenStack, this package
 needs to connect to a central RabbitMQ server.
 .
 Please specify the username used to connect to the RabbitMQ server.

Template: ospt/rabbit-password
Type: password
_Description: Password for connection to the RabbitMQ server:
 In order to interoperate with other components of OpenStack, this package
 needs to connect to a central RabbitMQ server.
 .
 Please specify the password used to connect to the RabbitMQ server.



More information about the Openstack-devel mailing list