This test will upload, install, stage, configure and uninstall a tile on a Pivotal Cloud Foundry foundation. If at any point a step fails, the test will stop.
Here is what you need to run the test:
Locates the .pivotal file that contains the integration to test, and note the absolute path to that file.
The test will configure the integration with the provided settings and run apply changes to make sure the integration configures and installs. It is up to the integration developer to create a configuration appropriate for their integration.
Tips for building a valid config file
A configuration file will look like this:
{
"product-properties": {
".properties.<property name>": {
"type": "<property type>",
"value": "<property value>"
},
...
}
}
If any pre-requisite resources need to be installed for the test to succeed (e.g. missing stemcells) they will be downloaded from PivNet and installed. A PivNet token is required for download.
Once the PivNet token as been acquired, set the environment variable PIVNET_TOKEN
with its value.
For example, if the Pivnet token is a62fd1q7b41a44e19ba05112a13754z2-r:
export PIVNET_TOKEN=a62fd1q7b41a44e19ba05112a13754z2-r
Finally, an instance of the Pivotal Platform is needed to run the test. You may configure your own, or a Pivotal Platform Engineering team member may provide access to one.
Three pieces of information are needed to identify and authenticate with the platform. The URL of the OpsManager instance, a user name and a password.
For example, if the URL is *https://pcf.hawthorne.cf-app.com*, user name is pivotalcf, and password is o10q4qqfjdc523uv, then set these environment variables:
export OM_USERNAME=pivotalcf
export OM_PASSWORD=o10q4qqfjdc523uv
export OM_TARGET=https://pcf.hawthorne.cf-app.com
It is very likely that the OpsManager instance uses a self signed SSL certificate. This will result in authentication failures during the test. To avoid these failures, OM_SKIP_SSL_VALIDATION
should be set to true to skip the SSL validation steps.
export OM_SKIP_SSL_VALIDATION=true
Run the test with the docker image:
docker run \
-e OM_USERNAME \
-e OM_PASSWORD \
-e OM_TARGET \
-e OM_SKIP_SSL_VALIDATION \
-e PIVNET_TOKEN \
-v /full/path/to/your/tile.pivotal:/input/tile.pivotal \
-v /full/path/to/your/config-file.json:/input/config.json \
cfplatformeng/install-uninstall-test-image
This will fetch the test image and begin the test execution. Depending on the complexity of the integration, this could take several minutes to a few hours.
The following environment variables are necessary to run the process:
OM_TARGET
- OpsManager URLOM_USERNAME
- OpsManager usernameOM_PASSWORD
- OpsManager passwordTILE_PATH
- Full path to integrationTILE_CONFIG_PATH
- Full path to configuration filePIVNET_TOKEN
- Authentication token for Pivotal Network (how to find). Used in case the test needs to download any missing stemcells.
The following environment variables may be used, but not required:
OM_SKIP_SSL_VALIDATION
- set totrue
if your OpsManager is using self-signed SSL certificates
The configuration file may be json or yaml.
Tips for building a valid config file
The configuration file should include the product-properties section:
YAML example:
product-properties:
".properties.apply_open_security_group":
value: false
type: boolean
".properties.allow_paid_service_plans":
value: false
type: boolean
".properties.org":
value: test-tile-org
type: string
".properties.space":
value: test-tile-space
type: string
JSON example:
{
"product-properties": {
".properties.space": {
"type": "string",
"value": "test-tile-space"
},
".properties.allow_paid_service_plans": {
"type": "boolean",
"value": false
},
".properties.apply_open_security_group": {
"type": "boolean",
"value": false
},
".properties.org": {
"type": "string",
"value": "test-tile-org"
}
}
}
The following substitution strings may be used to reference properties that might be specific to the test environment
{az}
will be replaced with the name of an availability zone in the environment.{disk_type}
will be replaced with the name of a disk type in the environment.{vm_type}
will be replaced with the name of a vm type in the environment.