Skip to content

Commit

Permalink
Puppet docs should accurately explain how to install puppet modules. (#…
Browse files Browse the repository at this point in the history
…523)

Merged PR #523.
  • Loading branch information
nat-henderson authored and modular-magician committed Oct 3, 2018
1 parent 8fe53bd commit b35d8fc
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 39 deletions.
2 changes: 1 addition & 1 deletion build/puppet/_bundle
Submodule _bundle updated 1 files
+15 −0 README.md
2 changes: 1 addition & 1 deletion build/puppet/auth
Submodule auth updated 1 files
+4 −27 README.md
2 changes: 1 addition & 1 deletion build/puppet/bigquery
Submodule bigquery updated 1 files
+15 −0 README.md
2 changes: 1 addition & 1 deletion build/puppet/compute
Submodule compute updated 1 files
+15 −0 README.md
2 changes: 1 addition & 1 deletion build/puppet/container
Submodule container updated 1 files
+15 −0 README.md
2 changes: 1 addition & 1 deletion build/puppet/dns
Submodule dns updated 1 files
+15 −0 README.md
2 changes: 1 addition & 1 deletion build/puppet/pubsub
Submodule pubsub updated 1 files
+15 −0 README.md
2 changes: 1 addition & 1 deletion build/puppet/resourcemanager
Submodule resourcemanager updated 1 files
+15 −0 README.md
2 changes: 1 addition & 1 deletion build/puppet/spanner
Submodule spanner updated 1 files
+15 −0 README.md
2 changes: 1 addition & 1 deletion build/puppet/sql
Submodule sql updated 1 files
+15 −0 README.md
2 changes: 1 addition & 1 deletion build/puppet/storage
Submodule storage updated 1 files
+15 −0 README.md
2 changes: 1 addition & 1 deletion build/terraform
15 changes: 15 additions & 0 deletions products/_bundle/templates/puppet/README.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@ Puppet module installer:

puppet module install google/cloud

Since these modules depend on the `googleauth` and `google-api-client` gems,
you will also need to install those, with

/opt/puppetlabs/puppet/bin/gem install googleauth google-api-client

If you prefer, you could also add the following to your puppet manifest:

package { [
'googleauth',
'google-api-client',
]:
ensure => present,
provider => puppet_gem,
}

### Upgrading pre-release versions

If you already have pre-release modules installed (pre-release = modules with
Expand Down
31 changes: 4 additions & 27 deletions products/auth/puppet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ automatically install this module, as it will be listed in their dependencies._

### Required gem (libraries)

The authentication module depends on a gem released by Google. Puppet does not
install gems automatically as it is to change the underlying system without
administrator consent. To install it run:
The authentication module depends on gems released by Google. Puppet does not
install gems automatically as part of installing modules. To install, run:

gem install googleauth google-api-client
/opt/puppetlabs/puppet/bin/gem install googleauth google-api-client

As everything related to system configuration, you can install the gem using
Puppet itself ;-)...
Expand All @@ -38,32 +37,10 @@ package { [
'google-api-client',
]:
ensure => present,
provider => gem,
provider => puppet_gem,
}
```

#### Installing gems for Puppet Agent/Master only

In case you wish to use Google gems exclusively on Puppet you can install them
into the Puppet Ruby sandbox. That will have less requirement burden, as it will
not require to have `rubygems` and other Ruby packages to be installed on the
host.

puppet resource package googleauth ensure=present provider=puppet_gem
puppet resource package google-api-client ensure=present provider=puppet_gem

Once executed it will output the confirmation and version installed:

Notice: /Package[googleauth]/ensure: created
package { 'googleauth':
ensure => ['0.6.2'],
}

Notice: /Package[google-api-client]/ensure: created
package { 'google-api-client':
ensure => ['0.19.8'],
}

## Usage

```puppet
Expand Down
15 changes: 15 additions & 0 deletions templates/puppet/README.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,21 @@ once by installing our "bundle" [`google-cloud`][bundle-forge] module:

puppet module install google-cloud

Since this module depends on the `googleauth` and `google-api-client` gems,
you will also need to install those, with

/opt/puppetlabs/puppet/bin/gem install googleauth google-api-client

If you prefer, you could also add the following to your puppet manifest:

package { [
'googleauth',
'google-api-client',
]:
ensure => present,
provider => puppet_gem,
}

## Usage

### Credentials
Expand Down

0 comments on commit b35d8fc

Please sign in to comment.