Created
February 1, 2018 15:39
-
-
Save dangtrinhnt/906062b0b6cb51730adb52184af54804 to your computer and use it in GitHub Desktop.
Deploye OpenWRT as DHCP and DNS service on OpenStack Tacker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 | |
description: OpenWRT with services | |
metadata: | |
template_name: OpenWRT | |
topology_template: | |
node_templates: | |
VDU1: | |
type: tosca.nodes.nfv.VDU.Tacker | |
capabilities: | |
nfv_compute: | |
properties: | |
num_cpus: 1 | |
mem_size: 512 MB | |
disk_size: 1 GB | |
properties: | |
image: OpenWRT | |
config: | |
dnsmasq: | | |
package dnsmasq | |
# default openwrt dhcp & dns config | |
config dnsmasq | |
option domainneeded '1' | |
option boguspriv '1' | |
option filterwin2k '0' | |
option localise_queries '1' | |
option rebind_protection '1' | |
option rebind_localhost '1' | |
option local '/lan/' | |
option domain 'lan' | |
option expandhosts '1' | |
option nonegcache '0' | |
option authoritative '1' | |
option readethers '1' | |
option leasefile '/tmp/dhcp.leases' | |
option resolvfile '/tmp/resolv.conf.auto' | |
option localservice '1' | |
config dhcp 'lan' | |
option interface 'lan' | |
option start '100' | |
option limit '150' | |
option leasetime '12h' | |
option dhcpv6 'server' | |
option ra 'server' | |
option ra_management '1' | |
#the request to www.facebook.com will end to 1.2.3.4 | |
config 'domain' | |
option 'name' 'www.facebook.com' | |
option 'ip' '1.2.3.4' | |
config 'domain' | |
option 'name' 'dangtrinh.com' | |
option 'ip' '192.168.1.140' | |
mgmt_driver: openwrt | |
monitoring_policy: | |
name: ping | |
parameters: | |
count: 3 | |
interval: 10 | |
actions: | |
failure: respawn | |
CP1: | |
type: tosca.nodes.nfv.CP.Tacker | |
properties: | |
management: true | |
anti_spoofing_protection: false | |
requirements: | |
- virtualLink: | |
node: VL1 | |
- virtualBinding: | |
node: VDU1 | |
VL1: | |
type: tosca.nodes.nfv.VL | |
properties: | |
network_name: net_mgmt | |
vendor: Tacker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment