Godots is a multidroplet management software its architecured in a client server model, it has a comprehensive record of activities happening in the client side and capable of running remote commands on the client system. This can be ideally used for running remote scripts across multiple servers and multiple accounts.
Often there arises a case where we need to run scripts on multiple systems due to resource constraints or demographic reason. so the godots helps in creating digitial ocean droplets as many as required and across multiple accounts. However these are subjected to the respective quotas available for the account.
- linux server
- python 3.6+
- mysql 5.7+
- rsync
- sentry
- linux server with specs required as per requirements
- python 3.6+
- rsync
- sentry
- VNC (optional for GUI)
- GUI Testing
- Datamining
- Small scale multi server computing (not ideal meant)
- Image processing across servers
- Distributed API testing.
Code to clone and break reference:
git clone https://github.com/Infosciencelabsdev/Godot
cd Godot
rm -rf .git
cd dots-server
Code to install Flask (only necessary once):
pip3 install flask
Code to configure your flask app (you may need to set these once each time you open a new terminal):
export FLASK_APP=server.py
export FLASK_RUN_HOST=0.0.0.0
export FLASK_RUN_PORT=8080
export FLASK_DEBUG=1
Code to run flask:
flask run
If you're developing in the cs50 IDE, ignore this next part.
If you're developing locally, you can probably save time on the environment variables, by installing the python-dotenv package, which automatically loads the settings we're currently setting with export
:
pip3 install python-dotenv
If that installation works, you should be able to create a file called .env
and add the export
statements above to it, that way these configurations won't need to be made every time.
If you're running this locally, you will likely want to run this program inside a virtual environment - that way changes to your Python configuration don't persist and impact other Python programs on your machine. If you're running this program in a remote environment like Cloud Shell, Cloud9, or cs50, adding a virtual environment within those containers may complicate things more than helping them.
To create a virtual environment (you only need to do this once), run this code in terminal:
python3 -m venv venv
To ENTER your virtual environment (you'll need to do this every time you open up a new terminal), run this code:
. venv/bin/activate
To EXIT your virtual environment (you'll want to do this if you decide to change projects - think of it like shutting this one down), you just need one word:
deactivate
If you're using a virtual environment like Codenvy, the virtual environment produces more problems than it solves, so consider skipping this step.
To start, the only package you need to run is flask
for (hopefully) obvious reasons.
To install flask, run this code in terminal.
pip3 install flask
Remember, if you're using a virtual environment, these packages will only be installed IN the virtual environment (which is part of why we don't recommend it in cs50 where we won't need it - students will accidentally forget where they've configured different settings).
If your IDE throws errors on either of these commands saying that you aren't authorized, your account may not be authorized to install packages on the IDE you're using. There are two ways to work around this. The first is by adding the user flag:
pip3 install --user flask
The other way around this is to try adding the 'switch user and do' command ('sudo' for short):
sudo pip3 install flask
The settings will not be stored between sessions, so every time you open a new terminal, you'll need to run these commands, which are stored in the run-variables.md
file for your convenience:
export FLASK_APP=server.py
export FLASK_RUN_HOST=0.0.0.0
export FLASK_RUN_PORT=8080
export FLASK_DEBUG=1
After that you should be able to execute the flask run
command normally.
- INFO SCIENCE LABS - Initial work - Info Science Lab
See also the list of contributors who participated in this project.
Email:- [email protected]
This project is licensed under the Apache License- see the LICENSE file for details