~whitmo/cloudfoundry/reconciler

« back to all changes in this revision

Viewing changes to hooks/install

  • Committer: Cory Johns
  • Date: 2014-10-02 20:06:08 UTC
  • Revision ID: cory.johns@canonical.com-20141002200608-5l5x7mnakjuu65bx
Fixed issues with raindance install and install hook idempotency

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
from charmhelpers.core import hookenv
6
6
from cloudfoundry.path import path
7
7
 
 
8
 
 
9
ssh_key = path(hookenv.charm_dir()) / 'orchestrator-key'
 
10
 
8
11
hookenv.juju_status('installing')
9
12
fetch.apt_install(fetch.filter_installed_packages([
10
 
    'juju-deployer', 'nfs-kernel-server']))
11
 
subprocess.check_call([
12
 
    'ssh-keygen',
13
 
    '-f', path(hookenv.charm_dir()) / 'orchestrator-key',
14
 
    '-N', ''])
15
 
subprocess.check_call([
16
 
    'pip', 'install', '--use-wheel', '-f', './wheelhouse', 'raindance'])
 
13
    'juju-deployer', 'nfs-kernel-server', 'python-pip']))
 
14
 
 
15
if not ssh_key.exists():
 
16
    subprocess.check_call(['ssh-keygen', '-f', ssh_key, '-N', ''])
 
17
 
 
18
subprocess.check_call([
 
19
    'pip', 'install', '--use-wheel', '-f', './wheelhouse', '--pre', 'raindance'])