Terraform Hints

Terraform now provides new functions, making itself more powerful as a configuration mgmt tool. Here are some memos: To make var value join with fixed string: "test-${each.key}" cidrsubnet From Terraform official documents, they have an example as following and explained in none humane language way. So I’ll try to interpret it from a Network Expert perspective. cidrsubnet(prefix, newbits, netnum) And an example below: > cidrsubnet("172.16.0.0/12", 4, 2) 172.18.0.0/16 > cidrsubnet("10.1.2.0/24", 4, 15) 10.

Continue reading

蓝图下面可选组件对应系统关系: BasicVmWorkflow最基本的VM配置,可以改是否LOAD ISO(不可定义地址/名字),STORAGE信息,VM Hardware版本信息 ExternalProvisioningWorkflow用于HP Server Automation LinuxKickstartWorkflow借助KICKSTART的Linux自动化安装,要想预载ISO装LINUX,就要用这个 VirtualSccmProvisioningWorkflow用于创建WINDOWS VM WIMImageWorkflow用于通过WIN PE类预载OS安装OS 以上功能中,所有需要自动化安装的都需要设定OS版本,ISO地址/名字等信息才可以创建。BASIC中的配置选项是所有类别都能用的。 ISO地址和名字的定义为:假设vm上mount ISO的地址为[iSCSI_Datastore1]/ISOs/rhel-server-6.7-x86_64-dvd.iso,那么Image.ISO.Location = iSCSI_Datastore1Image.ISO.Name = /ISOs/rhel-server-6.7-x86_64-dvd.iso常用Properties说明: VMware.Hardware.Version vm上硬件版本号 vmx-08 VirtualMachine.NetworkN.NetworkProfileName 按照Network Profile选网卡配置文件,N=网卡号,必须从0累加,不能跳,比如0,2,则因为没有1,所以2会被无视 VirtualMachine.NetworkN.Name 按照NSX上面portgroup名称选网卡文件 创建一条Dictionary definition后,可以以系统已有关键字作为NAME,这样以后BLUEPRINT调用这个关键字时就会自动应用Dictionary中定义的规则,而Control Type中可以定义用户体验,比如可以是多选一,输入,提醒,范围,或者check。 列表具体包含内容如下: 多选一列表: Dropdown(list) -> ValueList A,B,C ACL列表: Parent: Dropdown(list) -> ValueList A,B,C Child: Dropdownlist -> Relationship Parent + ValueExpression 单行XML XML举例: “<?xml version="1.0” encoding="utf-8” standalone="yes”?><ArrayOfPropertyValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance”><PropertyValue><FilterName>VirtualMachine.Adapter.Number</FilterName><FilterValue>1</FilterValue><Value>Vlan480_Mgmt_10.10.128.0/23</Value></PropertyValue><PropertyValue><FilterName>VirtualMachine.Adapter.Number</FilterName><FilterValue>1</FilterValue><Value>Vlan580_VXLAN_10.237.0.0/24</Value></PropertyValue></ArrayOfPropertyValue>”

Continue reading

Author's picture

LuLU

Love coding and new technologies

Cloud Solution Consultant

Canada