HomeServeMate is a project designed to automate the deployment and configuration of infrastructure on Proxmox using Terraform and Ansible. The Terraform scripts are used to provision the infrastructure, while Ansible is utilized to configure virtual machines (VMs) and Linux containers (LXC).
Before you begin, ensure you have the following installed:
-
Clone the Repository:
git clone https://github.com/yourusername/HomeServeMate.git cd HomeServeMate
-
Set Up Environment Variables:
Ensure you have the necessary environment variables set up for Proxmox and other services. This typically includes API tokens, usernames, and passwords.
-
Terraform Initialization:
Navigate to the
terraform
directory and initialize Terraform.cd terraform terraform init
-
Customize Variables:
Edit the
terraform.tfvars
file to configure the variables specific to your environment.proxmox_endpoint = "https://proxmox.example.com:8006" proxmox_user = "root@pam" proxmox_password = "yourpassword"
-
Deploy Infrastructure:
Run the following commands to plan and apply the Terraform configuration.
terraform plan terraform apply
-
Inventory Setup:
Edit the inventory files located in
ansible/inventory
to match your infrastructure setup. -
Run Ansible Playbooks:
Execute the Ansible playbooks to configure your VMs and LXCs.
ansible-playbook -i ansible/inventory/hosts.yml ansible/playbook.yml
The terraform
directory contains all the necessary files for provisioning the infrastructure:
main.tf
: Main configuration file for Terraform.variables.tf
: Variable definitions.terraform.tfvars
: Variable values specific to your environment.providers.tf
: Provider configurations.export.tf
: Resource export configurations.
The ansible
directory contains playbooks and roles for configuring the VMs and LXCs:
playbook.yml
: Main playbook for Ansible.roles/
: Directory containing various roles for service and application configurations.inventory/
: Directory containing inventory files and group variables.
We welcome contributions! Please read our contributing guidelines to get started.
This project is licensed under the MIT License. See the LICENSE file for more details.