]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
openstack: set config default and documentation
authorLoic Dachary <ldachary@redhat.com>
Fri, 28 Aug 2015 13:38:07 +0000 (15:38 +0200)
committerLoic Dachary <ldachary@redhat.com>
Wed, 2 Sep 2015 22:02:39 +0000 (00:02 +0200)
Add documentation for the ~/.teuthology.yaml OpenStack configuration
values and set reasonable defaults.

Signed-off-by: Loic Dachary <loic@dachary.org>
docs/siteconfig.rst
teuthology/config.py

index d0ab2643f0876b92393a9c901e3d17719554d219..130ec99ec2ec30ff9f9a386004837d343d8b4b2d 100644 (file)
@@ -109,3 +109,69 @@ Here is a sample configuration with many of the options set and documented::
     #           armv7l
     #           etc.
     baseurl_template: http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}
+
+    # The OpenStack backend configuration, a dictionary interpreted as follows
+    #
+    openstack:
+
+      # The path to the user-data file used when creating a target. It can have
+      # the {os_type} and {os_version} placeholders which are replaced with
+      # the value of --os-type and --os-version. No instance of a give {os_type}
+      # and {os_version} combination can be created unless such a file exists.
+      #
+      user-data: teuthology/openstack/openstack-{os_type}-{os_version}-user-data.txt
+  
+      # The IP number of the instance running the teuthology cluster. It will
+      # be used to build user facing URLs and should usually be the floating IP
+      # associated with the instance running the pulpito server.
+      #
+      ip: 8.4.8.4
+
+      # OpenStack has predefined machine sizes (called flavors)
+      # For a given job requiring N machines, the following example select
+      # the smallest flavor that satisfies these requirements. For instance
+      # If there are three flavors
+      #
+      #   F1 (10GB disk, 2000MB RAM, 1CPU)
+      #   F2 (100GB disk, 7000MB RAM, 1CPU)
+      #   F3 (50GB disk, 7000MB RAM, 1CPU)
+      #
+      # and machine: { disk: 40, ram: 7000, cpus: 1 }, F3 will be chosen.
+      # F1 does not have enough RAM (2000 instead of the 7000 minimum) and
+      # although F2 satisfies all the requirements, it is larger than F3
+      # (100GB instead of 50GB) and presumably more expensive.
+      #
+      # This configuration applies to all instances created for teuthology jobs
+      # that do not redefine these values.
+      #
+      machine:
+      
+        # The minimum root disk size of the flavor, in GB
+        #
+        disk: 20 # GB
+
+        # The minimum RAM size of the flavor, in MB
+        # 
+        ram: 8000 # MB
+
+        # The minimum number of vCPUS of the flavor
+        #
+        cpus: 1
+
+      # The volumes attached to each instance. In the following example,
+      # three volumes of 10 GB will be created for each instanced and 
+      # will show as /dev/vdb, /dev/vdc and /dev/vdd
+      #
+      #
+      # This configuration applies to all instances created for teuthology jobs
+      # that do not redefine these values.
+      #
+      volumes:
+
+        # The number of volumes
+        #
+        count: 3
+        
+        # The size of each volume, in GB
+        #
+        size: 10 # GB
index 5944f3e0e8bd25279ebc06fe8fb1576de427991a..e7cfcc296c6e2b743fb1cc05c0db3f4ff095b8da 100644 (file)
@@ -147,6 +147,19 @@ class TeuthologyConfig(YamlConfig):
         'koji_task_url': 'https://kojipkgs.fedoraproject.org/work/',
         'baseurl_template': 'http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}',
         'teuthology_path': None,
+        'openstack': {
+            'user-data': 'teuthology/openstack/openstack-{os_type}-{os_version}-user-data.txt',
+            'ip': '1.1.1.1',
+            'machine': {
+                'disk': 20,
+                'ram': 8000,
+                'cpus': 1,
+            },
+            'volumes': {
+                'count': 3,
+                'size': 10,
+            },
+        },
     }
 
     def __init__(self, yaml_path=None):