Skip to content

Commit

Permalink
Merge pull request #2 from genesis-community/gcp
Browse files Browse the repository at this point in the history
gcp
  • Loading branch information
geofffranks authored Jun 22, 2017
2 parents 2f2f228 + 80219c5 commit 717f9b3
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 1 deletion.
1 change: 1 addition & 0 deletions hooks/subkit
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ for kit in $@; do
;;
google-cpi)
CPI=$kit
CPI_INIT=google-init
;;
openstack-cpi)
CPI=$kit
Expand Down
29 changes: 28 additions & 1 deletion kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,37 @@ params:
param: aws_subnet_id

- ask: What security groups should the BOSH VM receive?
description: A lit of AWS Security Groups that will be applied to the BOSH VM
description: A list of AWS Security Groups that will be applied to the BOSH VM
param: aws_security_groups
type: list

google-cpi:
- ask: What are your GCP credentials?
description: The json key to authenticate to GCP
vault: google:json_key
- ask: What is your GCP project ID?
description: The project ID of the GCP project your deployments will be deployed to
param: google_project

google-init:
- ask: What is your GCP network name?
description: The name of the GCP network that your BOSH VM will be deployed on
param: google_network_name
- ask: What is your GCP subnetwork name?
description: The name of the GCP subnetwork that your BOSH VM will be deployed on
param: google_subnetwork_name
- ask: What is the availabilty zone?
description: The availability zone your BOSH VM will be in
param: google_availability_zone
- ask: What tags should the BOSH VM receive?
description: A list of tags that will be applied to the BOSH VM
param: google_tags
type: list
- description: The GCP machine type that BOSH will use
param: google_machine_type
- description: The google disk type for persistent disks
param: google_disk_type

azure-cpi:
- ask: What is your Azure Client ID?
description: The Azure Client ID is used to authenticate BOSH to Azure's APIs
Expand Down
30 changes: 30 additions & 0 deletions subkits/google-cpi/google.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
instance_groups:
- name: bosh
jobs:
- name: google_cpi
release: bosh-google-cpi
- name: registry
release: bosh

releases:
- name: bosh-google-cpi
version: 25.9.0
url: https://bosh.io/d/github.com/cloudfoundry-incubator/bosh-google-cpi-release?v=25.9.0
sha1: 3fbda22fde33878b54dec77f4182f8044be72687

properties:
registry:
address: (( grab params.static_ip ))
host: (( grab params.static_ip ))
db: (( grab properties.postgres ))

username: (( grab meta.bosh.registry.user ))
password: (( grab meta.bosh.registry.pass ))
port: 25777

google:
project: (( grab params.google_project ))
json_key: (( vault meta.vault "/google:json_key" ))
director:
cpi_job: google_cpi
10 changes: 10 additions & 0 deletions subkits/google-cpi/params.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
params:
google_project: (( param "Enter the project name that your BOSH will be deployed into" ))

ntp: # use GCP ntp
- (( replace ))
- time.google.com
- time2.google.com
- time3.google.com
- time4.google.com
35 changes: 35 additions & 0 deletions subkits/google-init/init.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
resource_pools:
- name: (( grab params.bosh_vm_type ))
cloud_properties:
zone: (( grab params.google_availability_zone ))
machine_type: (( grab params.google_machine_type ))
root_disk_size_gb: (( calc "params.ephemeral_disk_size / 1024" ))
root_disk_type: (( grab params.google_disk_type ))
service_scopes:
- compute
- devstorage.full_control
stemcell: (( grab meta.latest_stemcells.bosh-google-kvm-ubuntu-trusty-go_agent ))

networks:
- name: (( grab params.bosh_network ))
subnets:
- (( inline ))
- cloud_properties:
network_name: (( grab params.google_network_name ))
subnetwork_name: (( grab params.google_subnetwork_name ))
tags: (( grab params.google_tags ))

disk_pools:
- name: (( grab params.bosh_disk_pool ))
cloud_properties:
type: (( grab params.google_disk_type ))


cloud_provider:
template:
name: google_cpi
release: bosh-google-cpi
properties:
google:
project: (( grab params.google_project ))
9 changes: 9 additions & 0 deletions subkits/google-init/params.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
params:
google_network_name: (( param "Enter the name of the network for your BOSH" ))
google_subnetwork_name: (( param "Enter the name of the subnetwork for your BOSH" ))
google_availability_zone: (( param "Enter the name the availability zone for your BOSH" ))
google_tags: (( param "Enter the tags to be attached to your BOSH" ))

google_machine_type: n1-standard-1
google_disk_type: pd-standard

0 comments on commit 717f9b3

Please sign in to comment.