Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

particle-cli (5) Versions 0.1.1

Installs/Configures particle-cli

Policyfile
Berkshelf
Knife
cookbook 'particle-cli', '= 0.1.1', :supermarket
cookbook 'particle-cli', '= 0.1.1'
knife supermarket install particle-cli
knife supermarket download particle-cli
README
Dependencies
Changelog
Quality 50%

particle-cli Cookbook

Installs particle-cli from a pre-built binary and related libraries. Based on chef-particle-base, but more atomic. This cookbook is intended to support a workflow in a local particle cloud where one desires a build environment that runs on a VM instead of an RPi. That isn't to say an RPi can't be used for Particle development, because it can, to an extent. This cookbook does not use NPM to install particle-cli, but support can be added for that install method, as well as particle-cli-wrapper.

Not tested on RPi.

Requirements

Platforms

  • Debian/Ubuntu
  • Mac OS X
  • Windows?

Chef

  • Chef 12.0+

Cookbooks

  • apt -- needed for lib32c packages
  • git -- needed for particle firmware repo. and other libraries

Attributes

Customize the attributes to suit site specific conventions and defaults.
- node['particle_cli']['dir'] - user to use for install. defaults to /home/[user]/particle.
- node['particle_cli']['directories']['tmp'] - location of tmp folder to use for cookbook activities.

particle-cli::default

Key Type Description Default
<span style="font-family: monospace;">['particle_cli']['user']</span> String User name used for install. The binary package will be given these user permissions and placed under this users home directory. <span style="font-family: monospace;">vagrant</span>
<span style="font-family: monospace;">['particle_cli']['group']</span> String Group to use for install. <span style="font-family: monospace;">vagrant</span>
<span style="font-family: monospace;">['particle_cli']['dir']</span> String Directory to place particle_cli_embedded downloads/binaries/sources. <span style="font-family: monospace;">/home/#{node['particle_cli']['user']}/particle</span>
<span style="font-family: monospace;">['particle_cli']['directories']['tmp']</span> String tmp folder for cookbook-related activities <span style="font-family: monospace;">#{node['particle_cli']['dir']}/tmp</span>
<span style="font-family: monospace;">['particle_cli']['directories']['bin']</span> String bin folder for cookbook-related activities <span style="font-family: monospace;">#{node['particle_cli']['dir']}/bin</span>

particle-cli::particle_cli

Key Type Description Default
<span style="font-family: monospace;">['particle_cli']['source_url']</span> String URL that serves the particle_cli prebuilt binary. <span style="font-family: monospace;">if platform_family?('mac_os_x') "https://dfu55fst9l042.cloudfront.net/master/0.0.1-dedbf1f/darwin/amd64/particle-cli-ng.gz" elsif platform_family?('debian') "https://dfu55fst9l042.cloudfront.net/master/0.0.1-dedbf1f/linux/amd64/particle-cli-ng.gz" elsif platform_family?('windows') "https://dfu55fst9l042.cloudfront.net/master/0.0.1-dedbf1f/windows/amd64/particle-cli-ng.exe"</span>
<span style="font-family: monospace;">['particle_cli'] -- there are more attrs</span> n/a ... <span style="font-family: monospace;">...</span>

Resources

Not currently defined.

Actions

  • :create: Downloads a particle-cli prebuilt-binary and installs it. Also downloads Particle's core firmware, core common, and core communication libraries. Creates a friendly-symlink for compiling Particle firmware with gcc-arm-embedded.

Usage

particle-cli::default

Just include particle-cli in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[particle-cli]"
  ]
}

Examples

Install particle-cli in non-default folder with non-default user.
ruby
particle-cli do
user 'my-user'
group 'my-group'
action :create
end

Install particle-cli in default folder for default user with non-default binary version.
ruby
particle-cli do
source_url 'https://dfu55fst9l042.cloudfront.net/master/0.0.1-dedbf1f/darwin/amd64/particle-cli-ng.gz'
action :create
end

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License & Authors

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.

Dependent cookbooks

git >= 0.0.0
apt >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

particle-cli CHANGELOG

This file is used to list changes made in each version of the particle-cli cookbook.

0.1.0

  • [free] - Initial release of partice-cli

Collaborator Number Metric
            

0.1.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Foodcritic Metric
            

0.1.1 passed this metric