What is TRAIPOD?
‘TRAI’ is an exclusive container image deployed with SWIFT.
SWIFT will run a ‘TRAI’ instance as a pod and a service combination.
How it works?
This is a pod. It will be installed on both the server and the target cluster.
SWIFT will push the transient pod/service to the source side, and it is controllable to manage the CPU, RAM, and Memory of that pod. This doesn’t mean that ‘TRAIPOD’ will consume all the resources from the source cluster.
Also, on the target side, it will provision a transient pod/service. Using this, it will establish communication between the source and target clusters and start syncing the data and objects. This is how it transfers the data from the source to the target side.
‘TRAIPOD’ communicates through the ports listed below snippet. You must select the port in the ‘TRAI Ports’ section in SWIFT. You can either choose the ‘Auto Select Ports’ option or the Specify Port Range option. If you choose the Specify Port Range option, you must manually input the service default ports within the range of 30000-32767. Please refer to the snippet below.
Also, note that whenever you specify the port manually, the control and data ports should be the same on both the source and target sides. Please refer to the snippet below for better understanding.
Import TRAI image to private docker registry.
The ‘TRAI image’ is deployed with SWIFT. The location is /opt/swift/traipod/rackware-trai-docker.tar.gz in SWIFT server.
There are few steps to import the TRAI image as below.
- Copy the ‘TRAI image’ tar file from the SWIFT server to the host where you have the docker client installed.
Go to that directory where you have copied the above image.
Run, docker load <rackware-trai-docker.tar.gz>
The image will be imported with default tag.
Also, you can tag the image and assign it to registry where you want to push it.
Run, docker image tag rackware-trai:<version>private-registry:latest (<version> will be default version, you can find this with ‘docker image ls’ command)
Now push the image to your private registry.
Run, docker push private-registry:latest
Also note that you will have to perform the above steps after a new SWIFT installation. If SWIFT is upgraded, a new ‘TRAI image’ will appear.
Making the private registry available for namespace
- Once you push the ‘TRAI image’ to private registry then it should be visible to the namespace also.
There is a step below to configure image-pull credentials within a namespace from one container platform to another.
a. Step1: Connect to the server where kubectl is working.
b. Step2: Create a secret to get docker registry credentials.: kubectl create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-password> --docker-email=<your-email>
Configure TRAI details for Cluster in SWIFT.After creating private registry and secret for cluster, then now you must provide those details in ‘TRAIPOD Config’ in SWIFT.
TRAI image will be used for creating staging POD while sync. You must enter the details of image name; version tag and image pull secret in SWIFT during sync configuration. Please find below snippet.
Alternatively, you can use the image registry in the ‘TRAIPOD config’ section. However, you need to discover an image registry first in the ‘container registry’ section. We support multiple container registries, e.g., Docker Hub, AWS, OCI, GCP, etc. Please find below a snippet for the reference of Image Registry under the ‘TRAIPOD Config’ section. Here, we have already created a ‘Docker registry’.
just must select the dropdown option in both sides.
Now you can start the sync. The ‘TRAIPOD’ will be installed at both the source and destination for staging purposes. And data will be transferred from the source to the destination in a secure manner.