Skip to content

coreysabia/AWS-Elasticsearch-Speedtest-Shipper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Elasticsearch Speedtest Data Shipper

Made with Python 3.7

Version

Programatically ship Speedtest CLI results to an AWS Elasticsearch Service from an endpoint of your choosing. This project is currently under Development. Please check back soon.

Table of Contents

Overview

A python script which uses the Speedtest CLI to programatically ship results to an AWS Elasticsearch Service from an endpoint.

Project Structure

See below for an explanation of the files in the tree.

├── Pipfile → Pipenv requirements.
├── Pipfile.lock → Pipenv lock file.
├── README.md
├── requirements.txt → Python requirements.
├── run.py → Run script.
└── src
    ├── __init__.py
    ├── config.py → Developer created config file.
    ├── config_template.py → Template for config.py file.
    ├── cronTab.py →
    └── speedtestShipper.py → Main shipper script.
└── test
    ├── __init__.py
    └── test.py → Unittest.

Run This Yourself

Local Development

This data shipper is running on Python 3.7. We strongly advise the use of either Anaconda or pipenv to manage a virtual environment in which you can install the dependencies for local development.

Without Docker

  1. Clone this repository.
  2. Run pip install -r requirements.txt to install the dependencies.
  3. Generate some (AWS Elasticsearch Service) keys, and put them in a src/config.py file like so:

Please use src/config_template.py file as a template.

AWS_ES_ENDPOINT = {
    'aws_access_key_id': '',
    'aws_secret_access_key': '',
    'host': '',
    'region': '',
    'service': ''
}
  1. To add the Elasticsearch index and source specific details look into the src/config.py you created, and put them in like so:

Please use src/config_template.py as a reference.

ES_INDEX = {
    'index': '',
    'doc_type': '',
    'source': ''
}
  1. Install the Speedtest CLI using the workflow specific to your OS:
    • On macOS: brew install speedtest --force
      • Tap the Speedtest CLI by running the command: brew tap teamookla/speedtest
      • Update Homebrew by running: brew update
      • Install the Speedtest CLI by running: brew install speedtest --force
      • Confirm it installed by running: speedtest --version
    • For more OSs please reference the Speedtest Website.

With Docker

  1. Clone this repository.
  2. Generate some (AWS Elasticsearch Service) keys, and put them in a src/config.py file like so:

Please use src/config_template.py file as a template.

AWS_ES_ENDPOINT = {
    'aws_access_key_id': '',
    'aws_secret_access_key': '',
    'host': '',
    'region': '',
    'service': ''
}
  1. To add the Elasticsearch index and source specific details look into the src/config.py you created, and put them in like so:

Please use src/config_template.py as a reference.

ES_INDEX = {
    'index': '',
    'doc_type': '',
    'source': ''
}
  1. Build the docker container with docker build -t aws-es-speedtest-shipper .

  2. Run the docker container with docker run aws-es-speedtest-shipper python run.py --verbose=no and your off!

Production

This data shipper is running on Python 3.7. We strongly advise the use of Anaconda to manage a virtual environment in which you can install the dependencies.

Prod Without Docker

We strongly recommend that this data shipper be run on a docker instance (due to the ease of installation) on the host machine, however if you choose not to, the steps below outline the installation procedure.

  1. Clone this repository.
  2. Run pip install -r requirements.txt to install the dependencies.
  3. Generate some (AWS Elasticsearch Service) keys, and put them in a src/config.py file like so:

Please use src/config_template.py file as a template.

AWS_ES_ENDPOINT = {
    'aws_access_key_id': '',
    'aws_secret_access_key': '',
    'host': '',
    'region': '',
    'service': ''
}
  1. To add the Elasticsearch index and source specific details look into the src/config.py you created, and put them in like so:

Please use src/config_template.py as a reference.

ES_INDEX = {
    'index': '',
    'doc_type': '',
    'source': ''
}
  1. Install the Speedtest CLI using the workflow specific to your OS:

    • On macOS: brew install speedtest --force
      • Tap the Speedtest CLI by running the command: brew tap teamookla/speedtest
      • Update Homebrew by running: brew update
      • Install the Speedtest CLI by running: brew install speedtest --force
      • Confirm it installed by running: speedtest --version
    • For more OSs please reference the Speedtest Website.
  2. Run ./run.py and you're off!

Dependencies

Meet the Team

Version 1.0

Corey Sabia

Lead Developer

About

Programatically ship Speedtest CLI results to an AWS Elasticsearch Service endpoint.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages