knife-zero 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f5e2d9755e4e6f715cd77516dc2fb0d6f79d4c07
4
- data.tar.gz: fce3c2e244371f998167e360afb7c97bf80e776f
3
+ metadata.gz: 669006724c6e47cce3b95f94d477e974a57a32ab
4
+ data.tar.gz: 94d34c6bd8708e218f179b15179e7ae8359109dd
5
5
  SHA512:
6
- metadata.gz: f31dac88e7c0f4ada81fbba4310f0c1ed2c5adf2b48684beb19b5644b4a4aff9a4d35333e02ec05daf718a2054d3957afcd96f7678ff363cedd7de5d008886c4
7
- data.tar.gz: bc0b9977368987df43e7f2d6bad671436bcad7a5e4a42aba4223b1257c89700e3dbf70c4639cf4feb018f29b5252c3818d48a8c4c047767d2ed576adcb6ff260
6
+ metadata.gz: 87bfb41b3ff229dbf057ef52307d763d57514ce373ef51fb118da4b905d09e75fa625c0679c92bb2d9febdcaf8f28ce461574e21016b107e7977810f2677761e
7
+ data.tar.gz: 85bf85f129c80d70f2ddf1b4ee646ff13d8420e46760b14cf5390d783d42400806fa5cd3c85ef4ddd9c1e2c3f74148141a0d3602f97c940a18d767746fdb4ef9
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Knife-Plugin Zero
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/knife-zero.svg)](http://badge.fury.io/rb/knife-zero)
4
+
3
5
  Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH port fowarding.
4
6
 
5
7
  - It doesn't have to transport cookbooks via scp,rsync or something.
@@ -13,8 +15,6 @@ Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH port
13
15
 
14
16
  ## Installation
15
17
 
16
- > This gem has not been released yet.
17
-
18
18
  Add this line to your application's Gemfile:
19
19
 
20
20
  gem 'knife-zero'
@@ -43,6 +43,8 @@ Supported options are mostly the same as `knife bootstrap`.
43
43
 
44
44
  #### Example
45
45
 
46
+ Bootstrap with run-list.
47
+
46
48
  ```
47
49
  $ bundle exec knife zero bootstrap host.example.com -r hogehoge::default --no-host-key-verify
48
50
  Connecting to host.example.com
@@ -86,7 +88,21 @@ Platform: ubuntu 12.04
86
88
  Tags:
87
89
  ```
88
90
 
89
- ### SSH
91
+ Search and update node by `knife exec`(I will implement them into plugin.).
92
+
93
+ ```
94
+ $ knife exec --local-mode -E 'nodes.all {|n| system "ssh -R8889:127.0.0.1:8889 #{n.ipaddress} chef-client -S http://127.0.0.1:8889" }'
95
+ ```
96
+
97
+ Seach and execute command via ssh by knife ssh.
98
+
99
+ ```
100
+ $ knife ssh 'hostname:*' --local-mode uptime --attribute ipaddress
101
+ xxx.xxx.xxx.xxx 08:41:36 up 1:03, 1 user, load average: 0.00, 0.01, 0.01
102
+ xxx.xxx.xxx.xxx 08:41:37 up 143 days, 2:32, 4 users, load average: 0.00, 0.01, 0.05
103
+ ```
104
+
105
+ ### Update(pending)
90
106
 
91
107
  Search nodes from local chef-repo directory, and run command at remote node.
92
108
 
@@ -94,6 +110,19 @@ Supported options are mostly the same as `knife ssh`.
94
110
 
95
111
  > Pending
96
112
 
113
+ ## Sample Workflow
114
+
115
+ 1. create chef-repo directory.
116
+ 1. bundle init and add below.
117
+ - `gem 'chef' `
118
+ - `gem 'knife-zero'`
119
+ - and cookbook management tool such as `Beakshelf` or `Librarian-Chef`.
120
+ 1. bundle
121
+ e.g.) `bundle install --path vendor/bundle --binstubs`
122
+ 1. install cookbooks to `./cookbooks`. (if you need run recipe.)
123
+ 1. bootstrap on remote node.
124
+ `./bin/knife zero bootstrap host.example.com [-r "${your-run-list}"]`
125
+ 1. chef-client will run using resources on local chef-repo.
97
126
 
