-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathtask
More file actions
executable file
·65 lines (60 loc) · 2.2 KB
/
task
File metadata and controls
executable file
·65 lines (60 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
set -euo pipefail
# shellcheck disable=SC1091
source cf-deployment-concourse-tasks/shared-functions
setup_bosh_env_vars
set +x
pushd bbl-state/"${BBL_STATE_DIR}" > /dev/null
echo "Initializing Terraform..."
pushd "terraform"
terraform init
popd
BOSH_GW_PRIVATE_KEY="$(bbl ssh-key)"
BOSH_GW_HOST=$(bbl jumpbox-address)
popd > /dev/null
echo '{}' | jq \
--arg cf_deployment_name "${DEPLOYMENT_NAME}" \
--arg cf_api_url "https://api.${SYSTEM_DOMAIN}" \
--arg cf_admin_password "$(get_password_from_credhub cf_admin_password)" \
--arg bosh_environment "${BOSH_ENVIRONMENT}" \
--arg bosh_gw_host "${BOSH_GW_HOST}" \
--arg bosh_gw_private_key "${BOSH_GW_PRIVATE_KEY}" \
--arg bosh_ca_cert "${BOSH_CA_CERT}" \
--arg bosh_client "${BOSH_CLIENT}" \
--arg bosh_client_secret "${BOSH_CLIENT_SECRET}" \
--arg ssh_destination_cidr "${SSH_DESTINATION_CIDR}" \
--arg nfs_broker_url "http://nfs-broker.${SYSTEM_DOMAIN}" \
--arg smb_broker_url "http://smbbroker.${SYSTEM_DOMAIN}" \
--arg credhub_client_secret "$(get_password_from_credhub credhub_admin_client_secret)" \
'{
"cf_deployment_name": $cf_deployment_name,
"cf_api_url": $cf_api_url,
"cf_admin_username": "admin",
"cf_admin_password": $cf_admin_password,
"bosh_environment": $bosh_environment,
"bosh_client": $bosh_client,
"bosh_client_secret": $bosh_client_secret,
"bosh_ca_cert": $bosh_ca_cert,
"ssh_proxy_user": "jumpbox",
"ssh_proxy_host": $bosh_gw_host,
"ssh_proxy_cidr": $ssh_destination_cidr,
"ssh_proxy_private_key": $bosh_gw_private_key,
"nfs_service_name": "nfs",
"nfs_plan_name": "Existing",
"nfs_broker_url": $nfs_broker_url,
"smb_service_name": "smb",
"smb_plan_name": "Existing",
"smb_broker_url": $smb_broker_url,
"timeout_in_minutes": 30,
"delete_and_redeploy_cf": false,
"include_cf-app": true,
"include_cf-networking": true,
"include_cf-uaa": true,
"include_cf-credhub": true,
"include_cf-routing": true,
"include_app-uptime": true,
"include_cf-nfsbroker": true,
"include_cf-smbbroker": true,
"credhub_client_name": "credhub_admin_client",
"credhub_client_secret": $credhub_client_secret
}' > drats-config/drats_integration_config.json