Skip to content

Commit

Permalink
Address comments from @viglesiasce
Browse files Browse the repository at this point in the history
1. rename cookbook repo parameter to be less ambiguous
2. CD to cookbook repo dir that was we cloned to then do git pull
  • Loading branch information
tbeckham committed May 5, 2015
1 parent 992e0b0 commit 72da2cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bin/euca-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ if __name__ == '__main__':
parser.add_argument('-e', '--environment', default='etc/environment.yml')
parser.add_argument('-p', '--password', default='foobar')
parser.add_argument('-b', '--branch', default='euca-4.1')
parser.add_argument('-C', '--cookbook', default='https://github.com/eucalyptus/eucalyptus-cookbook')
parser.add_argument('--cookbook-repo', default='https://github.com/eucalyptus/eucalyptus-cookbook')
parser.add_argument('--debug', action='store_true', default=False)
args = parser.parse_args()
component_deployer = ComponentDeployer(args.password,
args.environment,
args.config,
args.debug,
args.branch,
args.cookbook)
args.cookbook_repo)
try:
function = getattr(component_deployer, args.operation)
function()
Expand Down
6 changes: 3 additions & 3 deletions eucadeploy/componentdeployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ComponentDeployer():
def __init__(self, password, environment_file='environment.yml',
config_file='config.yml', debug=False,
cookbook_branch='euca-4.1',
cookbook='https://github.com/eucalyptus/eucalyptus-cookbook'):
cookbook_repo='https://github.com/eucalyptus/eucalyptus-cookbook'):
self.environment_file = environment_file
self.config_file = config_file
self.config = self.read_config()
Expand All @@ -25,9 +25,9 @@ def __init__(self, password, environment_file='environment.yml',
local('if [ ! -d eucalyptus-cookbook ]; then '
'git clone '
'{0} eucalyptus-cookbook;'
'fi'.format(cookbook))
'fi'.format(cookbook_repo))
local('cd eucalyptus-cookbook; git checkout {0};'.format(cookbook_branch))
local('git pull')
local('cd eucalyptus-cookbook; git pull;')
ChefManager.download_cookbooks('eucalyptus-cookbook/Berksfile',
os.path.join(self.chef_repo_dir +
'/cookbooks'),
Expand Down

0 comments on commit 72da2cd

Please sign in to comment.