-
Notifications
You must be signed in to change notification settings - Fork 365
How to Run and Deploy IATs
Here are our findings:
-
We started by following these steps: https://docs.cloudfoundry.org/running/deploying-service-mesh.html
-
When it came time to
bosh deploy
, we ended up using this command (adapted fromdeploy_only_new_capi
):
bosh -n deploy <(bosh manifest) \
-o ~/workspace/capi-ci/cf-deployment-operations/use-created-capi.yml \
-o ~/workspace/istio-release/deploy/cf-deployment-operations/add-istio.yml \
-v capi_release_dir="$HOME/workspace/capi-release" \
-v system_domain=$BOSH_LITE_DOMAIN
- The first time we tried that, it failed like this:
Task 156 | 21:41:20 | Updating instance database: database/779de088-9e39-420a-a1f4-90a7699afff9 (0) (canary) (00:00:56)
L Error: Action Failed get_task: Task 991094bd-d8fc-4163-485e-b59a157d322e result: 1 of 3 pre-start scripts failed. Failed Jobs: pxc-mysql. Successful Jobs: bpm, bosh-dns.
Task 156 | 21:42:16 | Error: Action Failed get_task: Task 991094bd-d8fc-4163-485e-b59a157d322e result: 1 of 3 pre-start scripts failed. Failed Jobs: pxc-mysql. Successful Jobs: bpm, bosh-dns.
Task 156 Started Fri Jun 28 21:31:14 UTC 2019
Task 156 Finished Fri Jun 28 21:42:16 UTC 2019
Task 156 Duration 00:11:02
Task 156 error
Updating deployment:
Expected task '156' to succeed but state is 'error'
Exit code 1
Error: Instance group 'istio-control' references an unknown vm type 'medium'
-
We changed istio-control vm-type from "medium" to "small" in the add-istio.yml ops file.
-
Then, we tried the same thing again after some time, and it succeeded!
-
Asked networking team for an environment with Istio already set up
-
Deployed new CAPI:
- Download bosh manifest:
bosh -d manifest > /tmp/cf-manifest.yml
- Update
/tmp/cf-manifest.yml
/releases/capi/version to be "latest" - In
capi-release
:bosh create-release --force --version=1.83.4+something1
- In
capi-release
:bosh upload-release
bosh -d cf deploy /tmp/cf-manifest.yml --no-redact
- Download bosh manifest:
-
Got CF admin password from credhub:
- Search for credential:
credhub g -n cf_admin_password
- With the credential name:
credhub g -n /bosh-tealtries/cf/cf_admin_password
- Search for credential:
-
Following README for IATs: https://github.com/cloudfoundry/istio-acceptance-tests
- Made a
config.json
file:
- Made a
cat << EOF > "${PWD}/config.json"
{
"cf_system_domain": "bosh-lite.com",
"cf_admin_user": "admin",
"cf_admin_password": <admin password>,
"cf_internal_apps_domain": "apps.internal",
"cf_internal_istio_domain": "istio.apps.internal",
"cf_istio_domain": "istio.<system-domain>",
"product_page_docker_tag": "cfrouting/examples-bookinfo-productpage-v1:latest",
"reviews_docker_tag": "cfrouting/examples-bookinfo-reviews-v3:latest",
"ratings_docker_tag": "istio/examples-bookinfo-ratings-v1:1.5.0",
"details_docker_tag": "istio/examples-bookinfo-details-v1:1.5.0",
"wildcard_ca": "<envoy_wildcard_ca.ca>"
}
EOF
-
Filled in
cf_admin_password
, plus domains found in bosh-manifest.yml -
Tried to run
CONFIG="$PWD/config.json" scripts/test
, but had to fix the following to make it work:- Downloaded
chromedriver
and made sure it was in ourPATH
: https://chromedriver.storage.googleapis.com/index.html?path=74.0.3729.6/ - In the IATs code, found the
internal/cf.go
file and changed thecf
binary name tocf6
. We had to do this because the tests use thecf push -d
flag, which is not implemented incf7
yet.
- Downloaded
func CfWithCustomReporter(cmdStarter Starter, reporter Reporter, args ...string) *gexec.Session {
request, err := cmdStarter.Start(reporter, "cf6", args...)
if err != nil {
panic(err)
}
return request
}
At this point, the IATs were able to run successfully.
We then tweaked weighted_routing_test
to use the new route destinations API endpoint:
func mapWeightedRoute(routeGuid, appGuid1, appGuid2 string) {
Expect(cf.Cf(
"curl",
fmt.Sprintf("/v3/routes/%s/destinations", routeGuid),
"-H", "Content-type: application/json",
"-X", "PATCH",
"-d", fmt.Sprintf(`{
"destinations": [{
"app": {
"guid": "%s"
},
"weight": 10
},
{
"app": {
"guid": "%s"
},
"weight": 90
}
]
}`, appGuid1, appGuid2),
).Wait(defaultTimeout)).To(Exit(0))
}
Then it worked!
-
Pipelines
-
Contributing
- Tips and Tricks
- Cloud Controller API v3 Style Guide
- Playbooks
- Development configuration
- Testing
-
Architectural Details
-
CC Resources
- Apps
- Audit Events
- Deployments
- Labels
- Services
- Sidecars
-
Dependencies
-
Troubleshooting
- Ruby Console Script to Find Fields that Cannot Be Decrypted
- Logging database queries in unit tests
- Inspecting blobstore cc resources and cc packages(webdav)
- How to Use USR1 Trap for Diagnostics
- How to Perf: Finding and Fixing Bottlenecks
- How to get access to mysql database
- How To Get a Ruby Heap Dumps & GC Stats from CC
- How to curl v4 internal endpoints with mtls
- How to access Bosh Director console and restore an outdated Cloud Config
- Analyzing Cloud Controller's NGINX logs using the toplogs script
-
k8s
-
Archive