gauth_credential { 'mycred': provider => serviceaccount, path => '/home/nelsona/my_account.json', scopes => ['https://www.googleapis.com/auth/cloud-platform'], } gcontainer_cluster { 'myapp-netes': ensure => present, initial_node_count => 2, node_config => { machine_type => 'n1-standard-4', # we want a 4-core machine for our cluster disk_size_gb => 500, # ... and a lot of disk space }, zone => 'us-central1-f', project => 'google.com:graphite-playground', credential => 'mycred', }
$ puppet apply <<EOF package { [ 'googleauth', 'google-api-client', ]: ensure =< present, provider =< gem, } EOF
puppet module install google/cloud
puppet module install google/gcompute # Google Compute Engine puppet module install google/gcontainer # Google Container Engine puppet module install google/gdns # Google Cloud DNS puppet module install google/gsql # Google Cloud SQL puppet module install google/gstorage # Google Cloud Storage
puppet module list
$ puppet module list /home/nelsona/.puppetlabs/etc/code/modules ├── google-cloud (v0.1.0) ├── google-gauth (v0.1.0) ├── google-gcompute (v0.1.0) ├── google-gcontainer (v0.1.0) ├── google-gdns (v0.1.0) ├── google-gsql (v0.1.0) └── google-gstorage (v0.1.0) /opt/puppetlabs/puppet/modules (no modules installed)
'mycred'
credential
gauth_credential { 'mycred': provider => serviceaccount, path => '/home/nelsona/my_account.json', scopes => ['https://www.googleapis.com/auth/cloud-platform'], }
gcontainer_cluster { 'myapp-netes': ensure => present, initial_node_count => 2, node_config => { machine_type => 'n1-standard-4', # we want a 4-core machine for our cluster disk_size_gb => 500, # ... and a lot of disk space }, project => 'google.com:graphite-playground', credential => 'mycred', }
puppet apply <your-file.pp>
puppet apply