Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schm1tz1/proxmox-cp-playbook
Proxmox Playbooks for CP installations with terraform, ansible and a little bit of bash magic
https://github.com/schm1tz1/proxmox-cp-playbook
Last synced: 14 days ago
JSON representation
Proxmox Playbooks for CP installations with terraform, ansible and a little bit of bash magic
- Host: GitHub
- URL: https://github.com/schm1tz1/proxmox-cp-playbook
- Owner: Schm1tz1
- License: gpl-3.0
- Created: 2022-06-27T18:35:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-05T09:48:09.000Z (over 2 years ago)
- Last Synced: 2024-10-31T09:52:32.930Z (3 months ago)
- Language: Shell
- Size: 38.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Proxmox Playbooks for CP installations
This provides a full working example to prepare a cloud-init image as a tempalte, then set up VMs in PVE with terraform and deploy Confluent Platform with cp-ansible on those VMs.
## Preparation
* In case you need a jumphost between the networks that also serves as master / ansible control node, install a small LXC or VM. A script that installs the tools you need can be found in [./scripts/setup_jumphost.sh](./scripts/setup_jumphost.sh) (created with Ubuntu 20.04)
* Create a SSH keypair you will use to connect to your VM nodes and use with ansible: `ssh-keygen`
* On your PVE host: Use the scripts in [./terraform/preparation/](./terraform/preparation/) to download a cloud-init image, modify it and create a VM template. Also have a look at [./terraform/README.md](./terraform/README.md) for an example !
* **IMPORTANT:** Make sure you have a correct *hosts.new* file as this will be used as a source for most of the scripts !## Terraform Configuration and VM deployment
* Create your variables in *terraform.tfvars* - use [terraform/terraform.tfvars.example](terraform/terraform.tfvars.example) as template/example
* the default IP range is 10.0.0.0/24 starting with 10.0.0.3x for ZK, 10.0.0.4x for Brokers and so on. You might need to adapt the IPs in cp-vm-\*.tf to your needs.
* Add your credentials for PVE - use [./terraform/credentials.auto.tfvars.example](./terraform/credentials.auto.tfvars.example) as template/exampleIn addition have a look at [./terraform/README.md](./terraform/README.md).
## Ansible Installation
Please refer to [./ansible/README.md](./ansible/README.md)
* For TLS / mTLS you might want to create a CA and certificates - have a look at **scripts/gen_ca.sh** and **scripts/gen_certs.sh** and the corresponding configurations *ca.cnf* and *template.cnf*
* If you run into issues connecting to ZK after a (partial) installation with SASL-SCRAM, check **scripts/sasl_create_admin.sh**
* Creation of ACLs for (non-admin) users can be done with a script like **scripts/set_ACLs.sh**. You will need to create the corresponding client properties.## Cluster / Node Management
You can use the following scripts **scripts/pve_(...)**:
- **pve_remove_cloudinit.sh** - removes the cloudinit virtual cdrom drive
- **pve_cp_cluster.sh** - scripts to start/stop the cluster (in correct order, lowest ID should be ZK, highest C3)
- **pve_create_snapshot_cp.sh**, **pve_delete_snapshot_cp.sh** and **pve_rollback_snapshot_cp.sh** Are used for snapshot management of all cluster nodes