# Pastebin hMMamRRJ def src_install(self): subprocess.check_call(['apt-get', 'build-dep', 'python-mysqldb', '-y']) subprocess.check_call(['pip', 'install', '--upgrade', 'pip', 'virtualenv', 'setuptools' ,'pbr', 'tox']) subprocess.check_call(['git', '-C', '/home/ubuntu', 'clone', 'https://github.com/openstack/congress.git']) subprocess.check_call(['git', '-C', self.install_dir, 'checkout', '{}'.format(self.src_branch)]) subprocess.check_call(['mkdir', '/etc/congress']) subprocess.check_call(['chown', 'ubuntu', '/etc/congress']) subprocess.check_call(['mkdir', '/etc/congress/snapshot']) subprocess.check_call(['mkdir', '/var/log/congress']) subprocess.check_call(['chown', 'ubuntu', '/var/log/congress']) subprocess.check_call(['cp', '/home/ubuntu/congress/etc/api-paste.ini', '/etc/congress']) subprocess.check_call(['cp', '/home/ubuntu/congress/etc/policy.json', '/etc/congress']) subprocess.check_call(['virtualenv', '--python=python2.7', self.install_dir]) subprocess.check_call(['bin/pip', 'install' ,'-r', 'requirements.txt'], cwd=self.install_dir) subprocess.check_call(['bin/pip', 'install', '.'], cwd=self.install_dir) subprocess.check_call(['bin/pip', 'install', 'tox'], cwd=self.install_dir) subprocess.check_call(['bin/pip', 'install', 'MySQL-python'], cwd=self.install_dir) subprocess.check_call(['bin/tox', '-egenconfig'], cwd=self.install_dir) # subprocess.check_call(['chown', '-R', 'ubuntu'], cwd=self.install_dir) subprocess.check_call(['cp', '/home/ubuntu/congress/etc/congress.conf.sample', '/etc/congress/congress.conf']) # subprocess.check_call(['/home/ubuntu/congress/bin/congress-db-manage','--config-file /etc/congress/congress.conf','upgrade','head']) subprocess.check_call(['/home/ubuntu/congress/bin/congress-db-manage','upgrade','head'])