code: @Override
    public void addDeploymentGroup(final DeploymentGroup deploymentGroup)
        throws DeploymentGroupExistsException {
      log.info("adding deployment-group: {}", deploymentGroup);
      final ZooKeeperClient client = provider.get("addDeploymentGroup");
  
      try {
        try {
          client.ensurePath(Paths.configDeploymentGroups());
          client.ensurePath(Paths.statusDeploymentGroups());
          client.transaction(
              create(Paths.configDeploymentGroup(deploymentGroup.getName()), deploymentGroup),
              create(Paths.statusDeploymentGroup(deploymentGroup.getName())),
              create(Paths.statusDeploymentGroupHosts(deploymentGroup.getName()),
                  Json.asBytesUnchecked(emptyList())),
              create(Paths.statusDeploymentGroupRemovedHosts(deploymentGroup.getName()),
                  Json.asBytesUnchecked(emptyList()))
          );
        } catch (final NodeExistsException e) {
          throw new DeploymentGroupExistsException(deploymentGroup.getName());
        }
      } catch (final KeeperException e) {
        throw new HeliosRuntimeException("adding deployment-group " + deploymentGroup + " failed", e);
      }
    }
docs: Create a deployment group.
  
  <p>If successful, the following ZK nodes will be created:
  <ul>
  <li>/config/deployment-groups/[group-name]</li>
  <li>/status/deployment-groups/[group-name]</li>
  <li>/status/deployment-groups/[group-name]/hosts</li>
  </ul>
  These nodes are guaranteed to exist until the DG is removed.
  
  <p>If the operation fails no ZK nodes will be created. If any of the nodes above already exist
  the operation will fail.
  
  @throws DeploymentGroupExistsException If a DG with the same name already exists.