Make chef server setup explicit

explicit call the scripts we want to call, so that
we can customize them later.

Change-Id: I64daa9965277b164bfc0ee324c17bf4164cb70ee
This commit is contained in:
Yun Mao 2013-05-20 17:26:25 -04:00
parent b12e367e95
commit 3da474f31b
1 changed files with 6 additions and 5 deletions

View File

@ -256,11 +256,12 @@ class Orchestrator(object):
execute uploaded scripts to install chef, config knife, upload
cookbooks, roles, and environments
"""
for key in self.chefserver_files:
out, error = cmd.ssh(self.user + '@' + self._chefserver_ip,
'/bin/bash ' + key,
screen_output=True)
print 'out=', out, 'error=', error
def ssh_chefserver(command):
return cmd.ssh(self.user + "@" + self._chefserver_ip,
"/bin/bash " + command, screen_output=True)
ssh_chefserver('install_chefserver.sh')
ssh_chefserver('configure_knife.sh')
ssh_chefserver('setup_chef_repo.sh')
def _checkin_chefserver(self):
"""