diff --git a/core/api/src/main/java/org/onosproject/cluster/ClusterMetadata.java b/core/api/src/main/java/org/onosproject/cluster/ClusterMetadata.java
index 8f7d960..e1f664e 100644
--- a/core/api/src/main/java/org/onosproject/cluster/ClusterMetadata.java
+++ b/core/api/src/main/java/org/onosproject/cluster/ClusterMetadata.java
@@ -44,7 +44,8 @@
     private final ProviderId providerId;
     private final String name;
     private final ControllerNode localNode;
-    private final Set<Node> nodes;
+    private final Set<ControllerNode> controllerNodes;
+    private final Set<Node> storageNodes;
 
     public static final Funnel<ClusterMetadata> HASH_FUNNEL = new Funnel<ClusterMetadata>() {
         @Override
@@ -58,22 +59,26 @@
         providerId = null;
         name = null;
         localNode = null;
-        nodes = null;
+        controllerNodes = null;
+        storageNodes = null;
     }
 
     public ClusterMetadata(
         ProviderId providerId,
         String name,
         ControllerNode localNode,
-        Set<Node> nodes) {
+        Set<ControllerNode> controllerNodes,
+        Set<Node> storageNodes) {
         this.providerId = checkNotNull(providerId);
         this.name = checkNotNull(name);
         this.localNode = localNode;
-        this.nodes = ImmutableSet.copyOf(checkNotNull(nodes));
+        this.controllerNodes = ImmutableSet.copyOf(checkNotNull(controllerNodes));
+        this.storageNodes = ImmutableSet.copyOf(checkNotNull(storageNodes));
     }
 
