The chosen master-port matters when configuring IP addresses for management or routing, for switching it can be any of the used ports.
I think sample configuration could look like this:
#create switched port group
/interface ethernet
set [ find default-name=ether6 ] master-port=ether5
set [ find default-name=ether8 ] master-port=ether5
set [ find default-name=ether9 ] master-port=ether5
set [ find default-name=ether13 ] master-port=ether5
set [ find default-name=ether23 ] master-port=ether5
set [ find default-name=ether24 ] master-port=ether5
#create port trunks (link aggregation groups)
/interface ethernet switch trunk
add member-ports=ether6,ether8 name=trunk1-esxi
add member-ports=ether23,ether24 name=trunk2-cisco
#set VLAN tagging on ports (in this case port trunks)
/interface ethernet switch egress-vlan-tag
add tagged-ports=trunk1-esxi,trunk2-cisco vlan-id=10
add tagged-ports=trunk1-esxi,trunk2-cisco vlan-id=20
add tagged-ports=trunk1-esxi,trunk2-cisco vlan-id=30
#set VLAN associations for VLAN access ports
/interface ethernet switch ingress-vlan-translation
add customer-vid=0 new-customer-vid=10 ports=ether5 sa-learning=yes
add customer-vid=0 new-customer-vid=20 ports=ether9 sa-learning=yes
add customer-vid=0 new-customer-vid=30 ports=ether13 sa-learning=yes
#set allowed VLANs on ports
/interface ethernet switch vlan
add ports=trunk1-esxi,trunk2-cisco,ether5 vlan-id=10
add ports=trunk1-esxi,trunk2-cisco,ether9 vlan-id=20
add ports=trunk1-esxi,trunk2-cisco,ether13 vlan-id=30
#disallow unknown VLANs on ports
/interface ethernet switch
set drop-if-invalid-or-src-port-not-member-of-vlan-on-ports=ether5,ether6,ether8,ether9,ether13,ether23,ether24