Instructions for deploying AWS Cloudformation ECS POC simple and loading the SQS queue from a local workstation.
-
Launch Cloudformation template.
- Visit AWS Cloudformation with Senzing template
- In lower-right, click on "Next" button.
- If access error, see Manual Cloudformation template Launch to load Cloudformation template. Then proceed to next step.
- In Specify stack details
- In Stack name
- Stack name: senzing-poc
- In Parameters
- In Acknowledge insecure system
- Read, understand, and agree to the nature of the security in the deployment.
- In Senzing installation
- Accept the End User Licence Agreement
- In Acknowledge insecure system
- In Options
- For "Optional: Would you like to have sample data imported?", select "No".
- Other parameters are optional.
- In lower-right, click "Next" button.
- In Stack name
- In Configure stack options
- In lower-right, click "Next" button.
- In Review senzing-poc
- Near the bottom, in Capabilities
- Check ":ballot_box_with_check: I acknowledge that AWS CloudFormation might create IAM resources."
- In lower-right, click "Create stack" button.
- Near the bottom, in Capabilities
- Visit AWS CloudFormation console.
- Make sure correct AWS region is selected.
- Wait until "senzing-poc" status is
CREATE_COMPLETE
.- Senzing formation takes about 15 minutes to fully deploy.
- May have to hit the refresh button a few times to get updated information.
- Visit AWS Cloudformation with Senzing template
-
Add data sources to Senzing configuration.
-
In the Cloudformation "Outputs" tab, launch the UrlXterm URL.
-
✏️ In the Xterm, run
G2ConfigTool.py
to add data sources. Example:$ G2ConfigTool.py (g2cfg) addDataSource MY_DATA_SOURCE (g2cfg) addEntityType MY_ENTITY_TYPE (g2cfg) save
-
-
The next steps are done from your local workstation. Depending on your workstation operating system, visit:
-
Get latest docker image. Example:
docker pull senzing/stream-producer:latest
-
✏️ Set AWS variables. Example:
export AWS_ACCESS_KEY_ID=AAAAAAAAAAAAAAAAAAAA export AWS_SECRET_ACCESS_KEY=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa export AWS_DEFAULT_REGION=us-xxxx-1
-
✏️ Identify file to be loaded into Senzing. Example:
export SENZING_INPUT_FILE=/path/to/my/example.json
-
✏️ Set default
DATA_SOURCE
andENTITY_TYPE
values. Example:export SENZING_DEFAULT_DATA_SOURCE=MY_DATA_SOURCE export SENZING_DEFAULT_ENTITY_TYPE=MY_ENTITY_TYPE
-
✏️ Set URL of SQS queue Example:
export SENZING_SQS_QUEUE_URL="https://sqs.us-xxxx-1.amazonaws.com/000000000000/senzing-poc-sqs-queue"
-
✏️ Set
stream-producer.py
subcommand. Example:export SENZING_SUBCOMMAND=json-to-sqs
-
Run docker container. Example:
docker run \ --env AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ --env AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION} \ --env AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ --env SENZING_DEFAULT_DATA_SOURCE=${SENZING_DEFAULT_DATA_SOURCE} \ --env SENZING_DEFAULT_ENTITY_TYPE=${SENZING_DEFAULT_ENTITY_TYPE} \ --env SENZING_INPUT_URL="/data/${SENZING_INPUT_FILE##*/}" \ --env SENZING_SQS_QUEUE_URL=${SENZING_SQS_QUEUE_URL} \ --env SENZING_SUBCOMMAND=${SENZING_SUBCOMMAND} \ --interactive \ --rm \ --tty \ --volume ${SENZING_INPUT_FILE%\/*}:/data \ senzing/stream-producer
-
Install stream-producer.
-
Install prerequisites. Example:
pip3 install -r https://raw.githubusercontent.com/Senzing/stream-producer/main/requirements.txt
-
✏️ Specify location for
stream-producer.py
. Example:export SENZING_DOWNLOAD_FILE=/tmp/stream-producer.py
-
Download
stream-producer.py
. Example:curl -X GET \ --output ${SENZING_DOWNLOAD_FILE} \ https://raw.githubusercontent.com/Senzing/stream-producer/main/stream-producer.py
-
-
Load SQS queue using stream-producer.
-
✏️ Set AWS variables: Example:
export AWS_ACCESS_KEY_ID=AAAAAAAAAAAAAAAAAAAA export AWS_SECRET_ACCESS_KEY=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa export AWS_DEFAULT_REGION=us-xxxx-1
-
✏️ Identify file to be loaded into Senzing. Example:
export SENZING_INPUT_URL=file:///path/to/my/example.json
-
✏️ Set default
DATA_SOURCE
andENTITY_TYPE
values. Example:export SENZING_DEFAULT_DATA_SOURCE=MY_DATA_SOURCE export SENZING_DEFAULT_ENTITY_TYPE=MY_ENTITY_TYPE
-
✏️ Set URL of SQS queue Example:
export SENZING_SQS_QUEUE_URL="https://sqs.us-xxxx-1.amazonaws.com/000000000000/senzing-poc-sqs-queue"
-
✏️ Set subcommand for stream-producer.py Example:
export SENZING_SUBCOMMAND="json-to-sqs"
-
Read file and send to SQS queue. Example:
python /tmp/stream-producer.py ${SENZING_SUBCOMMAND} \ --default-data-source ${SENZING_DEFAULT_DATA_SOURCE} \ --default-entity-type ${SENZING_DEFAULT_ENTITY_TYPE} \ --input-url ${SENZING_INPUT_URL} \ --sqs-queue-url ${SENZING_SQS_QUEUE_URL}
-
-
Install stream-producer.
-
Install prerequisites. Example:
pip install -r https://raw.githubusercontent.com/Senzing/stream-producer/main/requirements.txt
-
✏️ Specify location for
stream-producer.py
. Example:SET SENZING_DOWNLOAD_FILE=C:\tmp\stream-producer.py
-
Download
stream-producer.py
. Example:curl -X GET ^ --output %SENZING_DOWNLOAD_FILE% ^ https://raw.githubusercontent.com/Senzing/stream-producer/main/stream-producer.py
-
-
Load SQS queue using stream-producer.
-
✏️ Set AWS variables: Example:
SET AWS_ACCESS_KEY_ID=AAAAAAAAAAAAAAAAAAAA SET AWS_SECRET_ACCESS_KEY=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa SET AWS_DEFAULT_REGION=us-xxxx-1
-
✏️ Identify file to be loaded into Senzing. Example:
SET SENZING_INPUT_URL=C:\tmp\input-file.csv
-
✏️ Set default
DATA_SOURCE
andENTITY_TYPE
values. Example:SET SENZING_DEFAULT_DATA_SOURCE=MY_DATA_SOURCE SET SENZING_DEFAULT_ENTITY_TYPE=MY_ENTITY_TYPE
-
✏️ Set URL of SQS queue Example:
SET SENZING_SQS_QUEUE_URL="https://sqs.us-xxxx-1.amazonaws.com/000000000000/senzing-poc-sqs-queue"
-
✏️ Set subcommand for stream-producer.py Example:
SET SENZING_SUBCOMMAND="json-to-sqs"
-
Read file and send to SQS queue. Example:
python C:\tmp\stream-producer.py %SENZING_SUBCOMMAND% ^ --default-data-source %SENZING_DEFAULT_DATA_SOURCE% ^ --default-entity-type %SENZING_DEFAULT_ENTITY_TYPE% ^ --input-url %SENZING_INPUT_URL% ^ --sqs-queue-url %SENZING_SQS_QUEUE_URL%
-
-
✏️ Identify the
cloudformation.yaml
to be downloaded. Example:SET SENZING_CLOUDFORMATION_URL=https://raw.githubusercontent.com/Senzing/aws-cloudformation-ecs-poc-simple/main/cloudformation.yaml
-
✏️ Identify where
cloudformation.yaml
file will be downloaded. Example:SET SENZING_DOWNLOAD_FILE=C:\tmp\cloudformation.yaml
-
Download
cloudformation.yaml
. Example:curl -X GET --output %SENZING_DOWNLOAD_FILE% %SENZING_CLOUDFORMATION_URL%
-
Click "Create stack" drop-down > "With new resources (standard)".
-
In "Create stack":
- Click "Upload a template file" button.
- Click "Choose file" button and locate the file specified by
SENZING_DOWNLOAD_FILE
. - Click "Next" button.
-
Return to instructions for Specify stack details.