VMware Cloud Community
EdSp
Enthusiast
Enthusiast

Network specs in json file?

Hi all,

Is there a way to specify the network config (mgt, hdfs, mapreduce) for a new cluster in the json file? It is possible as parameters in the cluster create command I think, but I would like to keep it in the json file.

Is there a full/complete spec of the possible json file contents somewhere maybe?

(working in BDE 2.0)

Thanks,

Ed

Tags (3)
Reply
0 Kudos
3 Replies
MichaelWest
VMware Employee
VMware Employee

I have always used the command line switch for Networks.  I cannot definitively say that there is no way to do it, however there is no documented way to do this in the json.  BTW, the spec file is documented in the BDE Command Line Interface Guide, beginning on Page 61.

If you feel like digging a little.  Search /opt/serengeti/logs/serengeti.log after creating a cluster with command line network switches you want.  You can see the complete json used to create your cluster.  It includes a lot of specification info that is not in your cluster create specfile.  Specifically, I see tags that look like the following:

"networking": [

    {

      "port_group": "VM Network",

      "type": "dhcp"

     }

]

Its possible that you can add these tags to your specfile and they will be parsed correctly.  I've done it with certain parameters in the past, however I cannot guarantee this will work, but might be worth a try.

EdSp
Enthusiast
Enthusiast

Ok, great! Thanks Michael.

Ed

Reply
0 Kudos
admin
Immortal
Immortal

The following is a sample to specify network in json file. It can only work when creating cluster through calling REST API by yourself.  BDE CLI/GUI will ignore this field.

{

"name":"cdh",

   "externalHDFS":null,

  "distro":"cdh",

   "distroVendor":"CDH",

   "networkConfig": {

         "MGT_NETWORK":["nw1"],

          "HDFS_NETWORK": ["nw2"],

          "MAPRED_NETWORK": ["nw3"]

        },

   "topologyPolicy":"NONE",

   "nodeGroups":[

    ....

    ]

}