github.com/cloudfoundry-incubator/stembuild@v0.0.0-20211223202937-5b61d62226c6/integration/construct/README.md (about) 1 # Construct Integration Test 2 3 Construct Integration tests will use an unprepared Windows VM to test transferring artifacts to the VM. 4 5 6 You can either run these tests using an existing Windows VM or having the test create a VM in vCenter to test on. 7 8 In either case, the following environment variables must be set to access the VM: 9 * `VM_USERNAME` 10 * `VM_PASSWORD` 11 12 ### Using an existing VM 13 To use an existing Windows VM for the integration tests, WinRM must be enabled on the machine with access provided to the given username and password. The `EXISTING_VM_IP` environment variable is used as an implicit feature flag that a VM exists as well as providing the IP of that VM. 14 15 ### Creating a VM in vCenter 16 To create a VM in vCenter to use for testing the following environment variables must be set: 17 * `VM_NAME_PREFIX` 18 * `VM_FOLDER` 19 * `NETWORK_GATEWAY` 20 * `SUBNET_MASK` 21 * Optionally, you can specify `SKIP_CLEANUP=true` to not remove the created VM after tests have been run 22 23 Furthermore, GOVC environment variables must be set to access your VM in vCenter. Please see the following [link] to determine which variables to set and how to format them (https://github.com/vmware/govmomi/tree/master/govc#usage) 24 25 At minimum the following will need to be provided: 26 * `GOVC_URL` 27 * `GOVC_DATASTORE` 28 * `GOVC_NETWORK` 29 * `GOVC_RESOURCE_POOL` 30 #### Determining source for your VM 31 The following environment variables must be set depending on where your OVA is stored: 32 ##### Create a VM using a local OVA file 33 * In this case, `OVA_FILE` must be set 34 ##### Create a VM using an OVA on S3 35 * `OVA_SOURCE_S3_REGION` 36 * `OVA_SOURCE_S3_BUCKET` 37 * `OVA_SOURCE_S3_FILENAME` 38 * `AWS_ACCESS_KEY_ID` 39 * `AWS_SECRET_ACCESS_KEY` 40 41 #### Choosing an IP for your VM 42 ##### Create a VM with given IP 43 * In this case, `USER_PROVIDED_IP` must be set 44 ##### Create a VM IP chosen from a lock resource pool 45 In order to create a VM in vCenter with an IP from a lock resource pool, the following environment variables will need to be set: 46 * `LOCK_PRIVATE_KEY` 47 * `IP_POOL_GIT_URI` 48 * `IP_POOL_NAME` 49 50 51 52 53 54 55