AWS Buckets for TIBCO Foresight REST API Data Storage
In this release, you can now use AWS buckets for storing Foresight REST API data. To store data in AWS buckets, follow the given steps:
-
Sign in to AWS. Create an EC2 instance of the supported OS, eg: Ubuntu OS.
-
Download AWS CLI and connect to AWS.
-
Install Docker CE on the Ubuntu machine. For details, see Install Docker Engine on Ubuntu.
-
Create S3 bucket, upload Foresight Instream, Foresight Translator, Foresight REST API build.
-
Copy all the builds to EC2 instance.
aws s3 cp s3://fsresttest/TIB_fsp-instream-hce_9.2.0_linux_x86_64.zip aws s3 cp s3://fsresttest/TIB_translator_4.1.0_linux_x86_64.zip aws s3 cp s3://fsresttest/TIB_translator_4.1.0_linux_x86_64.zip
-
Setup Foresight REST API 1.1.0 on the Ubuntu machine.
-
Create an Elastic File System (EFS) in the same region.
Add the EC2 instance private IP into the security group of the EFS.
-
In Inbound rules of EC2 instance security group, add NFS in type.
-
Mount EFS on EC2 instance.
cd ~ sudo mkdir efs cd efs sudo mkdir controlfiles sudo mkdir datafiles sudo mkdir guidelines sudo mkdir maps cd ~ sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport $efs_dns:/ efs
-
Create
FSRest.ini
in EFS folder and add all the properties. -
Create docker.env, if required and add all the variables.
-
Run the Docker image:
sudo docker run --name fsrest --env-file=docker.env -p 8080:8080 -v /home/ubuntu/efs:/usr/local/tomcat/TibcoFSRest -d 0.0.0.0:5000/fsrest:x.x.x.xxx
-
Upload files via a PUT request, the files are stored in EFS.
ubuntu@ip-xxx-xx-xx-xxx:~/efs$ ls FSRest.ini controlfiles datafiles guidelines maps test.txt test2.txt ubuntu@ip-xxx-xx-xx-xxx:~/efs$ cd datafiles/ ubuntu@ip-xxx-xx-xx-xxx:~/efs/datafiles$ ls 2Interchanges837i.txt Covance_020212-20120216-132104-213.txt ubuntu@ip-xxx-xx-xx-xxx:~/efs/datafiles$ ls -l total 312 -rw-r----- 1 1100 2000 0 Oct 18 18:16 2Interchanges837i.txt -rw-r----- 1 1100 2000 313230 Oct 18 18:17 Covance_020212-20120216-132104-213.txt