Liveisstracker is a containerized application which tracks and shows the current location of Internation Space Station on an orthographic world plot. Visit this interactive page to view the application running on cloud, thanks to Streamlit cloud.
A project started as a way to learn how real world projects are developed and deployed into production. It also serves as a template for creating a python project, build using docker containers, docker-compose and the use of maven. It also includes gitlab continuous integration.
This command will build the docker images defined in the docker-compose.yml file, pushes the application image (python), defined in Dockerfile, to gitlab repository
make clean package
To render maps using mapbox, you need an access token. Follow instructions here. You can use create a free account and get a public access token. Save the public token in your project directory as map_secret.txt
.
This command will run the docker-compose.yml and brings up the application (docker containers) in the background.
make clean launch
then go to your web browser at localhost:8501
to view the application
Check other targets using help make help
Main targets: LIVE_ISS_TRACKER
clean : Clean mvn target folder
stop : Stop all containers and bring down docker-compose if up
dk_compose_tests : Launch the application successfully in docker-compose mode
run_python_tests : Run python package test. SKIP_REMOVE_CONTAINER=true to skip removing the docker container if tests pass.
run_streamlit : Runs the Streamlit server on the container.
package : Builds docker images and pushes to GITLAB registry
deep_clean : Cleans mvn target folder, removes docker volumes, containers and images matching 'liveisstracker'
launch : Generates resources and brings the docker-compose up 'builds images'
help : show this help
Steps followed to install java and maven on a windows machine
- Download binary zip archive for Maven from here
- Download Windows compressed archive for Java from here
- Extract both in
C:\dev\tools
in their own folders - Add system variables
JAVA_HOME
pointing to folderC:\dev\tools\jdk-folder
MAVEN_HOME
pointing to folderC:\dev\tools\maven-folder
- Edit system variable 'PATH'. Add two new entries
%JAVA_HOME%\bin
and%MAVEN_HOME%\bin
verify java by opening new command prompt and typing java --version
and mvn --version
for maven
Install docker cli from here
make
is a GNU command so the only way you can get it on Windows is installing a Windows version like the one provided by GNUWin32. Or you can install MinGW and then do: copy c:\MinGW\bin\mingw32-make.exe c:\MinGW\bin\make.exe
. Then update the PATH to include the bin directory of the make.exe.
Java and Maven can be setup by installing maven alone, which will pull its java dependency
sudo apt-get install maven
for debian/ubuntu
This project also generates a command line utility that can be installed from https://pypi.org/project/liveisstracker/ .
pip install liveisstracker
Usage: liveisstracker [OPTIONS]
liveisstracker can get location,speed and pass-over country based on
current location of International Space Station
Options:
-i, --get-iss-location Get the current location of International Space
Station + Google MAP URL
-s, --get-iss-speed Get the current ground speed of International
Space Station
-c, --get-country Get the country above which the ISS is current
passing over
-p, --plot-iss FILENAME.png Plot the current position of International
Space Station on a map
-h, --help Show this message and exit.
$ liveisstracker -i -s
Timestamp (UTC): 2021-11-17 15:52:05 ISS is at Lat:24.6399 Lon:30.1919
https://maps.google.com/?q=24.6399,30.1919&ll=24.6399,30.1919&z=3
Ground Speed of International Space Station is ~ 24833.19 Km/h