Commit Graph

11 Commits

Author SHA1 Message Date
Haitao Pan
5be8955ff5 feat: enhance WireGuard VPN Overlay deployment and DNAT support
Changes:
- Fixed wg0.conf.j2 template variables
- Refactored wireguard/site logic to support dynamic peer/key selection
- Updated defaults, playbook entry, and install script for consistency

Tested:
 NodePort 443 + DNAT verified from master/slave nodes and external curl
2025-04-06 17:50:32 +08:00
Haitao Pan
bd8553f20e feat(vpn-overlay): add WireGuard Site role 2025-04-06 13:29:01 +08:00
Haitao Pan
d38c4770ac feat: Add VXLAN over WireGuard support with site automation
- Enabled VXLAN over L3 via WireGuard tunnel;
- Standardized Ansible role structure for `vpn-overlay`;
- Integrated systemd service management via `vxlan-setup.service`;
- Configured per-site VXLAN overlay in `config/sit/vpn-overlay.yaml`;
2025-04-06 00:08:17 +08:00
Haitao Pan
d7871dc331 feat(ansible): add Linux OS setup role (vhosts/common) 2025-04-05 17:46:23 +08:00
Haitao Pan
a06d872a75 feat: refine firewall rules and improve AMI resolution
- Renamed and split firewall rules by VPC
- Refactored resolve_ami() to reduce duplication and improve extensibility
2025-04-04 21:35:06 +08:00
Haitao Pan
9bcefe35a2 feat(iac): support multi-VPC & multi-SG binding for EC2 instances 2025-04-03 23:01:09 +08:00
Haitao Pan
c5a776dca2 feat(vpc): auto-create and associate route tables based on subnet type 2025-04-03 21:07:51 +08:00
Haitao Pan
fd68db5812 feat(vpc): support multiple VPC definitions in config and Pulumi module 2025-04-03 14:42:17 +08:00
Haitao Pan
fe99e929de Simplify Pulumi passphrase and teardown process
- Auto-load ~/.pulumi-passphrase if available
- Improve 'down' command: destroy → refresh → stack rm
- Default EC2 instances to associate public IP
- Cleaned up help menu and removed old 'delete' logic
2025-03-31 10:09:30 +08:00
Haitao Pan
af8a848faa feat(iac): 完善 EC2/VPC/SG 模块,支持 AMI 自动解析与资源依赖控制
- 💡 支持 config/ 中通过关键词定义 EC2 实例的 AMI(如 'Ubuntu 22.04')
- ⚙️ 安全组规则支持 source_ranges/egress_ranges 配置化控制
-  增强 create_instances 函数,支持 user_data、spot/ondemand、TTL、owner 等标签
- 🔗 自动构建依赖关系,确保 VPC/Subnet/SG 完成后再部署 EC2
- ☁️ 使用 boto3 检查 AWS credentials,有效支持 ~/.aws/config profile 管理
- 🛠️ 支持 config 中动态启用/禁用模块(vpc/security_group/ec2)
- 🌐 完整验证 pulumi up/destroy/refresh 流程,确保干净状态

This commit enables modular, dynamic provisioning of AWS VPC, EC2 and Security Groups with Pulumi.
Supports keyword-based AMI resolution, secure profile-based credential loading, and full lifecycle control.
2025-03-30 20:30:08 +08:00
Haitao Pan
c2020da184 feat(iac): Refactor structure and support multi-environment config loading
- Add config/sit and other environment-specific config directories
- Refactor deploy.py to support CONFIG_PATH environment variable
- Enable automatic merging of config/*/*.yaml files
- Enhance run.sh with Pulumi/Ansible/Terraform initialization checks
- Add inventory.py to dynamically generate Ansible hosts
- Improve ec2_instance.py with modular instance creation
- Organize base.yaml, vpc.yaml and related config files"
2025-03-29 11:09:24 +08:00