]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
openstack: make git clone configurable
authorLoic Dachary <ldachary@redhat.com>
Fri, 28 Aug 2015 14:03:02 +0000 (16:03 +0200)
committerLoic Dachary <ldachary@redhat.com>
Wed, 2 Sep 2015 22:02:39 +0000 (00:02 +0200)
When teuthology-openstack clone theuthology for the purpose of creating
the cluster, use the clone configuration value instead of a hardcoded value.

Signed-off-by: Loic Dachary <loic@dachary.org>
docs/siteconfig.rst
teuthology/config.py
teuthology/openstack/__init__.py
teuthology/openstack/openstack-user-data.txt
teuthology/openstack/setup-openstack.sh
teuthology/openstack/test/test_openstack.py
teuthology/openstack/test/user-data-test1.txt

index 130ec99ec2ec30ff9f9a386004837d343d8b4b2d..6ae7f13c960cf26dc3d5c201ae76058a078239a2 100644 (file)
@@ -114,6 +114,12 @@ Here is a sample configuration with many of the options set and documented::
     #
     openstack:
 
+      # The teuthology-openstack command will clone teuthology with
+      # this command for the purpose of deploying teuthology from
+      # scratch and run workers listening on the openstack tube
+      #
+      clone: git clone -b wip-6502-openstack-v3 http://github.com/dachary/teuthology
+
       # 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}
index e7cfcc296c6e2b743fb1cc05c0db3f4ff095b8da..e456cc6c52a960b79e98a72ca72f9a2e2d7d2e46 100644 (file)
@@ -148,6 +148,7 @@ class TeuthologyConfig(YamlConfig):
         'baseurl_template': 'http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}',
         'teuthology_path': None,
         'openstack': {
+            'clone': 'git clone http://github.com/ceph/teuthology',
             'user-data': 'teuthology/openstack/openstack-{os_type}-{os_version}-user-data.txt',
             'ip': '1.1.1.1',
             'machine': {
index 6d2945cb9d9274c43141223dad7c8e8b88082cb2..a9a253f17f09b8b38ffd27536be4be64de1c9d92 100644 (file)
@@ -442,13 +442,16 @@ ssh access   : ssh {identity}{username}@{ip} # logs in /usr/share/nginx/html
             upload = '--archive-upload ' + self.args.archive_upload
         else:
             upload = ''
+        clone = teuth_config.openstack['clone']
         log.debug("OPENRC = " + openrc + " " +
                   "TEUTHOLOGY_USERNAME = " + self.username + " " +
+                  "CLONE_OPENSTACK = " + clone + " " +
                   "UPLOAD = " + upload + " " +
                   "NWORKERS = " + str(self.args.simultaneous_jobs))
         content = (template.
                    replace('OPENRC', openrc).
                    replace('TEUTHOLOGY_USERNAME', self.username).
+                   replace('CLONE_OPENSTACK', clone).
                    replace('UPLOAD', upload).
                    replace('NWORKERS', str(self.args.simultaneous_jobs)))
         open(path, 'w').write(content)
index 437b10c5ce505814d253a123f9852f82b26e4ac3..a0d471e023a842eb251202250a9aa9c48bb126a3 100644 (file)
@@ -9,7 +9,7 @@ packages:
  - git
  - rsync
 runcmd:
- - su - -c '(set -x ; git clone -b wip-6502-openstack-v3 http://github.com/dachary/teuthology && cd teuthology && ./bootstrap install)' TEUTHOLOGY_USERNAME >> /tmp/init.out 2>&1
+ - su - -c '(set -x ; CLONE_OPENSTACK && cd teuthology && ./bootstrap install)' TEUTHOLOGY_USERNAME >> /tmp/init.out 2>&1
  - echo 'export OPENRC' | tee /home/TEUTHOLOGY_USERNAME/openrc.sh
  - su - -c '(set -x ; source openrc.sh ; cd teuthology ; source virtualenv/bin/activate ; openstack keypair delete teuthology || true ; teuthology/openstack/setup-openstack.sh --nworkers NWORKERS UPLOAD --setup-all)' TEUTHOLOGY_USERNAME >> /tmp/init.out 2>&1
  - /etc/init.d/teuthology restart
index 93ac375a0b4857c3a5b2be8a7de6a1d7a7b8b2a7..0aea3302ae5ac803c392ec00fec8edaa573c109a 100755 (executable)
@@ -59,6 +59,7 @@ lab_domain: $labdomain
 max_job_time: 14400 # 4 hours
 teuthology_path: .
 openstack:
+  clone: git clone -b wip-6502-openstack-v3 http://github.com/dachary/teuthology
   user-data: teuthology/openstack/openstack-{os_type}-{os_version}-user-data.txt
   ip: $ip
   nameserver: $nameserver
index 0884fb310977283bfdd704a8b53ea8610af6808d..c9723b548bee57ee99199b599577fa3835c7d906 100644 (file)
@@ -109,6 +109,7 @@ openstack keypair delete {key_name} || true
         assert "nworkers=" + str(args.simultaneous_jobs) in variables
         assert "username=" + teuthology.username in variables
         assert "upload=--archive-upload user@archive:/tmp" in variables
+        assert "upload=git clone" in variables
         assert os.environ['OS_AUTH_URL'] in variables
 
         out, err = capsys.readouterr()
index b7d47de861405feaa263a0220bd427e1266c6579..9889aa9f35c50c7018dee36ad3dc2d3c98a21b43 100644 (file)
@@ -2,4 +2,4 @@
 system_info:
   default_user:
     name: ubuntu
-final_message: "teuthology is up and running after $UPTIME seconds, substituded variables nworkers=NWORKERS openrc=OPENRC username=TEUTHOLOGY_USERNAME upload=UPLOAD"
+final_message: "teuthology is up and running after $UPTIME seconds, substituded variables nworkers=NWORKERS openrc=OPENRC username=TEUTHOLOGY_USERNAME upload=UPLOAD clone=CLONE_OPENSTACK"