pupistry 0.0.2 → 0.0.3

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: 732d292847fab362692d6118e33d286e1c50f4bb
4
- data.tar.gz: 5992f7c0698262d35b2a357b978821c23da7cbb8
3
+ metadata.gz: 040c9a706127947909dc602972b7e9cbd28ebe42
4
+ data.tar.gz: 864c4368a6ae0d3103b4ca50d9cc987e135b077c
5
5
  SHA512:
6
- metadata.gz: 2591da8ee00435744fa2cb97357f88cba20e7bd3f1ab7b7148a158f4dcaea8d60f806dcb93a320995c7738b7a41684d225688cc60ab4cd00a5a1c72fdb709c3b
7
- data.tar.gz: bda64095f11c6ce61ceb6fffa42238f9d029ab07d829805a91d207f8efb86cdda39496252dd2c869f02b92a8f48c68cd9a907294ede2fbfc57906d8d2ebbcf67
6
+ metadata.gz: 82f9c81beee09687e742c95fd49107b1e13edb75752f24546770a72d05f944b35f4ee3513c27b6e91f9f0bd017169ce874a52cb41866c6fe6f3dbf0bb0b10135
7
+ data.tar.gz: af932b06e1cef3f9f64dec3dc074e5276eb8aab4897854d8013b693c8e92aa463452b384f6041d06821e8c6fa3ba20dcb0cafcb7812fcb84124c4f46139d598b
data/README.md CHANGED
@@ -1,7 +1,14 @@
1
1
  # WORK IN PROGRESS
2
2
 
3
3
  This project is currently in progress and not all of this documentation reflects
4
- where it is really at. Use this at your own peril/madness.
4
+ where it is really at. Use this at your own peril/madness. In theory, everything
5
+ currently works, but there will be bugs and areas of the documentation that may
6
+ not make sense.
7
+
8
+ I've marked anything I can that is in progress with TODO and workarounds/notes
9
+ where I can. It's all under development ATM so it's changing really fast, but
10
+ I'll happily take pull requests at even this early stage.
11
+
5
12
 
6
13
  # pupistry
7
14
 
@@ -193,6 +200,7 @@ needing to create explicit IAM credentials for the agents/servers.
193
200
 
194
201
  The following is the expected minmum structure of the Puppetcode repository to
195
202
  enable it to work with Pupistry:
203
+
196
204
  /Puppetfile
197
205
  /hiera.yaml
198
206
  /manifests/site.pp
@@ -201,6 +209,7 @@ Puppetfile is standard r10k and site.pp is standard Puppet. The Hiera config
201
209
  is generally normal, but you do need to define a datadir to tell Puppet to look
202
210
  where the puppetcode gets unpacked to. Generally the following sample Hiera
203
211
  will do the trick:
212
+
204
213
  ---
205
214
  :backends: yaml
206
215
  :yaml:
@@ -211,8 +220,9 @@ will do the trick:
211
220
  - common
212
221
 
213
222
  Then in Pupistry, the following configuration should be used for the agent (or
214
- subsitute /etc/puppet/ for wherever your platform has %{::settings::confdir}
223
+ subsitute `/etc/puppet/` for wherever your platform has `%{::settings::confdir}`
215
224
  set to).
225
+
216
226
  agent:
217
227
  puppetcode: /etc/puppet/environments
218
228
 
@@ -222,16 +232,17 @@ and override on a per-execution basis.
222
232
 
223
233
  You'll notice pretty quickly if something is broken when doing `puppet apply`
224
234
 
235
+ Confused? No worried, check out the sample repo that shows a very simple setup.
236
+ You can copy this and start your own Puppet adventure, just add in your modules
237
+ to Puppetfile and add them to the relevent machines in manifests/site.pp.
238
+
239
+ https://github.com/jethrocarr/pupistry-samplepuppet
225
240
 
226
241
 
227
242
  TODO: Longer term intend to add support for various popular structure, but
