removing submodules and adapting documentation

Change-Id: If5714c30e94532901d37b7aa9b3f368a7bf48eb6
diff --git a/.gitmodules b/.gitmodules
index 15f750f..e69de29 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,12 +0,0 @@
-[submodule "components/maas"]
-	path = components/maas
-	url = ../maas
-[submodule "components/cord-tester"]
-	path = components/cord-tester
-	url = ../cord-tester
-[submodule "components/cord-onos-publisher"]
-	path = components/cord-onos-publisher
-	url = ../cord-onos-publisher
-[submodule "components/platform-install"]
-	path = components/platform-install
-	url = ../platform-install
diff --git a/build.gradle b/build.gradle
index b09b492..6d83489 100644
--- a/build.gradle
+++ b/build.gradle
@@ -17,6 +17,23 @@
 import org.opencord.gradle.rules.*
 import org.yaml.snakeyaml.Yaml
 
+buildscript {
+  repositories {
+    maven {
+      url "https://plugins.gradle.org/m2/"
+    }
+  }
+  dependencies {
+    classpath "gradle.plugin.com.dorongold.plugins:task-tree:1.2.1"
+  }
+}
+
+apply plugin: "com.dorongold.task-tree"
+
+evaluationDependsOn(':maas')
+evaluationDependsOn(':platform-install')
+evaluationDependsOn(':onos-apps')
+
 allprojects {
     apply plugin: 'base'
     apply plugin: 'de.gesellix.docker'
@@ -48,34 +65,6 @@
 
     // Component table
     comps = [
-            'maas': [
-                    'type':         'gitmodule',
-                    'upstream':     '../maas',
-                    'branch':       'master',
-                    'tag':          null,
-                    'componentDir': './components/maas'
-            ],
-            'cord-tester': [
-                    'type':         'gitmodule',
-                    'upstream':     '../cord-tester',
-                    'branch':       'master',
-                    'tag':          null,
-                    'componentDir': './components/cord-tester'
-            ],
-            'cord-onos-publisher': [
-                    'type':         'gitmodule',
-                    'upstream':     '../cord-onos-publisher',
-                    'branch':       'master',
-                    'tag':          null,
-                    'componentDir': './components/cord-onos-publisher'
-            ],
-            'platform-install': [
-                    'type':         'gitmodule',
-                    'upstream':     '../platform-install',
-                    'branch':       'master',
-                    'tag':          null,
-                    'componentDir': './components/platform-install'
-            ],
             'onosproject/onos': [
                     'type':     'image',
                     'upstream': upstreamReg,
@@ -102,42 +91,26 @@
 
 }
 
-// ------------- PlaceHolders ----------------
-
-task updateDocker (type: Exec) {
-    commandLine 'sudo', 'utils/enable-remote-docker-registry', "$targetReg"
-}
-
-task prime {
-    // TODO this is a place-holder.
-    dependsOn updateDocker
-    doFirst {
-        println "Using deployment config: $deployConfig"
-        File configFile = new File(deployConfig)
-        def yaml = new Yaml()
-        def config = yaml.load(configFile.newReader())
-        println "Config: $config"
-        println "Access some data in config:\n\tSeed server IP=${config.seedServer.ip}"
-    }
-}
-
 // ---------------- Useful tasks ----------------
 
 task fetchUpstreamImages {
     comps.each { name, spec -> if (spec.type == 'image') { dependsOn "fetch" + name } }
 }
 
-task fetchGitSubmodules {
-    comps.each { name, spec -> if (spec.type == 'gitmodule') { dependsOn "gitupdate" + name } }
+
+task fetch  {
+    dependsOn fetchUpstreamImages
 }
 
-task fetch {
-    dependsOn fetchUpstreamImages
-    dependsOn fetchGitSubmodules
+task buildImages  {
+    logger.info "Root project has nothing to build"
 }
 
 task publishImages {
-    comps.each { name, spec -> if (spec.type == 'image') { dependsOn "publish" + name } }
+    comps.each { name, spec -> if (spec.type == 'image') { 
+            dependsOn "publish" + name 
+          } 
+    }
 }
 
 task publish {
@@ -145,31 +118,13 @@
 }
 
 tasks.addRule(new DockerFetchRule(project))
-tasks.addRule(new DockerPublishRule(project))
+tasks.addRule(new DockerPublishRule(project, project(':maas').prime))
 tasks.addRule(new DockerTagRule(project))
-tasks.addRule(new GitSubmoduleUpdateRule(project))
 
-task deployBase {
-    // TODO this is a place-holder.
-    doFirst {
-        println "Using deployment config: $deployConfig"
-        File configFile = new File(deployConfig)
-        def yaml = new Yaml()
-        def config = yaml.load(configFile.newReader())
-        println "Config: $config"
-        println "Access some data in config:\n\tSeed server IP=${config.seedServer.ip}"
-    }
-}
+project('platform-install').deployPlatform.dependsOn project(':maas').deployBase
+project('onos-apps').publishMavenRepoImage.dependsOn project(':maas').prime
 
-task deployPlatform {
-    // TODO this is a place-holder.
-    doFirst {
-        println "Using deployment config: $deployConfig"
-        File configFile = new File(deployConfig)
-        def yaml = new Yaml()
-        def config = yaml.load(configFile.newReader())
-        println "Config: $config"
-        println "Access some data in config:\n\tSeed server IP=${config.seedServer.ip}"
-    }
+task deploy  {
+    dependsOn << project(':platform-install').deployPlatform
 }
 
diff --git a/build.gradle.new b/build.gradle.new
deleted file mode 100644
index 6d83489..0000000
--- a/build.gradle.new
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.opencord.gradle.rules.*
-import org.yaml.snakeyaml.Yaml
-
-buildscript {
-  repositories {
-    maven {
-      url "https://plugins.gradle.org/m2/"
-    }
-  }
-  dependencies {
-    classpath "gradle.plugin.com.dorongold.plugins:task-tree:1.2.1"
-  }
-}
-
-apply plugin: "com.dorongold.task-tree"
-
-evaluationDependsOn(':maas')
-evaluationDependsOn(':platform-install')
-evaluationDependsOn(':onos-apps')
-
-allprojects {
-    apply plugin: 'base'
-    apply plugin: 'de.gesellix.docker'
-    //apply plugin: 'com.tmiyamon.config'
-
-    docker {
-        // dockerHost = System.env.DOCKER_HOST ?: 'unix:///var/run/docker.sock'
-        // dockerHost = System.env.DOCKER_HOST ?: 'https://192.168.99.100:2376'
-        // certPath = System.getProperty('docker.cert.path') ?: "${System.getProperty('user.home')}/.docker/machine/machines/default"
-        // authConfigPlain = [
-        //   "username"       : "joe",
-        //   "password"       : "some-pw-as-needed",
-        //   "email"          : "joe@acme.com",
-        //   "serveraddress"  : "https://index.docker.io/v1/"
-        //  ]
-    }
-}
-
-ext {
-
-    // Upstream registry to simplify filling out the comps table below
-    upstreamReg = project.hasProperty('upstreamReg') ? project.getProperty('upstreamReg') : 'docker.io'
-
-    // Target registry to be used to publish docker images needed for deployment
-    targetReg = project.hasProperty('targetReg') ? project.getProperty('targetReg') : 'localhost:5000'
-
-    // The tag used to tag the docker images push to the target registry
-    targetTag = project.hasProperty('targetTag') ? project.getProperty('targetTag') : 'candidate'
-
-    // Component table
-    comps = [
-            'onosproject/onos': [
-                    'type':     'image',
-                    'upstream': upstreamReg,
-                    'name':     'onosproject/onos',
-                    'digest':   'sha256:6c310b6bc798f745977973c8c883d3dd1eb250fd124ae4d627fd98a69efb5afc'
-            ],
-            'nginx': [
-                    'type':     'image',
-                    'upstream': upstreamReg,
-                    'name':     'nginx',
-                    'digest':   'sha256:b555f8c64ab4e85405e0d8b03f759b73ce88deb802892a3b155ef55e3e832806'
-            ],
-            'swarm': [
-                    'type':     'image',
-                    'upstream': upstreamReg,
-                    'name':     'swarm',
-                    'digest':   'sha256:6ca9b40980e2fcdcd229900ec8933f3e92c14ead22c9404cb09736cb4f3a9248'
-            ],
-    ]
-
-    // Deployment target config file (yaml format); this can be overwritten from the command line
-    // using the -PdeployConfig=<file-path> syntax.
-    deployConfig = project.hasProperty('deployConfig') ? project.getProperty('deployConfig') : './config/default.yml'
-
-}
-
-// ---------------- Useful tasks ----------------
-
-task fetchUpstreamImages {
-    comps.each { name, spec -> if (spec.type == 'image') { dependsOn "fetch" + name } }
-}
-
-
-task fetch  {
-    dependsOn fetchUpstreamImages
-}
-
-task buildImages  {
-    logger.info "Root project has nothing to build"
-}
-
-task publishImages {
-    comps.each { name, spec -> if (spec.type == 'image') { 
-            dependsOn "publish" + name 
-          } 
-    }
-}
-
-task publish {
-    dependsOn publishImages
-}
-
-tasks.addRule(new DockerFetchRule(project))
-tasks.addRule(new DockerPublishRule(project, project(':maas').prime))
-tasks.addRule(new DockerTagRule(project))
-
-project('platform-install').deployPlatform.dependsOn project(':maas').deployBase
-project('onos-apps').publishMavenRepoImage.dependsOn project(':maas').prime
-
-task deploy  {
-    dependsOn << project(':platform-install').deployPlatform
-}
-
diff --git a/components/cord-onos-publisher b/components/cord-onos-publisher
deleted file mode 160000
index 7ea6e0e..0000000
--- a/components/cord-onos-publisher
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 7ea6e0e8d1768ceb54ee0badf18a81e6cc5aaa74
diff --git a/components/cord-tester b/components/cord-tester
deleted file mode 160000
index 07608ef..0000000
--- a/components/cord-tester
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 07608ef82bdbf93194dc5c85d6b15c27eafe0b75
diff --git a/components/maas b/components/maas
deleted file mode 160000
index 4b9faf1..0000000
--- a/components/maas
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4b9faf1837aa0ec80b5c91c3d6c709c685f221f6
diff --git a/components/platform-install b/components/platform-install
deleted file mode 160000
index 8a8958f..0000000
--- a/components/platform-install
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 8a8958fbe769f9b5d3025640b1018519cce55386
diff --git a/docs/quickstart.md b/docs/quickstart.md
index be905d4..3af05ce 100644
--- a/docs/quickstart.md
+++ b/docs/quickstart.md
@@ -57,10 +57,34 @@
 
 Refer to the [CloudLab documentation](https://docs.cloudlab.us) for more information.
 
-## Clone the Repository
-To clone the repository, on your build host issue the `git` command:
+## Install Repo
+
+Make sure you have a bin directory in your home directory and that it is included in your path:
+
 ```
-git clone http://gerrit.opencord.org/cord
+mkdir ~/bin
+PATH=~/bin:$PATH
+```
+
+(of course you can put repo wherever you want)
+
+Download the Repo tool and ensure that it is executable:
+
+```
+curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
+chmod a+x ~/bin/repo
+```
+
+## Clone the Repository
+To clone the repository, on your OtP build host issue the `git` command:
+```
+mkdir opencord && cd opencord
+repo init -u https://gerrit.opencord.org/manifest -b master -g build
+```
+
+Fetch the opencord source code
+```
+repo sync
 ```
 
 ### Complete
@@ -68,10 +92,9 @@
 similar to:
 ```
 ls
-LICENSE.txt        ansible/           components/        gradle/            gradlew.bat        utils/
-README.md          build.gradle       config/            gradle.properties  scripts/
-Vagrantfile        buildSrc/          docs/              gradlew*           settings.gradle
+build
 ```
+
 ## Create the Development Machine
 
 The development environment is required for the tasks in this repository.
@@ -83,6 +106,7 @@
 some basic required packages, such as Docker, Docker Compose, and
 Oracle Java 8.
 ```
+cd build
 vagrant up corddev
 ```
 **NOTE:** *It may takes several minutes for the first command `vagrant up
@@ -150,7 +174,7 @@
 
 ## Edit the configuration file
 
-Edit the configuration file `/cord/components/platform-install/config/default.yml`.  Add the IP address of your target
+Edit the configuration file `/cord/platform-install/config/default.yml`.  Add the IP address of your target
 server as well as the `username / password` for accessing the server.  You can skip adding the password if you can SSH
 to the target server from inside the Vagrant VM as `username` without one (e.g., by running `ssh-agent`).
 
@@ -176,7 +200,7 @@
 Deploy the CORD software to the the target server and configure it to form a running POD.
 
 ```
-./gradlew -PdeployConfig=/cord/components/platform-install/config/default.yml deploySingle
+./gradlew -PdeployConfig=/cord/platform-install/config/default.yml deploySingle
    ```
 > *What this does:*
 >
@@ -215,7 +239,7 @@
 tests on the platform by running this command:
 
 ```
-./gradlew -PdeployConfig=/cord/components/platform-install/config/default.yml postDeployTests
+./gradlew -PdeployConfig=/cord/platform-install/config/default.yml postDeployTests
 ```
 
 ### test-vsg
diff --git a/docs/quickstart_physical.md b/docs/quickstart_physical.md
index aa92ed0..42557fb 100644
--- a/docs/quickstart_physical.md
+++ b/docs/quickstart_physical.md
@@ -60,10 +60,34 @@
 rebooted. This guide assumes that the head node is being bootstrapped from a
 host outside of the POD (OtP).
 
+## Install Repo
+
+Make sure you have a bin directory in your home directory and that it is included in your path:
+
+```
+mkdir ~/bin
+PATH=~/bin:$PATH
+```
+
+(of course you can put repo wherever you want)
+
+Download the Repo tool and ensure that it is executable:
+
+```
+curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
+chmod a+x ~/bin/repo
+```
+
 ## Clone the Repository
 To clone the repository, on your OtP build host issue the `git` command:
 ```
-git clone http://gerrit.opencord.org/cord
+mkdir opencord && cd opencord
+repo init -u https://gerrit.opencord.org/manifest -b master -g build,onos
+```
+
+Fetch the opencord source code
+```
+repo sync
 ```
 
 ### Complete
@@ -71,9 +95,7 @@
 similar to:
 ```
 ls
-LICENSE.txt        ansible/           components/        gradle/            gradlew.bat        utils/
-README.md          build.gradle       config/            gradle.properties  scripts/
-Vagrantfile        buildSrc/          docs/              gradlew*           settings.gradle
+build		onos-apps
 ```
 ## Create the Development Machine
 
@@ -86,6 +108,7 @@
 some basic required packages, such as Docker, Docker Compose, and
 Oracle Java 8.
 ```
+cd build
 vagrant up corddev
 ```
 **NOTE:** *The VM will consume 2G RAM and about 12G disk space. Make sure it can obtain sufficient resources.
@@ -231,28 +254,6 @@
 sample deployment configuration found in `config/sample.yml` and modify the
 values to fit your physical deployment.
 
-## Prime the Target server
-The target server is the server that will assume the role of the head node in
-the cord POD. Priming this server consists of deploying some base software that
-is required to deploy the base software, such as a docker registry. Having the
-docker registry on the target server allows the deployment process to push
-images to the target server that are used in the reset of the process, thus
-making the head node a self contained deployment.
-```
-./gradlew -PdeployConfig=config/podX.yml -PtargetReg=<head-node-ip-address>:5000 prime
-```
-
-### Complete
-Once the `prime` command successfully runs this task is complete. When this
-step is complete a Docker registry and Docker registry mirror. It can be
-verified that these are running by using the `docker ps` command.
-```
-docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}'
-CONTAINER ID        IMAGE               COMMAND                  CREATED AT
-5f1cbebe7e61        registry:2.4.0      "/bin/registry serve "   2016-07-13 17:03:08 +0000 UTC
-6d3a911e5323        registry:2.4.0      "/bin/registry serve "   2016-07-13 17:03:08 +0000 UTC
-```
-
 ## Publish
 Publishing consists of *pushing* the build docker images to the Docker
 repository on the target head node. This step can take a while as it has to
@@ -263,10 +264,20 @@
 ```
 
 ### Complete
+
 Once the `publish` command successfully runs this task is complete. When this
-step is complete it can be verified by performing a query on the target
-server's Docker registry using the following command on the development
-machine.
+step is complete a Docker registry and Docker registry mirror. It can be
+verified that these are running by using the `docker ps` command.
+```
+docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}'
+CONTAINER ID        IMAGE               COMMAND                  CREATED AT
+5f1cbebe7e61        registry:2.4.0      "/bin/registry serve "   2016-07-13 17:03:08 +0000 UTC
+6d3a911e5323        registry:2.4.0      "/bin/registry serve "   2016-07-13 17:03:08 +0000 UTC
+```
+
+We can also query the docker registry on the head node. We should be able to
+observe a list of docker images.
+
 ```
 curl -sS http://head-node-ip-address:5000/v2/_catalog | jq .
 {
@@ -291,13 +302,14 @@
 server (`MAAS`), PXE booting a compute node, and post deployment provisioning
 of the compute node. These tasks are accomplished utilizing additionally
 Vagrant machines as well as executing `gradle` tasks in the Vagrant
-development machine.
+development machine. This task also provisions XOS. XOS provides service
+provisioning and orchestration for the CORD POD.
 
-### Deploy MAAS
+### Deploy MAAS and XOS
 Canonical MAAS provides the PXE and other bare metal provisioning services for
 CORD and will be deployed on the head node.
 ```
-./gradlew -PdeployConfig=config/podX.yml deployBase
+./gradlew -PdeployConfig=config/podX.yml deploy
 ```
 
 This task can take some time so be patient. It should complete without errors,
@@ -305,6 +317,7 @@
 [Getting Help](#getting-help) section.
 
 ### Complete
+
 This step is complete when the command successfully runs. The Web UI for MAAS
 can be viewed by browsing to the target machine using a URL of the form
 `http://head-node-ip-address:5240/MAAS`. To login web page , use Cord for
@@ -330,20 +343,7 @@
 
 Browse around the UI and get familiar with MAAS via documentation at `http://maas.io`
 
-## Deploy XOS
-XOS provides service provisioning and orchestration for the CORD POD. To deploy
-XOS to the head node use the following command:
-```
-./gradlew -PdeployConfig=config/podX.yml deployPlatform
-```
-
-This task can take some time so be patient. It should complete without errors,
-so if an error is encountered something went Horribly Wrong (tm).  See
-the [Getting Help](#getting-help) section.
-
-### Complete
-This step is complete when the command successfully runs. The deployment of XOS
-includes a deployment of Open Stack.
+The deployment of XOS includes a deployment of Open Stack.
 
 ## Booting Compute Nodes
 
diff --git a/docs/quickstart_vm.md b/docs/quickstart_vm.md
index 81ab69c..e055a54 100644
--- a/docs/quickstart_vm.md
+++ b/docs/quickstart_vm.md
@@ -24,26 +24,51 @@
 required tools are installed. It is far easier to leverage the Vagrant based
 environment.
 
-### Cloning the Repository
-To clone the repository select a location on the outside the POD (OtP) host and
-issue the `git` command to download (clone) the repository.
+## Install Repo
+
+Make sure you have a bin directory in your home directory and that it is included in your path:
+
 ```
-git clone http://gerrit.opencord.org/cord
+mkdir ~/bin
+PATH=~/bin:$PATH
 ```
+
+(of course you can put repo wherever you want)
+
+Download the Repo tool and ensure that it is executable:
+
+```
+curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
+chmod a+x ~/bin/repo
+```
+
+## Clone the Repository
+To clone the repository, on your OtP build host issue the `git` command:
+```
+mkdir opencord && cd opencord
+repo init -u https://gerrit.opencord.org/manifest -b master -g build,onos
+```
+
+Fetch the opencord source code
+```
+repo sync
+```
+
+### Complete
 When this is complete, a listing (`ls`) of this directory should yield output
 similar to:
 ```
 ls
-LICENSE.txt        ansible/           components/        gradle/            gradlew.bat        utils/
-README.md          build.gradle       config/            gradle.properties  scripts/
-Vagrantfile        buildSrc/          docs/              gradlew*           settings.gradle
+build		onos-apps
 ```
+
 ### Create Development Machine and Head Node Production Server
 To create the development machine the following single Vagrant command can be
 used. This will create an Ubuntu 14.04 LTS based virtual machine and install
 some basic required packages, such as Docker, Docker Compose, and
 Oracle Java 8.
 ```
+cd build
 vagrant up corddev
 ```
 **NOTE:** *It may have several minutes for the first command `vagrant up
diff --git a/settings.gradle b/settings.gradle
index 6efd72a..ffceecd 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,4 +1,4 @@
-include 'components/maas'
-include 'components/cord-onos-publisher'
-include 'components/cord-tester'
-include 'components/platform-install'
+include 'maas'
+include 'platform-install'
+includeFlat 'onos-apps'
+
diff --git a/settings.gradle.new b/settings.gradle.new
deleted file mode 100644
index 501b42f..0000000
--- a/settings.gradle.new
+++ /dev/null
@@ -1,10 +0,0 @@
-include 'maas'
-include 'platform-install'
-includeFlat 'onos-apps'
-
-rootProject.name = 'main'
-project(':').buildFileName = 'build.gradle.new'
-project(':maas').buildFileName = 'build.gradle.new'
-project(':platform-install').buildFileName = 'build.gradle.new'
-project(':onos-apps').buildFileName = 'build.gradle.new'
-