Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 the original author or authors. |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Zsolt Haraszti | 0b790aa | 2016-05-12 22:33:14 -0700 | [diff] [blame] | 17 | import org.opencord.gradle.rules.* |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 18 | import org.yaml.snakeyaml.Yaml |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 19 | import org.yaml.snakeyaml.DumperOptions |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 20 | |
alshabib | 11b8e5c | 2016-08-29 15:36:36 -0700 | [diff] [blame] | 21 | buildscript { |
| 22 | repositories { |
| 23 | maven { |
| 24 | url "https://plugins.gradle.org/m2/" |
| 25 | } |
| 26 | } |
| 27 | dependencies { |
| 28 | classpath "gradle.plugin.com.dorongold.plugins:task-tree:1.2.1" |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | apply plugin: "com.dorongold.task-tree" |
| 33 | |
| 34 | evaluationDependsOn(':maas') |
alshabib | 11b8e5c | 2016-08-29 15:36:36 -0700 | [diff] [blame] | 35 | evaluationDependsOn(':onos-apps') |
Andy Bavier | 96df5e6 | 2017-03-13 18:19:24 -0400 | [diff] [blame] | 36 | evaluationDependsOn(':orchestration:xos') |
Scott Baker | a6e5dd1 | 2017-04-17 10:08:16 -0700 | [diff] [blame] | 37 | evaluationDependsOn(':platform-install') |
alshabib | 11b8e5c | 2016-08-29 15:36:36 -0700 | [diff] [blame] | 38 | |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 39 | allprojects { |
| 40 | apply plugin: 'base' |
| 41 | apply plugin: 'de.gesellix.docker' |
| 42 | //apply plugin: 'com.tmiyamon.config' |
| 43 | |
| 44 | docker { |
| 45 | // dockerHost = System.env.DOCKER_HOST ?: 'unix:///var/run/docker.sock' |
| 46 | // dockerHost = System.env.DOCKER_HOST ?: 'https://192.168.99.100:2376' |
| 47 | // certPath = System.getProperty('docker.cert.path') ?: "${System.getProperty('user.home')}/.docker/machine/machines/default" |
| 48 | // authConfigPlain = [ |
| 49 | // "username" : "joe", |
| 50 | // "password" : "some-pw-as-needed", |
| 51 | // "email" : "joe@acme.com", |
| 52 | // "serveraddress" : "https://index.docker.io/v1/" |
| 53 | // ] |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | ext { |
| 58 | |
David K. Bainbridge | 094508e | 2016-11-15 17:23:51 -0800 | [diff] [blame] | 59 | // Deployment target config file (yaml format); this can be overwritten from the command line |
| 60 | // using the -PdeployConfig=<file-path> syntax. |
alshabib | 19c61df | 2017-02-14 11:25:22 -0800 | [diff] [blame] | 61 | deployConfig = project.hasProperty('deployConfig') ? project.getProperty('deployConfig') : './config/default.yml' |
David K. Bainbridge | 094508e | 2016-11-15 17:23:51 -0800 | [diff] [blame] | 62 | |
| 63 | println "Using deployment config: $deployConfig" |
| 64 | File configFile = new File(deployConfig) |
| 65 | def yaml = new Yaml() |
| 66 | config = yaml.load(configFile.newReader()) |
| 67 | |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 68 | // Upstream registry to simplify filling out the comps table below |
Zsolt Haraszti | a9f7250 | 2016-05-12 16:07:03 -0700 | [diff] [blame] | 69 | upstreamReg = project.hasProperty('upstreamReg') ? project.getProperty('upstreamReg') : 'docker.io' |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 70 | |
| 71 | // Target registry to be used to publish docker images needed for deployment |
David K. Bainbridge | 094508e | 2016-11-15 17:23:51 -0800 | [diff] [blame] | 72 | targetReg = project.hasProperty('targetReg') |
| 73 | ? project.getProperty('targetReg') |
| 74 | : config.docker && config.docker.registry |
| 75 | ? config.docker.registry |
Zack Williams | 0620c93 | 2017-01-25 14:36:31 -0700 | [diff] [blame] | 76 | : config.headnode.ip |
| 77 | ? config.headnode.ip + ":5000" |
David K. Bainbridge | 094508e | 2016-11-15 17:23:51 -0800 | [diff] [blame] | 78 | : 'localhost:5000' |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 79 | |
| 80 | // The tag used to tag the docker images push to the target registry |
David K. Bainbridge | 094508e | 2016-11-15 17:23:51 -0800 | [diff] [blame] | 81 | targetTag = project.hasProperty('targetTag') |
| 82 | ? project.getProperty('targetTag') |
| 83 | : config.docker && config.docker.imageVersion |
| 84 | ? config.docker.imageVersion |
| 85 | : 'candidate' |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 86 | |
| 87 | // Component table |
| 88 | comps = [ |
Andy Bavier | 693b906 | 2017-05-16 10:09:53 -0400 | [diff] [blame] | 89 | // ONOS 1.8.7 from DockerHub |
Andy Bavier | b69496a | 2017-05-10 14:42:38 -0400 | [diff] [blame] | 90 | 'onosproject/onos': [ |
David K. Bainbridge | d54ca70 | 2016-07-13 22:27:12 -0700 | [diff] [blame] | 91 | 'type': 'image', |
| 92 | 'upstream': upstreamReg, |
Andy Bavier | b69496a | 2017-05-10 14:42:38 -0400 | [diff] [blame] | 93 | 'name': 'onosproject/onos', |
Andy Bavier | 693b906 | 2017-05-16 10:09:53 -0400 | [diff] [blame] | 94 | 'digest': 'sha256:7e6e79e8cc41419901ee6f9022abaf2be52098795e70cab0e1964126dae56f87' |
David K. Bainbridge | d54ca70 | 2016-07-13 22:27:12 -0700 | [diff] [blame] | 95 | ], |
Zsolt Haraszti | 3dbe616 | 2016-05-12 12:25:56 -0700 | [diff] [blame] | 96 | 'nginx': [ |
| 97 | 'type': 'image', |
| 98 | 'upstream': upstreamReg, |
| 99 | 'name': 'nginx', |
| 100 | 'digest': 'sha256:b555f8c64ab4e85405e0d8b03f759b73ce88deb802892a3b155ef55e3e832806' |
| 101 | ], |
| 102 | 'swarm': [ |
| 103 | 'type': 'image', |
| 104 | 'upstream': upstreamReg, |
| 105 | 'name': 'swarm', |
| 106 | 'digest': 'sha256:6ca9b40980e2fcdcd229900ec8933f3e92c14ead22c9404cb09736cb4f3a9248' |
| 107 | ], |
Scott Baker | a0a0e44 | 2016-10-10 20:58:22 -0700 | [diff] [blame] | 108 | 'xosproject/vsg': [ |
| 109 | 'type': 'image', |
| 110 | 'upstream': upstreamReg, |
| 111 | 'name': 'xosproject/vsg', |
| 112 | 'digest': 'sha256:18d1c6ef9767d8a41c9b51948776052d024d4e3294e5d1d6dde1a49112175d91' |
| 113 | ], |
Scott Baker | bceca9c | 2016-11-05 18:59:25 -0700 | [diff] [blame] | 114 | 'redis': [ |
| 115 | 'type': 'image', |
| 116 | 'upstream': upstreamReg, |
| 117 | 'name': 'redis', |
| 118 | 'digest': 'sha256:0fe5a7afa2c2154f37c8ab56a9a6c5023cb0405cc0e85b34d8dcc1de6c3f143e' |
| 119 | ], |
Scott Baker | 18ea0c3 | 2017-01-19 09:29:57 -0800 | [diff] [blame] | 120 | 'node': [ |
| 121 | 'type': 'image', |
| 122 | 'upstream': upstreamReg, |
| 123 | 'name': 'node', |
| 124 | 'digest': 'sha256:5757581a8ff7e08041512a54aa3f573d33fecdce81d603e48a759956cd99bdd3' |
| 125 | ], |
Matteo Scandolo | 951dd5b | 2017-05-25 07:35:47 -0700 | [diff] [blame] | 126 | 'gliderlabs/consul-server': [ |
Matteo Scandolo | 8957620 | 2017-05-18 18:39:43 -0700 | [diff] [blame] | 127 | 'type': 'image', |
| 128 | 'upstream': upstreamReg, |
| 129 | 'name': 'gliderlabs/consul-server', |
Matteo Scandolo | ccd20e8 | 2017-05-24 15:13:48 -0700 | [diff] [blame] | 130 | 'digest': 'sha256:37e194c7c941e37cf20b0cc5080541cfde9d31bf62a874905d0d51b3945f88c9' |
Matteo Scandolo | 8957620 | 2017-05-18 18:39:43 -0700 | [diff] [blame] | 131 | ], |
Matteo Scandolo | 951dd5b | 2017-05-25 07:35:47 -0700 | [diff] [blame] | 132 | 'gliderlabs/registrator': [ |
Matteo Scandolo | 8957620 | 2017-05-18 18:39:43 -0700 | [diff] [blame] | 133 | 'type': 'image', |
| 134 | 'upstream': upstreamReg, |
| 135 | 'name': 'gliderlabs/registrator', |
Matteo Scandolo | ccd20e8 | 2017-05-24 15:13:48 -0700 | [diff] [blame] | 136 | 'digest': 'sha256:6e708681dd52e28f4f39d048ac75376c9a762c44b3d75b2824173f8364e52c10' |
Matteo Scandolo | 8957620 | 2017-05-18 18:39:43 -0700 | [diff] [blame] | 137 | ] |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 138 | ] |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 139 | } |
| 140 | |
alshabib | 00c4b5d | 2016-06-17 17:26:10 -0700 | [diff] [blame] | 141 | // ---------------- Useful tasks ---------------- |
| 142 | |
Zack Williams | 0620c93 | 2017-01-25 14:36:31 -0700 | [diff] [blame] | 143 | task writeInventory(type: Copy) { |
| 144 | from 'ansible/cord-inv' |
| 145 | into 'genconfig' |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 146 | expand([ |
Zack Williams | 0620c93 | 2017-01-25 14:36:31 -0700 | [diff] [blame] | 147 | headnode_ip: config.headnode.ip, |
| 148 | headnode_user: config.headnode.ansible_user, |
| 149 | headnode_pass: config.headnode.ansible_ssh_pass, |
| 150 | headnode_port: config.headnode.ansible_ssh_port, |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 151 | ]) |
| 152 | } |
| 153 | |
| 154 | task writeYamlConfig { |
Zack Williams | 0620c93 | 2017-01-25 14:36:31 -0700 | [diff] [blame] | 155 | def outvar = config.common |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 156 | def outfilename = "genconfig/config.yml" |
| 157 | |
| 158 | DumperOptions options = new DumperOptions() |
| 159 | |
| 160 | options.setExplicitStart(true); |
| 161 | options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK) |
| 162 | options.setPrettyFlow(true); |
| 163 | options.setIndent(2); |
| 164 | |
| 165 | def yaml = new Yaml(options) |
| 166 | Writer outfile = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outfilename), "utf-8")) |
| 167 | |
| 168 | yaml.dump(outvar, outfile) |
| 169 | outfile.close() |
| 170 | } |
| 171 | |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 172 | |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 173 | task fetchUpstreamImages { |
Zsolt Haraszti | 3dbe616 | 2016-05-12 12:25:56 -0700 | [diff] [blame] | 174 | comps.each { name, spec -> if (spec.type == 'image') { dependsOn "fetch" + name } } |
| 175 | } |
| 176 | |
alshabib | 11b8e5c | 2016-08-29 15:36:36 -0700 | [diff] [blame] | 177 | task fetch { |
| 178 | dependsOn fetchUpstreamImages |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 179 | } |
| 180 | |
alshabib | 11b8e5c | 2016-08-29 15:36:36 -0700 | [diff] [blame] | 181 | task buildImages { |
| 182 | logger.info "Root project has nothing to build" |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 183 | } |
| 184 | |
| 185 | task publishImages { |
Andy Bavier | 24d2111 | 2017-03-13 10:09:31 -0400 | [diff] [blame] | 186 | comps.each { name, spec -> if (spec.type == 'image') { |
| 187 | dependsOn "publish" + name |
| 188 | } |
alshabib | 11b8e5c | 2016-08-29 15:36:36 -0700 | [diff] [blame] | 189 | } |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 190 | } |
| 191 | |
| 192 | task publish { |
Zsolt Haraszti | 3dbe616 | 2016-05-12 12:25:56 -0700 | [diff] [blame] | 193 | dependsOn publishImages |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 194 | } |
| 195 | |
| 196 | tasks.addRule(new DockerFetchRule(project)) |
alshabib | 11b8e5c | 2016-08-29 15:36:36 -0700 | [diff] [blame] | 197 | tasks.addRule(new DockerPublishRule(project, project(':maas').prime)) |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 198 | tasks.addRule(new DockerTagRule(project)) |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 199 | |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 200 | task PIcreateConfig(type: Exec) { |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 201 | dependsOn writeYamlConfig |
Zack Williams | 0620c93 | 2017-01-25 14:36:31 -0700 | [diff] [blame] | 202 | dependsOn writeInventory |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 203 | |
Andy Bavier | 96df5e6 | 2017-03-13 18:19:24 -0400 | [diff] [blame] | 204 | workingDir "platform-install" |
| 205 | executable = "ansible-playbook" |
| 206 | args = [ "-i", "../genconfig/cord-inv", |
| 207 | "--extra-vars", "@../genconfig/config.yml", |
| 208 | "--extra-vars", "deploy_docker_tag="+targetTag, |
| 209 | "--extra-vars", "deploy_docker_registry=docker-registry:5000/", |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 210 | "cord-config-playbook.yml" ] |
| 211 | } |
| 212 | |
| 213 | task PIcopyCord(type: Exec) { |
| 214 | dependsOn PIcreateConfig |
| 215 | |
| 216 | workingDir "platform-install" |
| 217 | executable = "ansible-playbook" |
| 218 | args = [ "-i", "../genconfig/cord-inv", |
| 219 | "--extra-vars", "@../genconfig/config.yml", |
| 220 | "copy-cord-playbook.yml" ] |
| 221 | } |
| 222 | |
| 223 | task PIcopyProfile(type: Exec) { |
| 224 | dependsOn PIcreateConfig |
| 225 | |
| 226 | workingDir "platform-install" |
| 227 | executable = "ansible-playbook" |
| 228 | args = [ "-i", "../genconfig/cord-inv", |
| 229 | "--extra-vars", "@../genconfig/config.yml", |
| 230 | "copy-profile-playbook.yml" ] |
Andy Bavier | 96df5e6 | 2017-03-13 18:19:24 -0400 | [diff] [blame] | 231 | } |
| 232 | |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 233 | task PIprepPlatform(type: Exec) { |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 234 | dependsOn PIcreateConfig |
| 235 | dependsOn PIcopyCord |
| 236 | dependsOn PIcopyProfile |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 237 | |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 238 | workingDir "platform-install" |
| 239 | executable = "ansible-playbook" |
| 240 | args = [ "-i", "../genconfig/cord-inv", |
| 241 | "--extra-vars", "@../genconfig/config.yml", |
| 242 | "prep-platform-playbook.yml" ] |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 243 | } |
| 244 | |
| 245 | task PIdeployOpenStack (type: Exec) { |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 246 | |
Zack Williams | 31fbc6b | 2017-04-21 22:04:44 -0700 | [diff] [blame] | 247 | workingDir "platform-install" |
| 248 | executable = "ansible-playbook" |
| 249 | args = [ "-i", "../genconfig/cord-inv", |
| 250 | "--extra-vars", "@../genconfig/config.yml", |
| 251 | "--extra-vars", "deploy_docker_tag="+targetTag, |
| 252 | "--extra-vars", "deploy_docker_registry=docker-registry:5000/", |
| 253 | "deploy-openstack-playbook.yml" ] |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 254 | } |
| 255 | |
| 256 | task PIdeployONOS (type: Exec) { |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 257 | |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 258 | workingDir "platform-install" |
| 259 | executable = "ansible-playbook" |
| 260 | args = [ "-i", "../genconfig/cord-inv", |
| 261 | "--extra-vars", "@../genconfig/config.yml", |
| 262 | "--extra-vars", "deploy_docker_tag="+targetTag, |
| 263 | "--extra-vars", "deploy_docker_registry=docker-registry:5000/", |
| 264 | "deploy-onos-playbook.yml" ] |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 265 | } |
| 266 | |
| 267 | task PIdeployXOS (type: Exec) { |
Andy Bavier | 96df5e6 | 2017-03-13 18:19:24 -0400 | [diff] [blame] | 268 | def extra_vars = "--extra-vars deploy_docker_tag="+targetTag+" --extra-vars deploy_docker_registry=docker-registry:5000/" |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 269 | def ansible_cmd = "cd /opt/cord/build/platform-install; ansible-playbook -i inventory/head-localhost --extra-vars @/opt/cord/build/genconfig/config.yml "+extra_vars+" launch-xos-playbook.yml" |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 270 | |
| 271 | executable = "ssh" |
Zack Williams | 0620c93 | 2017-01-25 14:36:31 -0700 | [diff] [blame] | 272 | args = ["-p", "$config.headnode.ansible_ssh_port", "$config.headnode.ansible_user@$config.headnode.ip", ansible_cmd ] |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 273 | } |
| 274 | |
| 275 | task PIsetupAutomation (type: Exec) { |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 276 | def ansible_cmd = "cd /opt/cord/build/platform-install; ansible-playbook -i inventory/head-localhost --extra-vars @/opt/cord/build/genconfig/config.yml cord-automation-playbook.yml" |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 277 | |
| 278 | executable = "ssh" |
Zack Williams | 0620c93 | 2017-01-25 14:36:31 -0700 | [diff] [blame] | 279 | args = ["-p", "$config.headnode.ansible_ssh_port", "$config.headnode.ansible_user@$config.headnode.ip", ansible_cmd ] |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 280 | } |
| 281 | |
Zack Williams | 4fd3dcc | 2017-02-08 20:46:14 -0700 | [diff] [blame] | 282 | task PIrunDiag (type: Exec) { |
Zack Williams | 0620c93 | 2017-01-25 14:36:31 -0700 | [diff] [blame] | 283 | def ansible_cmd = "cd /opt/cord/build/platform-install; ansible-playbook -i inventory/head-localhost --extra-vars @/opt/cord/build/genconfig/config.yml collect-diag-playbook.yml" |
Zack Williams | 4fd3dcc | 2017-02-08 20:46:14 -0700 | [diff] [blame] | 284 | |
| 285 | executable = "ssh" |
Zack Williams | 0620c93 | 2017-01-25 14:36:31 -0700 | [diff] [blame] | 286 | args = ["-p", "$config.headnode.ansible_ssh_port", "$config.headnode.ansible_user@$config.headnode.ip", ansible_cmd ] |
Zack Williams | 4fd3dcc | 2017-02-08 20:46:14 -0700 | [diff] [blame] | 287 | } |
| 288 | |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 289 | task postDeployTests (type: Exec) { |
| 290 | |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 291 | def ansible_cmd = "cd /opt/cord/build/platform-install; ansible-playbook -i inventory/head-localhost --extra-vars @/opt/cord/build/genconfig/config.yml pod-test-playbook.yml" |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 292 | |
| 293 | executable = "ssh" |
Zack Williams | 0620c93 | 2017-01-25 14:36:31 -0700 | [diff] [blame] | 294 | args = ["-p", "$config.headnode.ansible_ssh_port", "$config.headnode.ansible_user@$config.headnode.ip", ansible_cmd ] |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 295 | } |
| 296 | |
Zack Williams | 03a20ec | 2017-04-12 17:39:36 -0700 | [diff] [blame] | 297 | project(':maas').prime.dependsOn writeYamlConfig |
| 298 | project(':maas').prime.dependsOn writeInventory |
| 299 | |
alshabib | 11b8e5c | 2016-08-29 15:36:36 -0700 | [diff] [blame] | 300 | project('onos-apps').publishMavenRepoImage.dependsOn project(':maas').prime |
alshabib | c64cf7f | 2016-09-07 11:47:01 -0700 | [diff] [blame] | 301 | project(':onos-apps').deploy.dependsOn project(':maas').deployBase |
| 302 | |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 303 | project('onos-apps').publishMavenRepoImage.dependsOn project(':maas').prime |
| 304 | project(':onos-apps').deploy.dependsOn project(':maas').deployBase |
| 305 | |
Andy Bavier | 2f151eb | 2017-05-04 16:39:13 -0700 | [diff] [blame] | 306 | // Ensure nginx:candidate exists |
Andy Bavier | 619b635 | 2017-04-26 15:30:23 -0700 | [diff] [blame] | 307 | project(':orchestration:xos').buildImages.dependsOn rootProject."tagnginx" |
Andy Bavier | 96df5e6 | 2017-03-13 18:19:24 -0400 | [diff] [blame] | 308 | |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 309 | // make PI config tasks run before maas deploy |
| 310 | project(':maas').deployBase.dependsOn PIcopyProfile |
| 311 | |
Andy Bavier | 2f151eb | 2017-05-04 16:39:13 -0700 | [diff] [blame] | 312 | // For corebuilder |
Scott Baker | a6e5dd1 | 2017-04-17 10:08:16 -0700 | [diff] [blame] | 313 | project(':platform-install').buildImages.dependsOn project(':orchestration:xos').buildImages |
| 314 | |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 315 | task PIdeployPlatform { |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 316 | dependsOn PIcopyCord |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 317 | dependsOn project(':onos-apps').deploy |
| 318 | dependsOn project(':maas').deployBase |
| 319 | dependsOn PIprepPlatform |
| 320 | dependsOn PIdeployOpenStack |
| 321 | dependsOn PIdeployONOS |
| 322 | dependsOn PIdeployXOS |
| 323 | dependsOn PIsetupAutomation |
| 324 | } |
| 325 | |
Zack Williams | 83a94ce | 2017-05-20 13:36:09 -0700 | [diff] [blame] | 326 | PIprepPlatform.mustRunAfter PIcopyCord |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 327 | PIdeployOpenStack.mustRunAfter PIprepPlatform |
| 328 | PIdeployONOS.mustRunAfter PIdeployOpenStack |
| 329 | PIdeployXOS.mustRunAfter PIdeployONOS |
| 330 | PIsetupAutomation.mustRunAfter PIdeployXOS |
| 331 | PIdeployPlatform.mustRunAfter project(':onos-apps').deploy |
| 332 | PIdeployPlatform.mustRunAfter project(':maas').deployBase |
Andy Bavier | beb89c0 | 2016-07-07 13:26:55 -0400 | [diff] [blame] | 333 | |
alshabib | 11b8e5c | 2016-08-29 15:36:36 -0700 | [diff] [blame] | 334 | task deploy { |
Zack Williams | 38d8c7f | 2017-01-23 07:35:36 -0700 | [diff] [blame] | 335 | dependsOn PIdeployPlatform |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 336 | } |