228
243
  for now it is what it is. It's not hard, check out bin/puppistry and send
229
244
  pull requests.
230
245
 
231
- TODO: Provide an example repo to build from.... or maybe have smarter
232
- assistance in the app to check for files and find them or generate defaults
233
- if missing (eg hiera)
234
-
235
246
 
236
247
  ### Helper Module
237
248
 
@@ -269,7 +280,34 @@ it - enjoy!
269
280
  TODO: Currently being worked on, for now the following is a rough example of
270
281
  what you can do to bootstrap a RHEL/CentOS7 box:
271
282
 
283
+ rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
284
+ rpm -ivh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
272
285
 
286
+ yum update --assumeyes
287
+ yum install --assumeyes puppet ruby-devel rubygems
288
+ yum install --assumeyes gcc zlib-devel libxml2-devel patch
289
+
290
+ gem install pupistry
291
+ mkdir /etc/pupistry
292
+ cat > /etc/pupistry/settings.yaml << "EOF"
293
+ general:
294
+ app_cache: ~/.pupistry/cache
295
+ s3_bucket: example
296
+ s3_prefix:
297
+ gpg_disable: true
298
+ gpg_signing_key: XXXXX
299
+ agent:
300
+ puppetcode: /etc/puppet/environments
301
+ access_key_id:
302
+ secret_access_key:
303
+ region: ap-southeast-2
304
+ proxy_uri:
305
+ EOF
306
+ pupistry apply --verbose
307
+
308
+ It will setup the Puppet repo for RHEL 7, install updates (remember that security
309
+ thing?) and then install the gem (and deps to build it). Then we generate the
310
+ minimal configuration file needed, and kick off a Puppet run!
273
311
 
274
312
 
275
313
 
@@ -393,5 +431,11 @@ Beer welcome.
393
431
 
394
432
  # License
395
433
 
396
- Pupistry is licensed under the Apache License, Version 2.0.
434
+ Pupistry is licensed under the Apache License, Version 2.0 (the "License").
435
+ See the `LICENSE.txt` or http://www.apache.org/licenses/LICENSE-2.0
397
436
 
437
+ Unless required by applicable law or agreed to in writing, software
438
+ distributed under the License is distributed on an "AS IS" BASIS,
439
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
440
+ See the License for the specific language governing permissions and
441
+ limitations under the License.
@@ -59,7 +59,7 @@ module Pupistry
59
59
  # Execute R10k with the provided configuration
60
60
  $logger.debug "Executing r10k"
61
61
 
62
- if system "r10k deploy environment -c #{$config["general"]["app_cache"]}/r10kconfig.yaml -pv"
62
+ if system "r10k deploy environment -c #{$config["general"]["app_cache"]}/r10kconfig.yaml -pv debug"
63
63
  $logger.info "r10k run completed"
64
64
  else
65
65
  $logger.error "r10k run failed, unable to generate artifact"
@@ -217,7 +217,7 @@ module Pupistry
217
217
  # Only worth doing this step if they've explicitly set their AWS IAM credentials
218
218
  # for the agent, which should be everyone except for IAM role users.
219
219
 
220
- if $config["agent"]["aws_access_id"]
220
+ if $config["agent"]["access_key_id"]
221
221
  fetch_artifact
222
222
  else
223
223
  $logger.warn "The agent's AWS credentials are unset on this machine, unable to do download test to check permissions for you."
@@ -54,7 +54,7 @@ build:
54
54
 
55
55
  # Define the Git repo for the Puppet manifest & r10k data
56
56
  # (ie repo where your Puppetfile & site.pp is)
57
- puppetcode: git@bitbucket.org:user/example.git
57
+ puppetcode: git@github.com:jethrocarr/pupistry-samplepuppet.git
58
58
 
59
59
 
60
60
  # The AWS credentials with write permission to the S3 bucket for uploading
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pupistry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jethro Carr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-04 00:00:00.000000000 Z
11
+ date: 2015-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-v1