98
127
  ## Contributing
99
128
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["sawanoboly"]
10
10
  spec.email = ["sawanoboriyu@higanworks.com"]
11
11
  spec.summary = %q{Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH port fowarding.}
12
- spec.description = File.read('README.md')
12
+ spec.description = %q{Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH port fowarding.}
13
13
  spec.homepage = ""
14
14
  spec.license = "Apache2"
15
15
 
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
@@ -52,39 +52,8 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '11.8'
55
- description: "# Knife-Plugin Zero\n\nRun chef-client at remote node with chef-zero(local-mode)
56
- via HTTP over SSH port fowarding.\n\n- It doesn't have to transport cookbooks via
57
- scp,rsync or something.\n- It can collect node object into local chef-repo.\n- It
58
- supports all functioanly of chef(C/S).\n- You have only to manage one chef-repo.\n\n##
59
- Requirements\n\n- Must support AllowTcpForward \n\n## Installation\n\n> This gem
60
- has not been released yet.\n\nAdd this line to your application's Gemfile:\n\n gem
61
- 'knife-zero'\n\nAnd then execute:\n\n $ bundle\n\nOr install it yourself as:\n\n
62
- \ $ gem install knife-zero\n\n## Usage\n\n```\n** ZERO COMMANDS **\nknife zero
63
- bootstrap FQDN (options)\n```\n\n### Bootstrap\n\nInstall Chef to remote node and
64
- run chef-client under chef-zero via tcp-forward.\n\nSupported options are mostly
65
- the same as `knife bootstrap`.\n\n\n#### Example\n\n```\n$ bundle exec knife zero
66
- bootstrap host.example.com -r hogehoge::default --no-host-key-verify\nConnecting
67
- to host.example.com\nhost.example.com Installing Chef Client...\n-- snip --\nhost.example.com
68
- Thank you for installing Chef!\n\nhost.example.com Starting first Chef Client run...\nhost.example.com
69
- Starting Chef Client, version 11.14.6\nhost.example.com Creating a new client identity
70
- for host.example.com using the validator key.\n\n## Resolv and sync cookbook via
71
- http over ssh tcp-forward by run-list.\nhost.example.com resolving cookbooks for
72
- run list: [\"hogehoge::default\"]\nhost.example.com Synchronizing Cookbooks:\nhost.example.com
73
- \ - hogehoge\nhost.example.com Compiling Cookbooks...\nhost.example.com Converging
74
- 0 resources\nhost.example.com \nhost.example.com Running handlers:\nhost.example.com
75
- Running handlers complete\nhost.example.com Chef Client finished, 0/0 resources
76
- updated in 4.895561879 seconds\n\n\n## Creates node object into local.\n $ ls nodes/host.example.com.json
77
- \nnodes/host.example.com.json\nhost.example.com\n\n## Search by knife with --local--mode
78
- option.\n$ bundle exec knife search node --local-mode\n1 items found\n\nNode Name:
79
- \ host.example.com\nEnvironment: _default\nFQDN: \nIP: xxx.xxx.xxx.xxx\nRun
80
- List: recipe[hogehoge::default]\nRoles: \nRecipes: hogehoge::default\nPlatform:
81
- \ ubuntu 12.04\nTags: \n```\n\n### SSH\n\nSearch nodes from local chef-repo
82
- directory, and run command at remote node.\n\nSupported options are mostly the same
83
- as `knife ssh`.\n\n> Pending\n\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/knife-zero/fork
84
- )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your
85
- changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push
86
- origin my-new-feature`)\n5. Create a new Pull Request\n\n## License\n\nLicensed
87
- under the Apache License, Version 2.0.\n\n"
55
+ description: Run chef-client at remote node with chef-zero(local-mode) via HTTP over
56
+ SSH port fowarding.
88
57
  email:
89
58
  - sawanoboriyu@higanworks.com
90
59
  executables: []