The Koios Administration Tool is a comprehensive script designed to manage and monitor various aspects of a Koios Lite Node environment. This tool offers functionalities ranging from installing dependencies to handling Docker containers, managing environment files, and providing a user-friendly interactive menu for various administrative tasks. It streamlines administration of Koios Lite Node and related components, making it accessible and efficient for users.
install_dependencies() {
# Code to install necessary dependencies
}Installs the necessary dependencies based on the operating system, supporting various Linux distributions, macOS, and providing guidance for manual installation on Windows.
check_docker() {
# Code to check Docker status and handle its installation/startup
}Checks if Docker and Docker Compose are installed and running, and prompts the user to install or start Docker if necessary.
handle_env_file() {
# Code for managing .env file (add, edit, remove, view, reset)
}Manages the .env file, allowing users to add, edit, remove, view, and reset entries in an interactive manner.
reset_env_file() {
# Code to reset .env file
}Resets the .env file to its default state, creating backups of the existing file.
docker-compose psShows the current status of Docker containers, helping users to monitor and manage them.
docker-compose -f "$KLITE_HOME/docker-compose.yml" up -dStarts the Docker containers defined in the docker-compose.yml file.
docker-compose -f "$KLITE_HOME/docker-compose.yml" downStops the Docker containers defined in the docker-compose.yml file.
container_id=$(docker ps -qf "name=cardano-node")
[ -z "$container_id" ] && echo "No running Node container found." || docker exec -it "$container_id" bashProvides access to the Cardano Node container for direct interaction.
container_id=$(docker ps -qf "name=cardano-node")
[ -z "$container_id" ] && echo "No running Node container found." || docker logs "$container_id" | moreDisplays the logs for the Cardano Node container, aiding in monitoring and troubleshooting.
container_id=$(docker ps -qf "name=cardano-node")
[ -z "$container_id" ] && echo "No running Node container found." || docker exec -it "$container_id" /opt/cardano/cnode/scripts/gLiveView.shExecutes gLiveView in the Cardano Node container.
container_id=$(docker ps -qf "name=cardano-node")
[ -z "$container_id" ] && echo "No running Node container found." || docker exec -it "$container_id" /opt/cardano/cnode/scripts/cntools.shRuns CNTools within the Cardano Node container.
container_id=$(docker ps -qf "name=postgress")
[ -z "$container_id" ] && echo "No running Postgres container found." || docker exec -it "$container_id" bashAllows users to access the Postgres container for database management.
container_id=$(docker ps -qf "name=postgress")
[ -z "$container_id" ] && echo "No running Postgres container found." || docker logs "$container_id" | moreShows the logs for the Postgres container.
# Displaying help menu
echo "Koios Administration Tool Help Menu:"
# ... additional help menu details ...Displays the help menu, outlining all available commands and their descriptions.
To use this tool, clone the repository and run the script with the desired arguments or without any to access the interactive menu. Ensure you have the required permissions to execute the script.
git clone https://github.com/koios-official/Lite-Node.git
cd Lite-Node
chmod +x ./scripts/koios-lite.sh
./scripts/koios-lite.sh [--optional-argument]For more detailed usage instructions, run ./koios-lite.sh --help.
Additionally, we have incorporated a user-friendly interface that can be accessed simply by running the script without any arguments:
./scripts/koios-lite.sh