Add Azure deployment examples and enhance configuration management
- Update .gitignore to exclude Terraform files - Enhance README with Azure deployment instructions - Refactor publish.sh to use a container for changelog parsing - Add Azure example files including Terraform configurations - Create cloud-init templates for PKI and default configurations - Implement workload VM setup for testing routing
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
#cloud-config
|
||||
#
|
||||
# Example: install and configure vpn-router during first boot, supplying an
|
||||
# existing CA and server certificate instead of letting the package generate
|
||||
# one. See cloud-init.yaml.tpl for the variant that generates its own CA.
|
||||
#
|
||||
# Template variables are Terraform templatefile() placeholders. Adapt or drop
|
||||
# them for whatever renders this file. <label> is the first component of the
|
||||
# FQDN, for example "router" in router.example.com.
|
||||
|
||||
hostname: ${hostname}
|
||||
fqdn: ${fqdn}
|
||||
manage_etc_hosts: false
|
||||
|
||||
apt:
|
||||
sources:
|
||||
vpn-router:
|
||||
source: "deb [signed-by=/etc/apt/keyrings/vpn-router.asc] ${repo_url} ${ubuntu_codename} main"
|
||||
key: |
|
||||
${indent(8, trimspace(repo_gpg_key))}
|
||||
|
||||
write_files:
|
||||
# The configuration file. Created here before the package is installed, so
|
||||
# postinst leaves it alone.
|
||||
- path: /etc/vpn-router/vpn-router.conf
|
||||
permissions: '0600'
|
||||
owner: root:root
|
||||
content: |
|
||||
[general]
|
||||
platform = ${platform}
|
||||
mode = ${mode}
|
||||
|
||||
[interfaces]
|
||||
external = ${external_interface}
|
||||
internal = ${internal_interface}
|
||||
|
||||
[wan]
|
||||
local_fqdn = ${fqdn}
|
||||
local_id_mode = ${local_id_mode}
|
||||
|
||||
[local]
|
||||
cidrs = ${local_cidrs}
|
||||
int_addr = ${int_addr}
|
||||
int_gateway_ip = ${int_gateway_ip}
|
||||
|
||||
[remote]
|
||||
addrs = ${remote_addrs}
|
||||
id = ${remote_id}
|
||||
cidrs = ${remote_cidrs}
|
||||
psk_b64 = ${psk_b64}
|
||||
|
||||
[p2s]
|
||||
enabled = ${p2s_enabled}
|
||||
address_pool = ${p2s_address_pool}
|
||||
ca_name = ${p2s_ca_name}
|
||||
|
||||
[wireguard]
|
||||
enabled = ${wg_enabled}
|
||||
address = ${wg_address}
|
||||
listen_port = ${wg_listen_port}
|
||||
|
||||
- path: /etc/vpn-router/pki/ca_cert.pem
|
||||
permissions: '0644'
|
||||
owner: root:root
|
||||
content: |
|
||||
${indent(6, trimspace(ca_cert))}
|
||||
- path: /etc/vpn-router/pki/${label}_cert.pem
|
||||
permissions: '0644'
|
||||
owner: root:root
|
||||
content: |
|
||||
${indent(6, trimspace(server_cert))}
|
||||
- path: /etc/vpn-router/pki/${label}_key.pem
|
||||
permissions: '0600'
|
||||
owner: root:root
|
||||
content: |
|
||||
${indent(6, trimspace(server_key))}
|
||||
|
||||
package_update: true
|
||||
|
||||
packages:
|
||||
- vpn-router
|
||||
|
||||
# Nothing further is required: installing the package starts
|
||||
# vpn-router-setup, which applies the configuration written above.
|
||||
Reference in New Issue
Block a user