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.
A python script which uses the Speedtest CLI to programatically ship results to an AWS Elasticsearch Service from an endpoint.
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.
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.
- Clone this repository.
- Run
pip install -r requirements.txt
to install the dependencies. - 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': ''
}
- 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': ''
}
- 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
- Tap the Speedtest CLI by running the command:
- For more OSs please reference the Speedtest Website.
- On macOS:
- Clone this repository.
- 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': ''
}
- 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': ''
}
-
Build the docker container with
docker build -t aws-es-speedtest-shipper .
-
Run the docker container with
docker run aws-es-speedtest-shipper python run.py --verbose=no
and your off!
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.
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.
- Clone this repository.
- Run
pip install -r requirements.txt
to install the dependencies. - 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': ''
}
- 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': ''
}
-
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
- Tap the Speedtest CLI by running the command:
- For more OSs please reference the Speedtest Website.
- On macOS:
-
Run
./run.py
and you're off!