{"body":"    def src_install(self):\n        subprocess.check_call(['apt-get', 'build-dep', 'python-mysqldb', '-y'])\n        subprocess.check_call(['pip', 'install', '--upgrade', 'pip',\n                               'virtualenv', 'setuptools' ,'pbr', 'tox'])\n        subprocess.check_call(['git', '-C', '/home/ubuntu', 'clone',\n                               'https://github.com/openstack/congress.git'])\n        subprocess.check_call(['git', '-C', self.install_dir, 'checkout',\n                               '{}'.format(self.src_branch)])\n        subprocess.check_call(['mkdir', '/etc/congress'])\n        subprocess.check_call(['chown', 'ubuntu', '/etc/congress'])\n        subprocess.check_call(['mkdir', '/etc/congress/snapshot'])\n        subprocess.check_call(['mkdir', '/var/log/congress'])\n        subprocess.check_call(['chown', 'ubuntu', '/var/log/congress'])\n        subprocess.check_call(['cp', '/home/ubuntu/congress/etc/api-paste.ini', '/etc/congress'])\n        subprocess.check_call(['cp', '/home/ubuntu/congress/etc/policy.json', '/etc/congress'])\n        subprocess.check_call(['virtualenv', '--python=python2.7',\n                              self.install_dir])\n        subprocess.check_call(['bin/pip', 'install' ,'-r', 'requirements.txt'],\n                              cwd=self.install_dir)\n        subprocess.check_call(['bin/pip', 'install', '.'],\n                              cwd=self.install_dir)\n        subprocess.check_call(['bin/pip', 'install', 'tox'],\n                              cwd=self.install_dir)\n        subprocess.check_call(['bin/pip', 'install', 'MySQL-python'],\n                              cwd=self.install_dir)\n        subprocess.check_call(['bin/tox', '-egenconfig'], cwd=self.install_dir)\n#        subprocess.check_call(['chown', '-R', 'ubuntu'], cwd=self.install_dir)\n        subprocess.check_call(['cp', '/home/ubuntu/congress/etc/congress.conf.sample', '/etc/congress/congress.conf'])\n#        subprocess.check_call(['/home/ubuntu/congress/bin/congress-db-manage','--config-file /etc/congress/congress.conf','upgrade','head'])\n        subprocess.check_call(['/home/ubuntu/congress/bin/congress-db-manage','upgrade','head'])","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/hMMamRRJ","modified":1464965634,"id":"hMMamRRJ","size":2164,"lines":30,"own_paste":false,"theme":"","date":1464965634}