cookbook 'particle-cli', '= 0.1.1'
particle-cli (5) Versions 0.1.1 Follow0
Installs/Configures particle-cli
cookbook 'particle-cli', '= 0.1.1', :supermarket
knife supermarket install particle-cli
knife supermarket download particle-cli
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
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
License & Authors
- Author: Free Beachler, Longevity Software LLC, (longevitysoft@gmail.com)
- Copyright: 2016, Free Beachler
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
0.1.1 failed this metric
0.1.1 passed this metric