# Compute Engine.pp gce_instance { 'ryan-compute': ensure => present, machine_type => 'n1-standard-1', zone => 'us-central1-a', network => 'default', image => 'projects/centos-cloud/global/images/centos-6-v20131120', } ryan:gce ryan$ puppet apply Compute Engine.pp Notice: /Stage[main]//gce_instance[ryan-compute]/ensure: created
gce_instance { ['web1', 'web2']: ensure => present, description => 'web server', machine_type => 'n1-standard-1', zone => 'us-central1-a', network => 'default', image => 'projects/centos-cloud/global/images/centos-6-v20131120', tags => ['web'], modules => ['puppetlabs-apache', 'puppetlabs-stdlib', 'puppetlabs-concat', 'puppetlabs-firewall'], manifest => 'include apache firewall { "100 allow http access on host": port => 80, proto => tcp, action => accept, }', } gce_firewall { 'allow-http': ensure => present, network => 'default', description => 'allows incoming HTTP connections', allowed => 'tcp:80', } gce_httphealthcheck { 'basic-http': ensure => present, require => gce_instance['web1', 'web2'], description => 'basic http health check', } gce_targetpool { 'web-pool': ensure => present, require => gce_httphealthcheck['basic-http'], health_checks => 'basic-http', instances => 'us-central1-a/web1,us-central1-b/web2', region => 'us-central1', } gce_forwardingrule { 'web-lb': ensure => present, description => 'Forward HTTP to web instances', port_range => '80', region => 'us-central1', target => 'web-pool', require => gce_targetpool['web-pool'], }
gce_instance { 'puppet-enterprise-master': ensure => present, description => 'An evaluation Puppet Enterprise Master and Console', machine_type => 'n1-standard-1', zone => 'us-central1-a', network => 'default', image => 'projects/centos-cloud/global/images/centos-6-v20131120', tags => ['puppet', 'master'], startupscript => 'puppet-enterprise.sh', metadata => { 'pe_role' => 'master', 'pe_version' => '3.2.0', 'pe_consoleadmin' => 'admin@example.com', 'pe_consolepwd' => 'puppetize', }, block_for_startup_script => true, } gce_instance { 'agent1': ensure => present, zone => 'us-central1-a', machine_type => 'f1-micro', network => 'default', image => 'projects/centos-cloud/global/images/centos-6-v20131120', startupscript => 'puppet-enterprise.sh', metadata => { 'pe_role' => 'agent', 'pe_master' => 'puppet-enterprise-master', 'pe_version' => '3.2.0', }, tags => ['puppet', 'agent'], require => gce_instance["puppet-enterprise-master"], }
Demonstrate your proficiency to design, build and manage solutions on Google Cloud Platform.