-    public ClusterMetadata(String name, ControllerNode localNode, Set<Node> nodes) {
-        this(new ProviderId("none", "none"), name, localNode, nodes);
+    public ClusterMetadata(
+            String name, ControllerNode localNode, Set<ControllerNode> controllerNodes, Set<Node> storageNodes) {
+        this(new ProviderId("none", "none"), name, localNode, controllerNodes, storageNodes);
     }
 
     @Override
@@ -102,8 +107,17 @@
      * Returns the collection of {@link org.onosproject.cluster.ControllerNode nodes} that make up the cluster.
      * @return cluster nodes
      */
+    @Deprecated
     public Collection<ControllerNode> getNodes() {
-        return (Collection) nodes;
+        return getControllerNodes();
+    }
+
+    /**
+     * Returns the collection of {@link org.onosproject.cluster.ControllerNode nodes} that make up the cluster.
+     * @return controller nodes
+     */
+    public Collection<ControllerNode> getControllerNodes() {
+        return controllerNodes;
     }
 
     /**
@@ -112,7 +126,7 @@
      * @return the collection of storage nodes
      */
     public Collection<Node> getStorageNodes() {
-        return nodes;
+        return storageNodes;
     }
 
     /**
@@ -131,13 +145,14 @@
         return MoreObjects.toStringHelper(ClusterMetadata.class)
                 .add("providerId", providerId)
                 .add("name", name)
-                .add("nodes", nodes)
+                .add("controllerNodes", controllerNodes)
+                .add("storageNodes", storageNodes)
                 .toString();
     }
 
     @Override
     public int hashCode() {
-        return Arrays.deepHashCode(new Object[] {providerId, name, nodes});
+        return Arrays.deepHashCode(new Object[] {providerId, name, controllerNodes, storageNodes});
     }
 
     /*
@@ -157,8 +172,10 @@
         ClusterMetadata that = (ClusterMetadata) object;
 
         return Objects.equals(this.name, that.name) &&
-               this.localNode.equals(that.localNode) &&
-               Objects.equals(this.nodes.size(), that.nodes.size()) &&
-               Sets.symmetricDifference(this.nodes, that.nodes).isEmpty();
+                this.localNode.equals(that.localNode) &&
+                Objects.equals(this.controllerNodes.size(), that.controllerNodes.size()) &&
+                Sets.symmetricDifference(this.controllerNodes, that.controllerNodes).isEmpty() &&
+                Objects.equals(this.storageNodes.size(), that.storageNodes.size()) &&
+                Sets.symmetricDifference(this.storageNodes, that.storageNodes).isEmpty();
     }
 }
diff --git a/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataEventTest.java b/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataEventTest.java
index b176aee..49ff25f 100644
--- a/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataEventTest.java
+++ b/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataEventTest.java
@@ -38,11 +38,11 @@
     private final ControllerNode n2 =
             new DefaultControllerNode(nid2, IpAddress.valueOf("10.0.0.2"), 9876);
     private final ClusterMetadata metadata1 =
-            new ClusterMetadata("foo", n1, ImmutableSet.of(n1));
+            new ClusterMetadata("foo", n1, ImmutableSet.of(), ImmutableSet.of(n1));
     private final ClusterMetadata metadata2 =
-            new ClusterMetadata("bar", n1, ImmutableSet.of(n1, n2));
+            new ClusterMetadata("bar", n1, ImmutableSet.of(), ImmutableSet.of(n1, n2));
     private final ClusterMetadata metadata3 =
-            new ClusterMetadata("baz", n1, ImmutableSet.of(n2));
+            new ClusterMetadata("baz", n1, ImmutableSet.of(), ImmutableSet.of(n2));
 
     private final ClusterMetadataEvent event1 =
             new ClusterMetadataEvent(ClusterMetadataEvent.Type.METADATA_CHANGED, metadata1, time1);
diff --git a/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataServiceAdapter.java b/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataServiceAdapter.java
index b1b46f9..f4f6100 100644
--- a/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataServiceAdapter.java
+++ b/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataServiceAdapter.java
@@ -27,7 +27,11 @@
     public ClusterMetadata getClusterMetadata() {
         final NodeId nid = new NodeId("test-node");
         final IpAddress addr = IpAddress.valueOf(0);
-        return new ClusterMetadata("test-cluster", new DefaultControllerNode(nid, addr), Sets.newHashSet());
+        return new ClusterMetadata(
+                "test-cluster",
+                new DefaultControllerNode(nid, addr),
+                Sets.newHashSet(),
+                Sets.newHashSet());
     }
 
     @Override
diff --git a/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataTest.java b/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataTest.java
index d6e2f33..1b32363 100644
--- a/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataTest.java
+++ b/core/api/src/test/java/org/onosproject/cluster/ClusterMetadataTest.java
@@ -39,11 +39,11 @@
             new DefaultControllerNode(nid2, IpAddress.valueOf("10.0.0.2"), 9876);
 
     private final ClusterMetadata metadata1 =
-            new ClusterMetadata("foo", n1, ImmutableSet.of(n1));
+            new ClusterMetadata("foo", n1, ImmutableSet.of(), ImmutableSet.of(n1));
     private final ClusterMetadata sameAsMetadata1 =
-            new ClusterMetadata("foo", n1, ImmutableSet.of(n1));
+            new ClusterMetadata("foo", n1, ImmutableSet.of(), ImmutableSet.of(n1));
     private final ClusterMetadata metadata2 =
-            new ClusterMetadata("bar", n1, ImmutableSet.of(n1, n2));
+            new ClusterMetadata("bar", n1, ImmutableSet.of(n1), ImmutableSet.of(n1, n2));
     private final ProviderId defaultProvider =
             new ProviderId("none", "none");
     /**
@@ -64,8 +64,10 @@
     @Test
     public void checkConstruction() {
         assertThat(metadata2.getName(), is("bar"));
-        assertThat(metadata2.getNodes(), hasSize(2));
-        assertThat(metadata2.getNodes(), contains(n1, n2));
+        assertThat(metadata2.getControllerNodes(), hasSize(1));
+        assertThat(metadata2.getControllerNodes(), contains(n1));
+        assertThat(metadata2.getStorageNodes(), hasSize(2));
+        assertThat(metadata2.getStorageNodes(), contains(n1, n2));
         assertThat(metadata1.providerId(), is(defaultProvider));
     }
 }
diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/ClusterMetadataManager.java b/core/net/src/main/java/org/onosproject/cluster/impl/ClusterMetadataManager.java
index 347c812..7dbf139 100644
--- a/core/net/src/main/java/org/onosproject/cluster/impl/ClusterMetadataManager.java
+++ b/core/net/src/main/java/org/onosproject/cluster/impl/ClusterMetadataManager.java
@@ -98,7 +98,8 @@
     public ControllerNode getLocalNode() {
         checkPermission(CLUSTER_READ);
         if (localNode == null) {
-            ControllerNode localNode = getProvider().getClusterMetadata().value().getLocalNode();
+            ClusterMetadata metadata = getProvider().getClusterMetadata().value();
+            ControllerNode localNode = metadata.getLocalNode();
             try {
                 if (localNode != null) {
                     this.localNode = new DefaultControllerNode(
@@ -107,7 +108,15 @@
                         localNode.tcpPort());
                 } else {
                     IpAddress ip = findLocalIp();
-                    this.localNode = new DefaultControllerNode(NodeId.nodeId(ip.toString()), ip);
+                    localNode = metadata.getControllerNodes().stream()
+                        .filter(node -> node.ip().equals(ip))
+                        .findFirst()
+                        .orElse(null);
+                    if (localNode != null) {
+                        this.localNode = localNode;
+                    } else {
+                        this.localNode = new DefaultControllerNode(NodeId.nodeId(ip.toString()), ip);
+                    }
                 }
             } catch (SocketException e) {
                 throw new IllegalStateException(e);
diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java b/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java
index 8086206..e93ce33 100644
--- a/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java
+++ b/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java
@@ -28,6 +28,7 @@
 import java.util.stream.Collectors;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.Sets;
 import com.google.common.io.Files;
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
@@ -111,10 +112,14 @@
     private ClusterMetadataPrototype toPrototype(ClusterMetadata metadata) {
         ClusterMetadataPrototype prototype = new ClusterMetadataPrototype();
         prototype.setName(metadata.getName());
-        prototype.setCluster(metadata.getNodes()
-            .stream()
-            .map(this::toPrototype)
-            .collect(Collectors.toSet()));
+        prototype.setController(metadata.getNodes()
+                .stream()
+                .map(this::toPrototype)
+                .collect(Collectors.toSet()));
+        prototype.setStorage(metadata.getStorageNodes()
+                .stream()
+                .map(this::toPrototype)
+                .collect(Collectors.toSet()));
         return prototype;
     }
 
@@ -241,13 +246,20 @@
                         metadata.getNode().getPort() != null
                             ? metadata.getNode().getPort()
                             : DefaultControllerNode.DEFAULT_PORT) : null,
-                metadata.getCluster()
-                    .stream()
-                    .map(node -> new DefaultControllerNode(
-                        NodeId.nodeId(node.getId()),
-                        IpAddress.valueOf(node.getIp()),
-                        node.getPort() != null ? node.getPort() : 5679))
-                    .collect(Collectors.toSet())),
+                    metadata.getController()
+                        .stream()
+                        .map(node -> new DefaultControllerNode(
+                            NodeId.nodeId(node.getId()),
+                            IpAddress.valueOf(node.getIp()),
+                            node.getPort() != null ? node.getPort() : 5679))
+                        .collect(Collectors.toSet()),
+                    metadata.getStorage()
+                        .stream()
+                        .map(node -> new DefaultControllerNode(
+                            NodeId.nodeId(node.getId()),
+                            IpAddress.valueOf(node.getIp()),
+                            node.getPort() != null ? node.getPort() : 5679))
+                        .collect(Collectors.toSet())),
                 version);
         } catch (IOException e) {
             throw new IllegalArgumentException(e);
@@ -278,7 +290,8 @@
     private static class ClusterMetadataPrototype {
         private String name;
         private NodePrototype node;
-        private Set<NodePrototype> cluster;
+        private Set<NodePrototype> controller = Sets.newHashSet();
+        private Set<NodePrototype> storage = Sets.newHashSet();
 
         public String getName() {
             return name;
@@ -296,12 +309,20 @@
             this.node = node;
         }
 
-        public Set<NodePrototype> getCluster() {
-            return cluster;
+        public Set<NodePrototype> getController() {
+            return controller;
         }
 
-        public void setCluster(Set<NodePrototype> cluster) {
-            this.cluster = cluster;
+        public void setController(Set<NodePrototype> controller) {
+            this.controller = controller;
+        }
+
+        public Set<NodePrototype> getStorage() {
+            return storage;
+        }
+
+        public void setStorage(Set<NodePrototype> storage) {
+            this.storage = storage;
         }
     }
 
diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/DefaultClusterMetadataProvider.java b/core/net/src/main/java/org/onosproject/cluster/impl/DefaultClusterMetadataProvider.java
index aa32da2..a6f24ae 100644
--- a/core/net/src/main/java/org/onosproject/cluster/impl/DefaultClusterMetadataProvider.java
+++ b/core/net/src/main/java/org/onosproject/cluster/impl/DefaultClusterMetadataProvider.java
@@ -73,7 +73,7 @@
         ControllerNode localNode =
                 new DefaultControllerNode(new NodeId(localIp), IpAddress.valueOf(localIp), DEFAULT_ONOS_PORT);
         ClusterMetadata metadata = new ClusterMetadata(
-            PROVIDER_ID, "default", localNode, ImmutableSet.of());
+            PROVIDER_ID, "default", localNode, ImmutableSet.of(), ImmutableSet.of());
         long version = System.currentTimeMillis();
         cachedMetadata.set(new Versioned<>(metadata, version));
         providerRegistry.register(this);
diff --git a/core/store/dist/src/test/java/org/onosproject/store/cluster/messaging/impl/NettyMessagingManagerTest.java b/core/store/dist/src/test/java/org/onosproject/store/cluster/messaging/impl/NettyMessagingManagerTest.java
index dfb2f67..ac8a9bc 100644
--- a/core/store/dist/src/test/java/org/onosproject/store/cluster/messaging/impl/NettyMessagingManagerTest.java
+++ b/core/store/dist/src/test/java/org/onosproject/store/cluster/messaging/impl/NettyMessagingManagerTest.java
@@ -245,7 +245,7 @@
             @Override
             public ClusterMetadata getClusterMetadata() {
                 return new ClusterMetadata(new ProviderId(DUMMY_NAME, DUMMY_NAME),
-                                           name, getLocalNode(), Sets.newHashSet());
+                                           name, getLocalNode(), Sets.newHashSet(), Sets.newHashSet());
             }
 
             @Override
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/atomix/impl/AtomixManager.java b/core/store/primitives/src/main/java/org/onosproject/store/atomix/impl/AtomixManager.java
index 24b86f5..ba66372 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/atomix/impl/AtomixManager.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/atomix/impl/AtomixManager.java
@@ -15,16 +15,21 @@
  */
 package org.onosproject.store.atomix.impl;
 
+import java.io.File;
+import java.util.Collections;
+import java.util.List;
 import java.util.stream.Collectors;
 
 import io.atomix.cluster.discovery.BootstrapDiscoveryProvider;
 import io.atomix.core.Atomix;
+import io.atomix.protocols.raft.partition.RaftPartitionGroup;
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.Service;
+import org.onosproject.cluster.ClusterMetadata;
 import org.onosproject.cluster.ClusterMetadataService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -35,7 +40,7 @@
 @Component(immediate = true)
 @Service(value = AtomixManager.class)
 public class AtomixManager {
-
+    private static final String LOCAL_DATA_DIR = System.getProperty("karaf.data") + "/db/partitions/";
     private final Logger log = LoggerFactory.getLogger(getClass());
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
@@ -54,6 +59,7 @@
 
     @Activate
     public void activate() {
+        log.info("{}", metadataService.getClusterMetadata());
         atomix = createAtomix();
         atomix.start().join();
         log.info("Started");
@@ -66,19 +72,58 @@
     }
 
     private Atomix createAtomix() {
-        return Atomix.builder(getClass().getClassLoader())
-            .withClusterId(metadataService.getClusterMetadata().getName())
-            .withMemberId(metadataService.getLocalNode().id().id())
-            .withAddress(metadataService.getLocalNode().ip().toString(), metadataService.getLocalNode().tcpPort())
-            .withProperty("type", "onos")
-            .withMembershipProvider(BootstrapDiscoveryProvider.builder()
-                .withNodes(metadataService.getClusterMetadata().getStorageNodes().stream()
-                    .map(node -> io.atomix.cluster.Node.builder()
-                        .withId(node.id().id())
-                        .withAddress(node.ip().toString(), node.tcpPort())
-                        .build())
-                    .collect(Collectors.toList()))
-                .build())
-            .build();
+        ClusterMetadata metadata = metadataService.getClusterMetadata();
+        if (!metadata.getStorageNodes().isEmpty()) {
+            // If storage nodes are defined, construct an instance that connects to them for service discovery.
+            return Atomix.builder(getClass().getClassLoader())
+                .withClusterId(metadata.getName())
+                .withMemberId(metadataService.getLocalNode().id().id())
+                .withAddress(metadataService.getLocalNode().ip().toString(), metadataService.getLocalNode().tcpPort())
+                .withProperty("type", "onos")
+                .withMembershipProvider(BootstrapDiscoveryProvider.builder()
+                    .withNodes(metadata.getStorageNodes().stream()
+                        .map(node -> io.atomix.cluster.Node.builder()
+                            .withId(node.id().id())
+                            .withAddress(node.ip().toString(), node.tcpPort())
+                            .build())
+                        .collect(Collectors.toList()))
+                    .build())
+                .build();
+        } else {
+            log.warn("No storage nodes found in cluster metadata!");
+            log.warn("Bootstrapping ONOS cluster in test mode! For production use, configure external storage nodes.");
+
+            // If storage nodes are not defined, construct a local instance with a Raft partition group.
+            List<String> raftMembers = !metadata.getControllerNodes().isEmpty()
+                ? metadata.getControllerNodes()
+                .stream()
+                .map(node -> node.id().id())
+                .collect(Collectors.toList())
+                : Collections.singletonList(metadataService.getLocalNode().id().id());
+            return Atomix.builder(getClass().getClassLoader())
+                .withClusterId(metadata.getName())
+                .withMemberId(metadataService.getLocalNode().id().id())
+                .withAddress(metadataService.getLocalNode().ip().toString(), metadataService.getLocalNode().tcpPort())
+                .withProperty("type", "onos")
+                .withMembershipProvider(BootstrapDiscoveryProvider.builder()
+                    .withNodes(metadata.getControllerNodes().stream()
+                        .map(node -> io.atomix.cluster.Node.builder()
+                            .withId(node.id().id())
+                            .withAddress(node.ip().toString(), node.tcpPort())
+                            .build())
+                        .collect(Collectors.toList()))
+                    .build())
+                .withManagementGroup(RaftPartitionGroup.builder("system")
+                    .withNumPartitions(1)
+                    .withDataDirectory(new File(LOCAL_DATA_DIR, "system"))
+                    .withMembers(raftMembers)
+                    .build())
+                .addPartitionGroup(RaftPartitionGroup.builder("raft")
+                    .withNumPartitions(raftMembers.size())
+                    .withDataDirectory(new File(LOCAL_DATA_DIR, "data"))
+                    .withMembers(raftMembers)
+                    .build())
+                .build();
+        }
     }
 }
diff --git a/tools/package/onos-run-karaf b/tools/package/onos-run-karaf
index d35468a..7c7a8cc 100755
--- a/tools/package/onos-run-karaf
+++ b/tools/package/onos-run-karaf
@@ -55,7 +55,11 @@
     cat > $ONOS_DIR/config/cluster.json <<-EOF
     {
       "name": "default",
-      "cluster": [ {"id": "$IP", "ip": "$IP", "port": 9876 } ]
+      "node": {
+        "id": "$IP",
+        "ip": "$IP",
+        "port": 9876
+      }
     }
 EOF
 
diff --git a/tools/test/bin/onos-gen-config b/tools/test/bin/onos-gen-config
index ef8f2f0..9f31dee 100755
--- a/tools/test/bin/onos-gen-config
+++ b/tools/test/bin/onos-gen-config
@@ -33,68 +33,74 @@
 convert = lambda text: int(text) if text.isdigit() else text.lower()
 alphanum_key = lambda key: [convert(c) for c in re.split('([0-9]+)', key)]
 
-def get_OCC_vars():
-  vars = []
-  for var in environ:
-    if re.match(r"OCC[0-9]+", var):
-      vars.append(var)
-  return sorted(vars, key=alphanum_key)
 
-def get_nodes(ips=None, default_port=5679):
-    node = lambda id, ip, port : { 'id': id, 'ip': ip, 'port': port }
+def get_vars(type):
+    types = {'controller': 'OC', 'storage': 'OCC'}
+    vars = []
+    for var in environ:
+        if re.match(r"{}[0-9]+".format(types[type]), var):
+            vars.append(var)
+    return sorted(vars, key=alphanum_key)
+
+
+def get_nodes(type, ips=None, default_port=5679):
+    node = lambda id, ip, port: {'id': id, 'ip': ip, 'port': port}
+    prefixes = {'controller': 'onos', 'storage': 'atomix'}
     result = []
     if not ips:
-        ips = [ environ[v] for v in get_OCC_vars() ]
+        ips = [environ[v] for v in get_vars(type)]
     i = 1
     for ip_string in ips:
         address_tuple = ip_string.split(":")
         if len(address_tuple) == 3:
-            id=address_tuple[0]
-            ip=address_tuple[1]
-            port=int(address_tuple[2])
+            id = address_tuple[0]
+            ip = address_tuple[1]
+            port = int(address_tuple[2])
         else:
-            id='atomix-{}'.format(i)
+            id = '{}-{}'.format(prefixes[type], i)
             i += 1
-            ip=ip_string
-            port=default_port
+            ip = ip_string
+            port = default_port
         result.append(node(id, ip, port))
     return result
 
+
 if __name__ == '__main__':
-  parser = argparse.ArgumentParser(
-      description="Generate the partitions json file given a list of IPs or from the $OC* environment variables.")
-  parser.add_argument(
-      '-s', '--partition-size', type=int, default=3,
-      help="Number of nodes per partition. Note that partition sizes smaller than 3 are not fault tolerant. Defaults to 3." )
-  parser.add_argument(
-      '-n', '--num-partitions', type=int,
-      help="Number of partitions. Defaults to the number of nodes in the cluster." )
- # TODO: make filename and nodes independent. This will break backwards compatibility with existing usage.
-  parser.add_argument(
-     'filename', metavar='filename', type=str, nargs='?',
-     help='File to write output to. If none is provided, output is written to stdout.')
-  parser.add_argument(
-      'nodes', metavar='node_ip', type=str, nargs='*',
-      help='IP Address(es) of the node(s) in the cluster. If no IPs are given, ' +
-           'will use the $OC* environment variables. NOTE: these arguemnts' +
-           ' are only processed after the filename argument.')
+    parser = argparse.ArgumentParser(
+        description="Generate the partitions json file given a list of IPs or from environment variables.")
+    parser.add_argument(
+        'filename', metavar='filename', type=str, nargs='?',
+        help='File to write output to. If none is provided, output is written to stdout.')
+    parser.add_argument(
+        '--controller-nodes', '-c', metavar='node_ip', type=str, nargs='+',
+        help='IP Address(es) of the controller nodes. If no IPs are given, ' +
+             'will use the $OC* environment variables. NOTE: these arguemnts' +
+             ' are only processed after the filename argument.')
+    parser.add_argument(
+        '--storage-nodes', '-s', metavar='node_ip', type=str, nargs='+',
+        help='IP Address(es) of the storage nodes. If no IPs are given, ' +
+             'will use the $OCC* environment variables. NOTE: these arguemnts' +
+             ' are only processed after the filename argument.')
 
-  args = parser.parse_args()
-  filename = args.filename
-  partition_size = args.partition_size
-  cluster = get_nodes(args.nodes)
-  num_partitions = args.num_partitions
-  if not num_partitions:
-    num_partitions = len(cluster)
+    args = parser.parse_args()
+    filename = args.filename
+    controller = get_nodes('controller', args.controller_nodes)
+    storage = get_nodes('storage', args.storage_nodes)
 
-  data = {
-           'name': 'onos',
-           'cluster': cluster
-         }
-  output = json.dumps(data, indent=4)
+    if len(storage) > 0:
+        data = {
+            'name': 'onos',
+            'storage': storage
+        }
+    else:
+        data = {
+            'name': 'onos',
+            'controller': controller
+        }
+    output = json.dumps(data, indent=4)
 
-  if filename:
-    with open(filename, 'w') as f:
-      f.write(output)
-  else:
-    print output
+    if filename:
+        with open(filename, 'w') as f:
+            f.write(output)
+    else:
+        print output
diff --git a/tools/test/scenarios/setup.xml b/tools/test/scenarios/setup.xml
index a3bdf32..d148d52 100644
--- a/tools/test/scenarios/setup.xml
+++ b/tools/test/scenarios/setup.xml
@@ -20,26 +20,30 @@
               exec="onos ${OC1} cfg set org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator useFlowObjectives true"/>
 
         <group name="Cleanup">
-            <parallel var="${OC#}">
-                <step name="Push-Bits-${#}" exec="onos-push-bits ${OC#}"
-                      unless="${OCT}"/>
-                <step name="Uninstall-${#}" exec="onos-uninstall ${OC#}"/>
-                <step name="Kill-${#}" env="~" exec="onos-kill ${OC#}"
-                      requires="Uninstall-${#}"/>
-            </parallel>
-            <parallel var="${OCC#}">
-                <step name="Atomix-Kill-${#}"
-                      env="~"
-                      exec="atomix-kill ${OCC#}"/>
-                <step name="Atomix-Uninstall-${#}"
-                      exec="atomix-uninstall ${OCC#}"
-                      requires="Atomix-Kill-${#}"/>
-            </parallel>
+            <group name="Cleanup-ONOS">
+                <parallel var="${OC#}">
+                    <step name="Push-Bits-${#}" exec="onos-push-bits ${OC#}"
+                          unless="${OCT}"/>
+                    <step name="Uninstall-${#}" exec="onos-uninstall ${OC#}"/>
+                    <step name="Kill-${#}" env="~" exec="onos-kill ${OC#}"
+                          requires="Uninstall-${#}"/>
+                </parallel>
+            </group>
+            <group name="Cleanup-Atomix" if="${OCC1}">
+                <parallel var="${OCC#}">
+                    <step name="Atomix-Kill-${#}"
+                          env="~"
+                          exec="atomix-kill ${OCC#}"/>
+                    <step name="Atomix-Uninstall-${#}"
+                          exec="atomix-uninstall ${OCC#}"
+                          requires="Atomix-Kill-${#}"/>
+                </parallel>
+            </group>
         </group>
 
-        <group name="Install-Atomix">
-            <step name="Generate-Cluster-Key" exec="onos-gen-cluster-key -f" />
+        <step name="Generate-Cluster-Key" exec="onos-gen-cluster-key -f"/>
 
+        <group name="Install-Atomix" if="${OCC1}">
             <group name="Parallel-Install-Atomix">
                 <parallel var="${OCC#}">
                     <step name="Parallel-Install-Atomix-${#}" exec="atomix-install ${OCC#}"
