diff --git a/apps/aaa b/apps/aaa
index acd9363..af15a1f 160000
--- a/apps/aaa
+++ b/apps/aaa
@@ -1 +1 @@
-Subproject commit acd93635e6377f69134b4f6bcf28deb68f47cadd
+Subproject commit af15a1f3303aa2c067c95418f21e2a567d787b92
diff --git a/apps/igmp b/apps/igmp
index 4f6c1e5..5a41d22 160000
--- a/apps/igmp
+++ b/apps/igmp
@@ -1 +1 @@
-Subproject commit 4f6c1e5914ca9b77fc66ddd593a86073a21e7903
+Subproject commit 5a41d227ccd1bb9c3a3e100339d13232386142df
diff --git a/apps/mcast b/apps/mcast
index f1fb8b5..fca6fd9 160000
--- a/apps/mcast
+++ b/apps/mcast
@@ -1 +1 @@
-Subproject commit f1fb8b5d5f90cad6495d23c5bbb4171eda660bcd
+Subproject commit fca6fd961d5c3597c9acf09adbb3c19aa9710503
diff --git a/apps/olt b/apps/olt
index f197557..2105a34 160000
--- a/apps/olt
+++ b/apps/olt
@@ -1 +1 @@
-Subproject commit f197557dc3ac81452c855c919f291b82767824ca
+Subproject commit 2105a343dba0050e522b03985c0c9be6ad5ce6fa
diff --git a/apps/vtn b/apps/vtn
index 7083b09..81a1356 160000
--- a/apps/vtn
+++ b/apps/vtn
@@ -1 +1 @@
-Subproject commit 7083b09be906b1d28161f93b7097dfd7719e5e60
+Subproject commit 81a135679474c5588d1a1417b71f832f9e61e17c
diff --git a/build.gradle.new b/build.gradle.new
new file mode 100644
index 0000000..8fd06d5
--- /dev/null
+++ b/build.gradle.new
@@ -0,0 +1,164 @@
+/*
+ * 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
+
+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'
+
+    deployConfig = project.hasProperty('deployConfig') ? project.getProperty('deployConfig') : './config/default.yml'
+}
+
+
+task buildOnosApps (type: Exec) {
+    workingDir './apps'
+    commandLine 'mvn', 'clean', 'install', '-U'
+}
+
+task copyLocalRepo (dependsOn: buildOnosApps, type: Exec) {
+    workingDir './'
+    commandLine 'cp', '-R', System.env.HOME + '/.m2/repository', '.'
+}
+
+task buildRepoImage (dependsOn: copyLocalRepo, type: Exec) {
+    commandLine 'docker', 'build', '-t', 'opencord/mavenrepo', '.'
+}
+
+task tagMavenRepoImage (type: Exec) {
+    commandLine 'docker', 'tag', 'opencord/mavenrepo', "$targetReg/mavenrepo:$targetTag"
+}
+
+task publishMavenRepoImage (type: Exec) {
+    dependsOn tagMavenRepoImage
+    commandLine 'docker', 'push', "$targetReg/mavenrepo:$targetTag"
+}
+
+List.metaClass.asParam = { prefix, sep ->
+  if (delegate.size() == 0) {
+    ""
+  }
+  String result = "--" + prefix + "="
+  String p = ""
+  delegate.each {
+    result += p + "${it}"
+    p = sep
+  }
+  result
+}
+
+List.metaClass.p = { value, name ->
+  if (value != null && value != "") {
+      delegate << name + "=" + value
+  } else {
+      delegate
+  }
+}
+
+List.metaClass.p = { spec ->
+  if (spec != null && spec != "") {
+      delegate += spec
+  } else {
+      delegate
+  }
+}
+
+// ~~~~~~~~~~~~~~~~~~~ Global tasks ~~~~~~~~~~~~~~~~~~~~~~~
+
+task fetch {
+    logger.info 'Nothing to fetch for me'
+}
+
+task buildImages {
+    dependsOn buildOnosApps
+    dependsOn copyLocalRepo
+    dependsOn buildRepoImage
+}
+
+task publish {
+    dependsOn publishMavenRepoImage
+}
+
+task deploy (type: Exec) {
+        println "Using deployment config: $deployConfig"
+        File configFile = new File(deployConfig)
+        def yaml = new Yaml()
+        def config = yaml.load(configFile.newReader())
+
+        executable = "ansible-playbook"
+        args = ["-i", config.seedServer.ip + ',']
+
+        if ( config.seedServer.user != null && config.seedServer.user != "" ) {
+            args = args << "--user=$config.seedServer.user"
+        }
+
+        def extraVars = []
+        if (config.seedServer) {
+            extraVars = extraVars.p(config.seedServer.extraVars)
+                    .p(config.seedServer.password, "ansible_ssh_pass")
+                    .p(config.seedServer.sudoPassword, "ansible_sudo_pass")
+                    .p(config.seedServer.domain, "domain")
+	            .p(config.seedServer.port, "ansible_ssh_port")
+        }
+
+        if (config.otherServers) {
+            extraVars = extraVars.p(config.otherServers.location, "prov_location")
+                .p(config.otherServers.rolesPath, "prov_role_path")
+                .p(config.otherServers.role, "prov_role")
+        }
+
+        if (config.docker) {
+            extraVars = extraVars.p(config.docker.registry, "docker_registry")
+                .p(config.docker.imageVersion, "docker_image_version")
+        }
+
+        def skipTags = [].p(config.seedServer.skipTags)
+
+        args = args.p(skipTags.asParam("skip-tags", ",")).p(extraVars.asParam("extra-vars", " ")) << "mavenrepo.yml"   
+}
+
+
+// Depending on the version of the apps this will either make a release or publish a snapshot
+task release (type: Exec) {
+    workingDir './apps'
+    commandLine 'mvn', 'clean', 'deploy'
+}
