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:

  1. Sign in to AWS. Create an EC2 instance of the supported OS, eg: Ubuntu OS.

  2. Download AWS CLI and connect to AWS.

  3. Install Docker CE on the Ubuntu machine. For details, see Install Docker Engine on Ubuntu.

  4. Create S3 bucket, upload Foresight Instream, Foresight Translator, Foresight REST API build.

  5. 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
  6. Setup Foresight REST API 1.1.0 on the Ubuntu machine.

  7. Create an Elastic File System (EFS) in the same region.

    Add the EC2 instance private IP into the security group of the EFS.

  8. In Inbound rules of EC2 instance security group, add NFS in type.

  9. 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
  10. Create FSRest.ini in EFS folder and add all the properties.

  11. Create docker.env, if required and add all the variables.

  12. 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
  13. 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