Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
OPNsense automated install/setup, cloud-init, ansible, terraform, etc.
« previous
next »
Print
Pages: [
1
]
Author
Topic: OPNsense automated install/setup, cloud-init, ansible, terraform, etc. (Read 866 times)
lbh74
Newbie
Posts: 4
Karma: 0
OPNsense automated install/setup, cloud-init, ansible, terraform, etc.
«
on:
August 28, 2024, 02:08:34 pm »
Hi all.
So I need to deploy OPNSense on Proxmox and I need to do it in multiple environments. I also need to be able to (relatively) quickly breakdown and rebuilt each environment. FYI, OPNsense/HAproxy will act as an entry point to a Kubernetes cluster behind it (on the same Proxmox cluster), it is quite a critical component.
I've got the whole thing automated using Ansible and Terraform (setup of Proxmox, deployment of VM's, install of Kubernetes, all the apps/containers, etc).
The only thing left is OPNsense, which can only be setup manually via the console. I did some searching, looked at FreeBSD cloud-init support, which is not great yet. So I kind of gave up on that for now, but I would be happy if at least I can boot an OPNsense image which would read some kind of setup file (like docker compose, cloud-init, helm chart, etc) to get an IP address and a SSH public key so I can reach it over the network and use Ansible or even Expect to do the rest. But unfortunately I can't figure out if this is possible. Any help/ideas is/are appreciated.
Logged
Patrick M. Hausen
Hero Member
Posts: 6841
Karma: 574
Re: OPNsense automated install/setup, cloud-init, ansible, terraform, etc.
«
Reply #1 on:
August 28, 2024, 02:19:33 pm »
You can prepare the config.xml file with interface settings, users, ...
See my Vagrant project for some inspiration.
https://github.com/punktDe/vagrant-opnsense
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
lbh74
Newbie
Posts: 4
Karma: 0
Re: OPNsense automated install/setup, cloud-init, ansible, terraform, etc.
«
Reply #2 on:
August 28, 2024, 03:35:53 pm »
I had found your project, but dismissed it on account of it being Vagrant. Ill look into the config.xml part. Thank you.
Logged
Patrick M. Hausen
Hero Member
Posts: 6841
Karma: 574
Re: OPNsense automated install/setup, cloud-init, ansible, terraform, etc.
«
Reply #3 on:
August 28, 2024, 03:45:26 pm »
The relevant parts are all bourne shell - hidden inside the Vagrantfile
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
OPNsense automated install/setup, cloud-init, ansible, terraform, etc.