Images

Description of the Images tab in Typhoon Test Hub, for updating or adding images to be used by agents.

Use the Images tab in case it is necessary to make changes to the base THCC image or add other custom images. After any changes are made, the new image will appear as an available option under Agents with the given name.

You can find the most important information about images in the Images table (Figure 1). From here, you can create a new image, update an image, or delete an existing one.

Figure 1. Images table

The Images table shows the following information:

  1. Name
  2. Time when the image was created

Image details

Figure 2. Images details

In the Details section, you can manage image data such as the Name, the Repository from which the image is made, and its Dockerfile. One or more Artifacts can also be selected. The chosen artifacts will be downloaded to the image build workspace and can be used to build the custom image.

By clicking on the button, an image will be built on all available computers that are connected using the Officer. If the Officer is present and it is connected to TTH (computer is available), the image build will run on the computer. If the computer is offline, the image will not be built. An image can be deleted by clicking on the button.

Create image

A new image can be added by clicking on the button. This opens a dialog window where you can define image parameters (Figure 3). An already existing image can be duplicated by clicking on the button. Agent dist can be downloaded by clicking on the button, which can then be used to create a custom Docker image that includes the agent application, enabling the container's connection with the agent role. An example of a custom agent image is shown below.

Figure 3. Add new image

Parameters that can be edited include:

  1. The name which will be used to refer to the image throughout Typhoon Test Hub. Each name must be unique.
  2. The Repository that will be used for creating an image, selected from the dropdown menu. In order to avoid creating a new image every time there are changes on a branch, use a specific commit hash instead of a branch name.
  3. The Dockerfile content.
Note: In order to save a form, all input fields must be valid. Required fields are signed with *.

Example of a custom agent image

Note that before creating a custom agent image, agent_tth.tar.gz must be present in the build image context. Additionally, python needs to be installed, as it is required for running the agent application.

FROM some_image
# here insert some commands arranging the image
RUN wget --method=post -O /tmp/tth-agent.tar.gz testhub_address/api/agents/dist/download
RUN tar -zxf /tmp/tth-agent.tar.gz --strip-components=1 -C .
RUN python3 -m pip install -r requirements.txt
RUN pip3 cache purge && rm -rf /tmp/*
RUN mkdir -p /var/typhoon/bin
RUN mv bin/* /var/typhoon/bin/
RUN chmod -R 755 /var/typhoon/bin
ENV PATH="${PATH}:/var/typhoon/bin"
CMD ["sh", "-c", "python3 main.py --workspace $WORKSPACE"]