Use wsadminlib methods createCluster() and createServerInCluster().
First create a cluster, specifying the cell name and cluster name:
createCluster( 'cell1', 'cluster1')
Then create servers, specifying the cluster name, node name, and server name:
createServerInCluster( 'cluster1', 'node1', 'server1')
createServerInCluster( 'cluster1', 'node1', 'server2')
That was easy. We created one cluster with two servers. This screenshot shows the two servers with the cluster name in the Admin Console.
It's also easy to create a replication domain and enable session replication with these same commands. If you look at the two method signatures in wsadminlib.py, you'll see optional parameters for replication. They are disabled by default, and you can override them as follows: