Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Commit

Permalink
Modify install-pcf/gcp to support PCF 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Hicks committed Jun 27, 2017
1 parent 6f7e887 commit 2d396a6
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 9 deletions.
4 changes: 4 additions & 0 deletions install-pcf/gcp/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ jobs:
DB_NETWORKPOLICYSERVERDB_PASSWORD: {{db_networkpolicyserverdb_password}}
DB_NFSVOLUMEDB_USERNAME: {{db_nfsvolumedb_username}}
DB_NFSVOLUMEDB_PASSWORD: {{db_nfsvolumedb_password}}
DB_LOCKET_USERNAME: {{db_locket_username}}
DB_LOCKET_PASSWORD: {{db_locket_password}}
DB_SILK_USERNAME: {{db_silk_username}}
DB_SILK_PASSWORD: {{db_silk_password}}

- name: configure-director
serial_groups: [opsman]
Expand Down
4 changes: 4 additions & 0 deletions install-pcf/gcp/tasks/create-infrastructure/task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ terraform plan \
-var "db_networkpolicyserverdb_password=${DB_NETWORKPOLICYSERVERDB_PASSWORD}" \
-var "db_nfsvolumedb_username=${DB_NFSVOLUMEDB_USERNAME}" \
-var "db_nfsvolumedb_password=${DB_NFSVOLUMEDB_PASSWORD}" \
-var "db_locket_username=${DB_LOCKET_USERNAME}" \
-var "db_locket_password=${DB_LOCKET_PASSWORD}" \
-var "db_silk_username=${DB_SILK_USERNAME}" \
-var "db_silk_password=${DB_SILK_PASSWORD}" \
-out terraform.tfplan \
-state terraform-state/terraform.tfstate \
pcf-pipelines/install-pcf/gcp/terraform/$gcp_pcf_terraform_template
Expand Down
4 changes: 4 additions & 0 deletions install-pcf/gcp/tasks/create-infrastructure/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ params:
DB_NETWORKPOLICYSERVERDB_PASSWORD:
DB_NFSVOLUMEDB_USERNAME:
DB_NFSVOLUMEDB_PASSWORD:
DB_LOCKET_USERNAME:
DB_LOCKET_PASSWORD:
DB_SILK_USERNAME:
DB_SILK_PASSWORD:

run:
path: pcf-pipelines/install-pcf/gcp/tasks/create-infrastructure/task.sh
4 changes: 4 additions & 0 deletions install-pcf/gcp/tasks/wipe-env/task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,9 @@ terraform destroy -force \
-var "db_networkpolicyserverdb_password=dontcare" \
-var "db_nfsvolumedb_username=dontcare" \
-var "db_nfsvolumedb_password=dontcare" \
-var "db_locket_username=dontcare" \
-var "db_locket_password=dontcare" \
-var "db_silk_username=dontcare" \
-var "db_silk_password=dontcare" \
-state-out $root/wipe-output/terraform.tfstate \
pcf-pipelines/install-pcf/gcp/terraform
30 changes: 29 additions & 1 deletion install-pcf/gcp/terraform/sql.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,24 @@ resource "google_sql_database" "networkpolicyserver" {
instance = "${google_sql_database_instance.master.name}"
}

resource "google_sql_database" "locket" {
name = "locket"
depends_on = ["google_sql_database.networkpolicyserver"]
instance = "${google_sql_database_instance.master.name}"
}

resource "google_sql_database" "silk" {
name = "silk"
depends_on = ["google_sql_database.locket"]
instance = "${google_sql_database_instance.master.name}"
}

resource "google_sql_user" "diego" {
name = "${var.db_diego_username}"
password = "${var.db_diego_password}"
instance = "${google_sql_database_instance.master.name}"
host = "%"
depends_on = ["google_sql_database.networkpolicyserver"]
depends_on = ["google_sql_database.silk"]
}

