cookbook 'dev_env', '~> 0.1.4'
dev_env (5) Versions 0.1.4 Follow1
Installs/Configures dev_env
cookbook 'dev_env', '~> 0.1.4', :supermarket
knife supermarket install dev_env
knife supermarket download dev_env
dev_env Cookbook
A simple Cookbook to setup development environment. Here it takes care the usual procedures to setup a local development which are:
- Install NIX packages.
- Setup your projects.
- Git checkout the project.
- Run post bash commands to complete the setup.
Supported Platforms
Tested in Ubuntu.
Attributes
Main Attributes
["dev_env"]["user"]
(String) = User that will be assigned to own thewrap-ssh4git.sh
file. This file is required to ignore the host checks when runninggit clone/checkout
. Default value isnil
.["dev_env"]["packages"]
(Array) = Array of Hash that contains list of NIX packages to be installed.package
in below list will refer to the Hash object in this Array. Default value isnil
.["dev_env"]["gems"]
(Array) = Array of Hash that contains list of Ruby Gems to be installed.gem
in below list will refer to the Hash object in this Array. Default value isnil
.["dev_env"]["apps"]
(Array) = Array of Hash that contains list of project/app to be installed.app
in below list will refer to the Hash object in this Array. Default value isnil
.
Packages Attributes (package)
-
package["name"]
(String) = Name of NIX package you wish to install. Default value isnil
.
Ruby Gems Attributes (gem)
-
gem["name"]
(String) = Name of Ruby Gem you wish to install. Default value isnil
.
Application Attributes (app)
app["checkout"]
(String) = Project checkout path. i.e. if/home/user/project
is your checkout path, it will rungit clone {app["git_repo"]} /home/user/project
. Default value isnil
.app["git_repo"]
(String) = Git repository URL. Default value isnil
.app["revision"]
(String) = Git revision or branch to be used for checkout. Default value isnil
.app["git_action"]
(String) = Git action. Possible values are eithercheckout
orsync
. Default value isnil
.app["timeout"]
(Integer) = Timeout (in seconds) set forgit
execution. Default value is600
.app["retries"]
(Integer) = Number of retries if thegit
execution fails. Default value is5
.app["git_ignore_failure"]
(Boolean) = Indicates if you want to ignore the error if thegit
execution fails. Default value isfalse
.app["user"]
(String) = User that will be assigned for the project permission. Default value isnil
.app["post_commands"]
(String) = Bash command to run from the checkout path after thegit
execution completed. Default value isnil
.
Usage
dev_env::pre_process
dev_env::pre_process
recipe. This is to install NIX packages.
{ "run_list": [ "recipe[dev_env::pre_process]" ], "json": { dev_env: { packages: [ { name: "curl" }, { name: "apache2" } ], gems: [ { name: "tmuxinator" }, { name: "bundler" } ] } } }
dev_env::default
dev_env::default
recipe. This is to setup projects.
{ "run_list": [ "recipe[dev_env::default]" ], "json": { dev_env: { apps: [ { checkout_path: "/vagrant/home/projects/sample_app", git_repo: "git@github.com:railstutorial/sample_app.git", revision: "master", git_action: "checkout", user: "vagrant", post_commands: <<-EOH gem install bundler rake bundle install rake db:seed EOH }, { ... } ] } } }
License and Authors
Author:: Taufek Johar (taufek@gmail.com)
Dependent cookbooks
git >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
0.1.0
Initial release of dev_env_cookbook
Collaborator Number Metric
0.1.4 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.4 failed this metric
FC022: Resource condition within loop may not behave as expected: dev_env/recipes/default.rb:11
FC064: Ensure issues_url is set in metadata: dev_env/metadata.rb:1
FC066: Ensure chef_version is set in metadata: dev_env/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.4 passed this metric
Testing File Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.4 failed this metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.4 failed this metric
FC022: Resource condition within loop may not behave as expected: dev_env/recipes/default.rb:11
FC064: Ensure issues_url is set in metadata: dev_env/metadata.rb:1
FC066: Ensure chef_version is set in metadata: dev_env/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.4 passed this metric
Testing File Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.4 failed this metric
FC064: Ensure issues_url is set in metadata: dev_env/metadata.rb:1
FC066: Ensure chef_version is set in metadata: dev_env/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.4 passed this metric
Testing File Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.4 failed this metric
0.1.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number