From b2441ab692695b61d1779b5a303173e56fc30a5a Mon Sep 17 00:00:00 2001 From: Przemyslaw Kaminski Date: Fri, 15 May 2015 16:05:53 +0200 Subject: [PATCH] shotgun is installed in Vagrant env Also, generate_shotgun_config command added for easy inspection. Change-Id: Ib77774dcae6b3104d4f11230e6c154d875f672b2 --- vagrant/salt/nailgun/generate_shotgun_config | 25 ++++++++++++++++++++ vagrant/salt/nailgun/init.sls | 11 +++++++++ 2 files changed, 36 insertions(+) create mode 100644 vagrant/salt/nailgun/generate_shotgun_config diff --git a/vagrant/salt/nailgun/generate_shotgun_config b/vagrant/salt/nailgun/generate_shotgun_config new file mode 100644 index 0000000..325efb4 --- /dev/null +++ b/vagrant/salt/nailgun/generate_shotgun_config @@ -0,0 +1,25 @@ +#!/bin/bash +# Copyright 2015 Mirantis, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +. /etc/bash_completion.d/virtualenvwrapper + +workon fuel + +cd /sources/fuel-web + +python -c 'import json +from nailgun.task.task import DumpTask +f = open("/tmp/shotgun-config.json", "w") +f.write(json.dumps(DumpTask.conf(), indent=2))' diff --git a/vagrant/salt/nailgun/init.sls b/vagrant/salt/nailgun/init.sls index 75f0540..e42636a 100644 --- a/vagrant/salt/nailgun/init.sls +++ b/vagrant/salt/nailgun/init.sls @@ -92,3 +92,14 @@ python-fuel-command-config: - source: salt://nailgun/client-config.yaml - require: - file: python-fuel-command-config-dir + +python-shotgun-command: + cmd.run: + - name: python setup.py develop + - cwd: /sources/fuel-web/shotgun + +generate-shotgun-config-command: + file.managed: + - name: /usr/bin/generate_shotgun_config + - source: salt://nailgun/generate_shotgun_config + - mode: 0777