Running stubs in Istio or Kubernetes
After you publish one or more stubs to Istio or Kubernetes, you must upload the project files to a file server and edit the YAML file to point to the URL of the file server before you can run the stubs.
Uploading the tar.gz files
You must upload the tar.gz files for the project and library files, if available, to a file server. From the file server these files can be downloaded automatically when the YAML starts an intiContainer called fetch-project that is run before the stub container is started. The project and library files from this file server are fetched by the YAML file.
Editing the YAML file
- Open the YAML file for editing on your computer.
- Edit the curl command under the
Deploying args:
displayed as:
where- curl http://artifcats/files/<identifier name>_project.tar.gz
<identifier name>
is the name of the project containing the stubs that you published to Kubernetes or Istio from Rational® Integration Tester, to input the URL of the file server and location of the files, as:- curl http://<URL of the file server/location of the files>/<identifier>_project.tar.gz
- Optionally, input the URL of the file server, location, and name of the library files in the corresponding curl command.
- Optionally, add the value for the Rational® Common Licensing server, if you
did not enter it in
Rational® Integration
Tester when you
published the stubs to Kubernetes or Istio.
env: - name: RATIONAL_LICENSE_FILE value: '<IP of the License Server>'
- Save and close the YAML file.
Running the stubs
Depending on the OS of the Kubernetes container where you are deploying the stub, you must run the appropriate command. For example, you must run the following command in a Linux container:
# kubectl apply -f <Directory path>/<identifier name>.yaml
- A deployment pod is created that uses the
<identifer>
name of the YAML file. - A service is created that uses the
<identifer>
name of the YAML file. - A virtual service is created for each HTTP host used by the stubs.