Jump to navigation Jump to search
See the Cookbooks API section of the Spicerack documentation.
Creating your local environment
- Clone the required repositories from Gerrit under ~/wmf/gerrit for simplicity
$ git clone ssh://$GERRIT_USER@gerrit.wikimedia.org:29418/operations/software/spicerack $ git clone ssh://$GERRIT_USER@gerrit.wikimedia.org:29418/operations/cookbooks
- Change to the spicerack directory and run tox. It will create the proper virtualenv for us with all the dependencies required .
$ tox -e py3N-unit # where N is the minor version of Python installed in the system
- Note: We could just run 'tox' at this point, it will be just a bit slower because it will run all the tests with all the compatible python versions that are installed in the system and configured in the tox.ini file to run the tests
- There should be a .tox/py3N-tests/ directory with the virtualenv created, we can source the activate script
$ source .tox/py3N-tests/bin/activate
- Create a configuration file for spicerack called config.yaml
cookbooks_base_dir: /home/$USER/wmf/gerrit/cookbooks logs_base_dir: /home/$USER/wmf/gerrit/spicerack/logs
- The cookbook entry point script should be available, and you should be able to see the list of available cookbooks
$ cookbook -c config.yaml -l