This project is designed to manage node creation and management for IDCloudHost VPS virtual machines to work as a cluster. The notebook automates tasks like node creation, health checking, management (start, stop, delete), cloud-init script generation, MPI cluster readiness, monitoring with Grafana, Portainer setup, and is based on Docker Swarm.
- Automated creation of VPS nodes
- Health checker for node status
- Start, stop, and delete node management
- Cloud-init script generation for initial setup
- MPI cluster setup
- Monitoring with Grafana
- Portainer setup for container management
- Docker Swarm based cluster management
- Adding Support for Kamatera Provider
Before running this project, ensure you have the necessary dependencies installed. These can be installed using the requirements.txt
file.
-
Clone the repository:
git clone https://github.com/Konfersi-Indonesia/konfersi-idch-autopod.git cd konfersi-idch-autopod
-
Install the required Python dependencies:
It's recommended to create a virtual environment to manage dependencies.
Using virtualenv:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
Then install the dependencies:
pip install -r requirements.txt
-
Set up environment variables:
Create a
.env
file with the following variables:IDCH_TOKEN
: This token can be generated from the IDCloudHost Console by creating a new API access.NODE_PASSWORD
: The password for the nodes that will be created.
Example
.env
file:IDCH_TOKEN=your_api_token_here NODE_PASSWORD=your_node_password_here
-
Set up the configuration file:
Create and configure the
config.yaml
file for the project. This file should contain the necessary configuration details for node creation, management, and other settings required by the project. -
Run the notebook:
Once the setup is complete, you can run the notebook
autopod.ipynb
.-
If you're running it locally, you may need to set up Jupyter Notebook or run it directly from Visual Studio Code.
-
To run Jupyter Notebook:
jupyter notebook
Once Jupyter is running, open
autopod.ipynb
and execute the cells as needed.
-
© Konfersi Indonesia, 2024.
- Alfian Isnan (alfianisnan26)