GoogleCloudPlatform/chef-google-container

Name: chef-google-container

Owner: Google Cloud Platform

Description: null

Created: 2017-06-22 19:51:15.0

Updated: 2018-05-16 17:47:43.0

Pushed: 2018-05-16 17:47:39.0

Homepage: null

Size: 78

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Google Container Engine Chef Cookbook

This cookbook provides the built-in types and services for Chef to manage Google Container Engine resources, as native Chef types.

Requirements
Platforms
Supported Operating Systems

This cookbook was tested on the following operating systems:

Example
h_credential 'mycred' do
tion :serviceaccount
th ENV['CRED_PATH'] # e.g. '/path/to/my_account.json'
opes [
'https://www.googleapis.com/auth/cloud-platform'



tainer_cluster 'test-cluster' do
tion :create
ne 'us-central1-a'
oject 'google.com:graphite-playground'
edential 'mycred'


tainer_node_pool 'web-servers' do
tion :create
itial_node_count 4
uster 'test-cluster'
ne 'us-central1-a'
oject 'google.com:graphite-playground'
edential 'mycred'

Credentials

All Google Cloud Platform cookbooks use an unified authentication mechanism, provided by the google-gauth cookbook. Don't worry, it is automatically installed when you install this module.

Example
h_credential 'mycred' do
tion :serviceaccount
th ENV['CRED_PATH'] # e.g. '/path/to/my_account.json'
opes [
'https://www.googleapis.com/auth/cloud-platform'


For complete details of the authentication cookbook, visit the google-gauth cookbook documentation.

Resources
gcontainer_cluster

A Google Container Engine cluster.

Example
tainer_cluster "mycluster-#{ENV['cluster_id']}" do
tion :create
itial_node_count 2
ster_auth(
username: 'cluster_admin',
password: 'my-secret-password'

de_config(
machine_type: 'n1-standard-4', # we want 4-cores for our cluster
disk_size_gb: 500              # ... and a lot of disk space

ne 'us-central1-a'
oject 'google.com:graphite-playground'
edential 'mycred'

Reference
tainer_cluster 'id-for-resource' do
dons_config           {
horizontal_pod_autoscaling {
  disabled boolean,
},
http_load_balancing        {
  disabled boolean,
},

uster_ipv4_cidr       string
eate_time             time
rrent_master_version  string
rrent_node_count      integer
rrent_node_version    string
scription             string
dpoint                string
pire_time             time
itial_cluster_version string
itial_node_count      integer
cation                [
string,
...

gging_service         'logging.googleapis.com' or 'none'
ster_auth             {
client_certificate     string,
client_key             string,
cluster_ca_certificate string,
password               string,
username               string,

nitoring_service      'monitoring.googleapis.com' or 'none'
me                    string
twork                 string
de_config             {
disk_size_gb    integer,
image_type      string,
labels          namevalues,
local_ssd_count integer,
machine_type    string,
metadata        namevalues,
oauth_scopes    [
  string,
  ...
],
preemptible     boolean,
service_account string,
tags            [
  string,
  ...
],

de_ipv4_cidr_size     integer
rvices_ipv4_cidr      string
bnetwork              string
ne                    string
oject                 string
edential              reference to gauth_credential

Actions Properties Label

Set the c_label property when attempting to set primary key of this object. The primary key will always be referred to by the initials of the resource followed by “_label”

gcontainer_node_pool

NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. VM's), with a common configuration and specification, under the control of the cluster master. They may have a set of Kubernetes labels applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload.

Example
p: Have environment variable 'cluster-id' set.
p: Insert a gcontainer cluster with name mycluster-${cluster_id}
tainer_node_pool 'web-servers' do
tion :create
itial_node_count 4
uster "mycluster-#{ENV['cluster_id']}"
ne 'us-central1-a'
oject 'google.com:graphite-playground'
edential 'mycred'

Reference
tainer_node_pool 'id-for-resource' do
toscaling        {
enabled        boolean,
max_node_count integer,
min_node_count integer,

uster            reference to gcontainer_cluster
nfig             {
disk_size_gb    integer,
image_type      string,
labels          namevalues,
local_ssd_count integer,
machine_type    string,
metadata        namevalues,
oauth_scopes    [
  string,
  ...
],
preemptible     boolean,
service_account string,
tags            [
  string,
  ...
],

itial_node_count integer
nagement         {
auto_repair     boolean,
auto_upgrade    boolean,
upgrade_options {
  auto_upgrade_start_time time,
  description             string,
},

me               string
rsion            string
ne               string
oject            string
edential         reference to gauth_credential

Actions Properties Label

Set the np_label property when attempting to set primary key of this object. The primary key will always be referred to by the initials of the resource followed by “_label”

gcontainer_kube_config

Generates a compatible Kuberenetes '.kube/config' file

Example
tainer_kubeconfig '/home/alexstephen/.kube/config' do
tion :create
ntext "gke-mycluster-#{ENV['cluster_id']}"
uster "mycluster-#{ENV['cluster_id']}"
ne 'us-central1-a'
oject 'google.com:graphite-playground'
edential 'mycred'

Reference
tainer_kube_config 'id-for-resource' do
uster    reference to gcontainer_cluster
ntext    string
me       string
ne       string
oject    string
edential reference to gauth_credential

Actions Properties Label

Set the kc_label property when attempting to set primary key of this object. The primary key will always be referred to by the initials of the resource followed by “_label”


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.