GithubHelp home page GithubHelp logo

isabella232 / cookiecutter-salt-formula Goto Github PK

View Code? Open in Web Editor NEW

This project forked from salt-formulas/cookiecutter-salt-formula

0.0 0.0 0.0 79 KB

Cookiecutter template for Salt formulas

Home Page: https://salt-formulas.readthedocs.io

License: Apache License 2.0

Shell 58.29% Python 11.58% Makefile 26.78% HTML 1.56% SaltStack 1.79%

cookiecutter-salt-formula's Introduction

cookiecutter-salt-formula

A cookiecutter template for Salt Formula.

Installation

pip install cookiecutter

cd cookiecutter

cookiecutter salt-formula

Init Test Kitchen configuration

Follow the salt formula testing guidelines and automated CI in the main documentation.

To generate .kitchen.yml for new or existing project:

  • install envtpl, renders jinja2 templates with shell environment variables
  • install required gems, it depends on drivers configured to be used (docker by default)
pip install envtpl
gem install kitchen-docker kitchen-salt [kitchen-openstack kitchen-vagrant kitchen-inspec busser-serverspec]

Once you create your tests/pillar structure (required if you want to auto-populate kitchen yaml with test suites)

# cd <formula repository>
../kitchen-init.sh

Instantly, to add kitchen configuration into existing repository:

# cd <formula repository>
curl -skL "https://raw.githubusercontent.com/salt-formulas/cookiecutter-salt-formula/master/kitchen-init.sh" | bash -s --

Docker way

MY_NEW_SALT_FORMULA_DIR="watchdog"
mkdir $MY_NEW_SALT_FORMULA_DIR
git clone https://github.com/salt-formulas/cookiecutter-salt-formula.git
docker run --rm -it -u $(id -u):$(id -g) --env HOME=/$MY_NEW_SALT_FORMULA_DIR -v $PWD/$MY_NEW_SALT_FORMULA_DIR:/$MY_NEW_SALT_FORMULA_DIR -v $PWD/cookiecutter-salt-formula:/cookiecutter-salt-formula:ro cookiecutter/cookiecutter /cookiecutter-salt-formula --output-dir /$MY_NEW_SALT_FORMULA_DIR
service_name [some_service]: watchdog
role_name [server]:
initial_version [2018.1]:
copyright_year [2018]:
copyright_holder [Your Name et al.]: Mirantis, Inc.
author_name [John Doe]: Petr Ruzicka
author_contact [[email protected]]: [email protected]
homepage [https://github.com/salt-formulas]:
debian_version [xenial]:
kitchen_driver [docker]:
kitchen_verifier [inspec]:
kitchen_formula [watchdog]:
kitchen_suites []: server

cookiecutter-salt-formula's People

Contributors

epcim avatar fpytloun avatar ruzickap avatar cznewt avatar michaelkuty avatar alexz-kh avatar martin819 avatar sfinga avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.