resource "google_sql_user" "notifications" {
Expand Down Expand Up @@ -179,3 +191,19 @@ resource "google_sql_user" "nfs_volume" {
host = "%"
depends_on = ["google_sql_user.network_policy_server"]
}

resource "google_sql_user" "locket" {
name = "${var.db_locket_username}"
password = "${var.db_locket_password}"
instance = "${google_sql_database_instance.master.name}"
host = "%"
depends_on = ["google_sql_user.nfs_volume"]
}

resource "google_sql_user" "silk" {
name = "${var.db_silk_username}"
password = "${var.db_silk_password}"
instance = "${google_sql_database_instance.master.name}"
host = "%"
depends_on = ["google_sql_user.locket"]
}
4 changes: 4 additions & 0 deletions install-pcf/gcp/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ variable "db_networkpolicyserverdb_username" {}
variable "db_networkpolicyserverdb_password" {}
variable "db_nfsvolumedb_username" {}
variable "db_nfsvolumedb_password" {}
variable "db_locket_username" {}
variable "db_locket_password" {}
variable "db_silk_username" {}
variable "db_silk_password" {}
43 changes: 35 additions & 8 deletions tasks/install-ert/json_templates/gcp/default/ert-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,6 @@
"secret": "{{db_routing_password}}"
}
},
".properties.system_database.external.uaa_username": {
"value": "{{db_uaa_username}}"
},
".properties.system_database.external.uaa_password": {
"value": {
"secret": "{{db_uaa_password}}"
}
},
".properties.system_database.external.ccdb_username": {
"value": "{{db_ccdb_username}}"
},
Expand Down Expand Up @@ -132,6 +124,39 @@
"secret": "{{db_nfsvolumedb_password}}"
}
},
".properties.system_database.external.locket_username": {
"value": "{{db_locket_username}}"
},
".properties.system_database.external.locket_password": {
"value": {
"secret": "{{db_locket_password}}"
}
},
".properties.system_database.external.silk_username": {
"value": "{{db_silk_username}}"
},
".properties.system_database.external.silk_password": {
"value": {
"secret": "{{db_silk_password}}"
}
},
".properties.uaa_database": {
"value": "external"
},
".properties.uaa_database.external.host": {
"value": "{{db_host}}"
},
".properties.uaa_database.external.port": {
"value": "3306"
},
".properties.uaa_database.external.uaa_username": {
"value": "{{db_uaa_username}}"
},
".properties.uaa_database.external.uaa_password": {
"value": {
"secret": "{{db_uaa_password}}"
}
},
".cloud_controller.system_domain": {
"value": "sys.{{pcf_ert_domain}}"
},
Expand Down Expand Up @@ -208,6 +233,8 @@
"diego_cell": {"instance_type": {"id": "automatic"},"instances": 3,"elb_names": [],"internet_connected": false},
"doppler": {"instance_type": {"id": "automatic"},"instances": 3,"elb_names": [],"internet_connected": false},
"loggregator_trafficcontroller": {"instance_type": {"id": "automatic"},"instances": 3,"elb_names": [],"internet_connected": false},
"syslog_adapter": {"instance_type": {"id": "automatic"},"instances": 3,"elb_names": [],"internet_connected": false},
"syslog_scheduler": {"instance_type": {"id": "automatic"},"instances": 1,"elb_names": [],"internet_connected": false},
"tcp_router": {"instance_type": {"id": "automatic"},"instances": 0,"elb_names": [],"internet_connected": false,"persistent_disk":{"size_mb":"automatic"}},
"backup-prepare": {"instance_type": {"id": "automatic"},"instances": 0,"elb_names": [],"internet_connected": false,"persistent_disk":{"size_mb":"automatic"}},
"push-apps-manager": {"instance_type": {"id": "automatic"},"instances": 1,"elb_names": [],"internet_connected": false},
Expand Down

0 comments on commit 2d396a6

Please sign in to comment.