diff --git a/.gitignore b/.gitignore index 79377d7..5507edb 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,5 @@ subunit.log .pydevproject .idea .DS_Store -etc/*.conf tools/lintstack.head.py tools/pylint_exceptions diff --git a/etc/logging.conf.sample b/etc/logging.conf.sample deleted file mode 100644 index 58c5dea..0000000 --- a/etc/logging.conf.sample +++ /dev/null @@ -1,32 +0,0 @@ -[loggers] -keys=root - -[handlers] -keys=consoleHandler, fileHandler - -[formatters] -keys=verboseFormatter, simpleFormatter - -[logger_root] -level=DEBUG -handlers=consoleHandler, fileHandler - -[handler_consoleHandler] -class=StreamHandler -level=INFO -formatter=simpleFormatter -args=(sys.stdout,) - -[handler_fileHandler] -class=FileHandler -level=INFO -formatter=verboseFormatter -args=("/var/log/mistral.log",) - -[formatter_verboseFormatter] -format=%(asctime)s %(thread)s %(levelname)s %(module)s [-] %(message)s -datefmt= - -[formatter_simpleFormatter] -format=%(asctime)s %(levelname)s [-] %(message)s -datefmt= diff --git a/etc/terracotta.conf.sample b/etc/terracotta.conf.sample deleted file mode 100644 index 0a44424..0000000 --- a/etc/terracotta.conf.sample +++ /dev/null @@ -1,194 +0,0 @@ -[DEFAULT] -# Print debugging output (set logging level to DEBUG instead -# of default WARNING level). (boolean value) -#debug=True - -# The name of the host running the global manager -global_manager_host = controller - -# The port of the REST web service exposed by the global manager -global_manager_port = 60080 - -# The time interval between subsequent invocations of the database -# cleaner in seconds -db_cleaner_interval = 7200 - -# The admin user name for authentication with Nova using Keystone -os_admin_user = user - -# The admin password for authentication with Nova using Keystone -os_admin_password = userpassword - -# The directory used by the data collector to store the data on the -# resource usage by the VMs running on the host -local_data_directory = /var/lib/terracotta - -# The threshold on the overall (all cores) utilization of the physical -# CPU of a host that can be allocated to VMs. -host_cpu_usable_by_vms = 1.0 - -# The number of the latest data values stored locally by the data -# collector and passed to the underload / overload detection and VM -# placement algorithms -data_collector_data_length = 100 - -# The network bandwidth in MB/s available for VM migration -network_migration_bandwidth = 10 - -# The time interval between subsequent invocations of the data -# collector in seconds -data_collector_interval = 300 - -[oslo_messaging_rabbit] -# The RabbitMQ broker address where a single node is used. -# (string value) -#rabbit_host=localhost - -# The RabbitMQ broker port where a single node is used. -# (integer value) -#rabbit_port=5672 - -# RabbitMQ HA cluster host:port pairs. (list value) -#rabbit_hosts=$rabbit_host:$rabbit_port - -# The RabbitMQ userid. (string value) -#rabbit_userid=guest - -# The RabbitMQ password. (string value) -#rabbit_password=guest - -[api] -# Terracotta API server host -host = 0.0.0.0 - -# Terracotta API server port -port = 9090 - -[global_manager] -# The message topic that the global_manager listens on. (string value) -#topic=global_manager - -# Name of the global_manager node. This can be an opaque identifier. -# It is not necessarily a hostname, FQDN, or IP address. -# (string value) -#host=0.0.0.0 - -# The directory, where the VM instance data are stored -vm_instance_directory = /var/lib/nova/instances - -# The admin tenant name for authentication with Nova using Keystone -os_admin_tenant_name = tenantname - -# The OpenStack authentication URL -os_auth_url = http://controller:5000/v2.0/ - -# A coma-separated list of compute host names -compute_hosts = compute1, compute2, compute3, compute4 - -# Whether to use block migration (includes disk migration) -block_migration = True - -# The user name for connecting to the compute hosts to switch them -# into the sleep mode -compute_user = terracotta - -# The password of the user account used for connecting to the compute -# hosts to switch them into the sleep mode -compute_password = terracottapassword - -# A shell command used to switch a host into the sleep mode, the -# compute_user must have permissions to execute this command -sleep_command = pm-suspend - -# The network interface to send a magic packet from using ether-wake -ether_wake_interface = eth0 - -# The fully qualified name of a Python factory function that returns a -# function implementing a VM placement algorithm -algorithm_vm_placement_factory = terracotta.globals.vm_placement.bin_packing.best_fit_decreasing_factory - -# A JSON encoded parameters, which will be parsed and passed to the -# specified VM placement algorithm factory -algorithm_vm_placement_parameters = {"cpu_threshold": 0.8, "ram_threshold": 0.95, "last_n_vm_cpu": 2} - -[local_manager] -# The message topic that the local_manager listens on. (string value) -#topic=local_manager - -# Name of the local_manager node. This can be an opaque identifier. -# It is not necessarily a hostname, FQDN, or IP address. -# (string value) -#host=0.0.0.0 - -# The time interval between subsequent invocations of the local -# manager in seconds -local_manager_interval = 300 - -# The fully qualified name of a Python factory function that returns a -# function implementing an underload detection algorithm -#algorithm_underload_detection_factory = terracotta.locals.underload.trivial.threshold_factory -algorithm_underload_detection_factory = terracotta.locals.underload.trivial.last_n_average_threshold_factory - -# A JSON encoded parameters, which will be parsed and passed to the -# specified underload detection algorithm factory -#algorithm_underload_detection_parameters = {"threshold": 0.3} -algorithm_underload_detection_parameters = {"threshold": 0.5, "n": 2} - -# The fully qualified name of a Python factory function that returns a -# function implementing an overload detection algorithm -#algorithm_overload_detection_factory = terracotta.locals.overload.trivial.threshold_factory -algorithm_overload_detection_factory = terracotta.locals.overload.mhod.core.mhod_factory -#algorithm_overload_detection_factory = terracotta.locals.overload.trivial.last_n_average_threshold_factory -#algorithm_overload_detection_factory = terracotta.locals.overload.statistics.loess_factory -#algorithm_overload_detection_factory = terracotta.locals.overload.otf.otf_factory - -# A JSON encoded parameters, which will be parsed and passed to the -# specified overload detection algorithm factory -#algorithm_overload_detection_parameters = {"threshold": 0.9} -algorithm_overload_detection_parameters = {"state_config": [0.8], "otf": 0.1, "history_size": 500, "window_sizes": [30, 40, 50, 60, 70, 80, 90, 100], "bruteforce_step": 0.5, "learning_steps": 10} -#algorithm_overload_detection_parameters = {"threshold": 0.95, "n": 2} -#algorithm_overload_detection_parameters = {"threshold": 0.8, "param": 1.0, "length": 30} -#algorithm_overload_detection_parameters = {"otf": 0.2, "threshold": 0.8, "limit": 10} - -# The fully qualified name of a Python factory function that returns a -# function implementing a VM selection algorithm -#algorithm_vm_selection_factory = terracotta.locals.vm_selection.algorithms.minimum_migration_time_factory -algorithm_vm_selection_factory = terracotta.locals.vm_selection.algorithms.minimum_migration_time_max_cpu_factory - -# A JSON encoded parameters, which will be parsed and passed to the -# specified VM selection algorithm factory -#algorithm_vm_selection_parameters = {} -algorithm_vm_selection_parameters = {"last_n": 2} - -[collector] -# The threshold on the overall (all cores) utilization of the physical -# CPU of a host, above which the host is considered to be overloaded. -# This is used for logging host overloads into the database. -host_cpu_overload_threshold = 0.8 - -# The message topic that the collector listens on. (string value) -#topic=collector - -# Name of the collector node. This can be an opaque identifier. -# It is not necessarily a hostname, FQDN, or IP address. -# (string value) -#host=0.0.0.0 - -[database] -# The host name and credentials for connecting to the MySQL database -# specified in the format supported by SQLAlchemy -sql_connection = mysql://terracotta:password@localhost:3306/terracotta - -[pecan] -# Pecan root controller -root = terracotta.api.controllers.root.RootController - -# A list of modules where pecan will search for applications. -modules = terracotta.api - -# Enables the ability to display tracebacks in the -# browser and interactively debug during development. -debug = False - -# Enables user authentication in pecan. -auth_enable = True \ No newline at end of file diff --git a/etc/terracotta/README-terracotta.conf.txt b/etc/terracotta/README-terracotta.conf.txt new file mode 100644 index 0000000..125571d --- /dev/null +++ b/etc/terracotta/README-terracotta.conf.txt @@ -0,0 +1,4 @@ +To generate the sample terracotta.conf file, run the following +command from the top-level terracotta directory: + +tox -egenconfig diff --git a/etc/terracotta/terracotta-config-generator.conf b/etc/terracotta/terracotta-config-generator.conf new file mode 100644 index 0000000..f498b9a --- /dev/null +++ b/etc/terracotta/terracotta-config-generator.conf @@ -0,0 +1,9 @@ +[DEFAULT] +output_file = etc/terracotta/terracotta.conf +wrap_width = 79 +namespace = terracotta.config +namespace = oslo.db +namespace = oslo.log +namespace = oslo.messaging +namespace = oslo.service.service +