Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 1 | # CORD Master Makefile |
| 2 | |
| 3 | # Timestamp for log files |
| 4 | TS := $(shell date +'%Y%m%dT%H%M%SZ') |
| 5 | |
| 6 | # Podconfig must be specified, so an invalid default |
| 7 | PODCONFIG ?= invalid |
| 8 | |
| 9 | # Source path |
| 10 | BUILD ?= . |
| 11 | CORD ?= .. |
| 12 | PI ?= $(BUILD)/platform-install |
| 13 | MAAS ?= $(BUILD)/maas |
Zack Williams | 2f56eee | 2017-07-17 09:59:16 -0700 | [diff] [blame] | 14 | ONOS_APPS ?= $(CORD)/onos-apps |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 15 | |
| 16 | # Configuration paths |
| 17 | PODCONFIG_D ?= $(BUILD)/podconfig |
| 18 | PODCONFIG_PATH ?= $(PODCONFIG_D)/$(PODCONFIG) |
| 19 | |
| 20 | SCENARIOS_D ?= $(BUILD)/scenarios |
| 21 | GENCONFIG_D ?= $(BUILD)/genconfig |
| 22 | |
| 23 | # Milestones/logs paths |
| 24 | M ?= $(BUILD)/milestones |
| 25 | LOGS ?= $(BUILD)/logs |
| 26 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 27 | PREP_MS ?= $(M)/prereqs-check $(M)/vagrant-up $(M)/copy-cord $(M)/cord-config $(M)/copy-config $(M)/prep-buildnode $(M)/prep-headnode $(M)/deploy-elasticstack $(M)/prep-computenode |
| 28 | MAAS_MS ?= $(M)/build-maas-images $(M)/maas-prime $(M)/publish-maas-images $(M)/deploy-maas |
| 29 | OPENSTACK_MS ?= $(M)/glance-images $(M)/deploy-openstack $(M)/deploy-computenode $(M)/onboard-openstack |
| 30 | XOS_MS ?= $(M)/docker-images $(M)/core-image $(M)/publish-docker-images $(M)/start-xos $(M)/onboard-profile |
| 31 | ONOS_MS ?= $(M)/build-onos-apps $(M)/publish-onos-apps $(M)/deploy-onos $(M)/deploy-mavenrepo |
| 32 | POST_INSTALL_MS ?= $(M)/setup-automation $(M)/setup-ciab-pcu $(M)/vagrant-up-switches $(M)/compute1-up $(M)/compute2-up $(M)/compute3-up |
| 33 | ALL_MILESTONES ?= $(PREP_MS) $(MAAS_MS) $(OPENSTACK_MS) $(XOS_MS) $(ONOS_MS) $(POST_INSTALL_MS) |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 34 | |
| 35 | LOCAL_MILESTONES ?= $(M)/local-cord-config $(M)/local-docker-images $(M)/local-core-image $(M)/local-start-xos $(M)/local-onboard-profile |
| 36 | |
| 37 | # Configuration files |
| 38 | MASTER_CONFIG ?= $(GENCONFIG_D)/config.yml |
| 39 | MAKEFILE_CONFIG ?= $(GENCONFIG_D)/config.mk |
| 40 | INVENTORY ?= $(GENCONFIG_D)/inventory.ini |
| 41 | PROFILE_NAME_F ?= $(GENCONFIG_D)/cord_profile |
| 42 | SCENARIO_NAME_F ?= $(GENCONFIG_D)/cord_scenario |
| 43 | |
| 44 | CONFIG_FILES = $(MASTER_CONFIG) $(MAKEFILE_CONFIG) $(INVENTORY) $(PROFILE_NAME_F) $(SCENARIO_NAME_F) |
| 45 | |
| 46 | include $(MAKEFILE_CONFIG) |
| 47 | |
| 48 | # Set using files from genconfig |
| 49 | SCENARIO = $(shell cat $(SCENARIO_NAME_F)) |
| 50 | PROFILE = $(shell cat $(PROFILE_NAME_F)) |
| 51 | |
| 52 | # Host names for SSH commands |
| 53 | BUILDNODE ?= head1 |
| 54 | HEADNODE ?= ${BUILDNODE} |
| 55 | |
| 56 | # Vagrant config |
| 57 | VAGRANT_PROVIDER ?= libvirt |
| 58 | VAGRANT_VMS ?= $(HEADNODE) |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 59 | VAGRANT_SWITCHES ?= leaf1 |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 60 | VAGRANT_CWD ?= $(SCENARIOS_D)/$(SCENARIO)/ |
| 61 | SSH_CONFIG ?= ~/.ssh/config # Vagrant modifies this, should it always? |
| 62 | |
| 63 | # Ansible args, for verbosity and other runtime parameters |
| 64 | ANSIBLE_ARGS ?= |
| 65 | |
| 66 | # Commands |
| 67 | SHELL = bash -o pipefail |
| 68 | VAGRANT ?= VAGRANT_CWD=$(VAGRANT_CWD) vagrant |
| 69 | ANSIBLE ?= ansible -i $(INVENTORY) |
| 70 | ANSIBLE_PB ?= ansible-playbook $(ANSIBLE_ARGS) -i $(INVENTORY) --extra-vars @$(MASTER_CONFIG) |
| 71 | ANSIBLE_PB_LOCAL ?= ansible-playbook $(ANSIBLE_ARGS) -i $(PI)/inventory/head-localhost --extra-vars "@/opt/cord_profile/genconfig/config.yml" |
| 72 | ANSIBLE_PB_MAAS ?= ansible-playbook $(ANSIBLE_ARGS) -i /etc/maas/ansible/pod-inventory --extra-vars "@/opt/cord_profile/genconfig/config.yml" |
| 73 | IMAGEBUILDER ?= python $(BUILD)/scripts/imagebuilder.py |
| 74 | LOGCMD ?= 2>&1 | tee -a $(LOGS)/$(TS)_$(@F) |
| 75 | SSH_HEAD ?= ssh $(HEADNODE) |
| 76 | SSH_BUILD ?= ssh $(BUILDNODE) |
| 77 | |
| 78 | # default target, prints help |
| 79 | .DEFAULT: help |
| 80 | |
| 81 | help: |
| 82 | @echo "Please specify a target (config, build, teardown, ...)" |
| 83 | |
| 84 | # Config file generation |
| 85 | config: $(CONFIG_FILES) |
| 86 | |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 87 | $(CONFIG_FILES): |
| 88 | ansible-playbook -i 'localhost,' --extra-vars="cord_podconfig='$(PODCONFIG_PATH)' genconfig_dir='$(GENCONFIG_D)' scenarios_dir='$(SCENARIOS_D)'" $(BUILD)/ansible/genconfig.yml $(LOGCMD) |
| 89 | |
| 90 | printconfig: config |
| 91 | @echo "Scenario: $(SCENARIO)" |
| 92 | @echo "Profile: $(PROFILE)" |
| 93 | |
| 94 | # Primary Targets |
| 95 | # Many of these targets use target-specific variables |
| 96 | # https://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html |
| 97 | |
| 98 | build: $(BUILD_TARGETS) |
| 99 | |
| 100 | # Utility targets |
| 101 | |
| 102 | xos-teardown: xos-update-images |
| 103 | $(ANSIBLE_PB) $(PI)/teardown-playbook.yml $(LOGCMD) |
| 104 | rm -f $(M)/onboard-profile $(M)/local-onboard-profile |
| 105 | |
| 106 | xos-update-images: clean-images |
Zack Williams | 0a7ef16 | 2017-07-18 18:15:26 -0700 | [diff] [blame] | 107 | rm -f $(M)/start-xos $(M)/local-start-xos |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 108 | |
Zack Williams | a5fcefd | 2017-07-27 22:06:33 -0700 | [diff] [blame] | 109 | ansible-ping: |
| 110 | $(ANSIBLE) -m ping all $(LOGCMD) |
| 111 | |
| 112 | ansible-setup: |
| 113 | $(ANSIBLE) -m setup all $(LOGCMD) |
| 114 | |
Zack Williams | a10094b | 2017-07-23 13:54:12 -0700 | [diff] [blame] | 115 | collect-diag: |
| 116 | $(ANSIBLE_PB) $(PI)/collect-diag-playbook.yml $(LOGCMD) |
| 117 | |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 118 | compute-node-refresh: |
| 119 | $(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_MAAS) $(PI)/compute-node-refresh-playbook.yml" $(LOGCMD) |
| 120 | |
| 121 | vagrant-destroy: |
| 122 | $(VAGRANT) destroy $(LOGCMD) |
| 123 | rm -f $(M)/vagrant-up |
| 124 | |
| 125 | clean-images: |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 126 | rm -f $(M)/docker-images $(M)/local-docker-images $(M)/core-image $(M)/local-core-image $(M)/build-maas-images $(M)/build-onos-apps |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 127 | |
Andy Bavier | 0941047 | 2017-08-15 14:29:35 -0700 | [diff] [blame] | 128 | |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 129 | clean-genconfig: |
| 130 | rm -f $(CONFIG_FILES) |
| 131 | |
| 132 | clean-profile: |
| 133 | rm -rf $(CONFIG_CORD_PROFILE_DIR) |
| 134 | rm -f $(M)/cord-config $(M)/copy-config |
| 135 | |
| 136 | clean-all: vagrant-destroy clean-profile clean-genconfig |
| 137 | rm -f $(ALL_MILESTONES) |
| 138 | |
| 139 | clean-local: clean-profile clean-genconfig |
| 140 | rm -f $(LOCAL_MILESTONES) |
| 141 | |
Andy Bavier | 4dc6647 | 2017-07-18 17:13:24 -0700 | [diff] [blame] | 142 | local-ubuntu-dev-env: |
| 143 | $(ANSIBLE_PB) $(PI)/bootstrap-dev-env.yml $(LOGCMD) |
| 144 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 145 | |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 146 | # == PREREQS == # |
| 147 | VAGRANT_UP_PREREQS ?= |
| 148 | CORD_CONFIG_PREREQS ?= |
| 149 | COPY_CONFIG_PREREQS ?= |
| 150 | PREP_BUILDNODE_PREREQS ?= |
| 151 | PREP_HEADNODE_PREREQS ?= |
Zack Williams | a5fcefd | 2017-07-27 22:06:33 -0700 | [diff] [blame] | 152 | DOCKER_IMAGES_PREREQS ?= |
Zack Williams | 0a7ef16 | 2017-07-18 18:15:26 -0700 | [diff] [blame] | 153 | START_XOS_PREREQS ?= |
| 154 | DEPLOY_ONOS_PREREQS ?= |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 155 | DEPLOY_OPENSTACK_PREREQS ?= |
| 156 | SETUP_AUTOMATION_PREREQS ?= |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 157 | |
| 158 | # == MILESTONES == # |
| 159 | # empty target files are touched in the milestones dir to indicate completion |
| 160 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 161 | # Prep targets |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 162 | $(M)/prereqs-check: |
| 163 | $(ANSIBLE_PB) $(PI)/prereqs-check-playbook.yml $(LOGCMD) |
| 164 | touch $@ |
| 165 | |
| 166 | $(M)/vagrant-up: | $(VAGRANT_UP_PREREQS) |
| 167 | $(VAGRANT) up $(VAGRANT_VMS) --provider $(VAGRANT_PROVIDER) $(LOGCMD) |
| 168 | @echo "Configuring SSH for VM's..." |
| 169 | $(VAGRANT) ssh-config $(VAGRANT_VMS) > $(SSH_CONFIG) |
| 170 | touch $@ |
| 171 | |
| 172 | $(M)/copy-cord: | $(M)/vagrant-up |
| 173 | $(ANSIBLE_PB) $(PI)/copy-cord-playbook.yml $(LOGCMD) |
| 174 | touch $@ |
| 175 | |
| 176 | $(M)/cord-config: | $(M)/vagrant-up $(CORD_CONFIG_PREREQS) |
| 177 | $(ANSIBLE_PB) $(PI)/cord-config-playbook.yml $(LOGCMD) |
| 178 | cp -r $(GENCONFIG_D) $(CONFIG_CORD_PROFILE_DIR)/genconfig |
| 179 | touch $@ |
| 180 | |
| 181 | $(M)/copy-config: | $(COPY_CONFIG_PREREQS) |
| 182 | $(ANSIBLE_PB) $(PI)/copy-profile-playbook.yml $(LOGCMD) |
| 183 | touch $@ |
| 184 | |
| 185 | $(M)/prep-buildnode: | $(M)/vagrant-up $(M)/cord-config $(PREP_BUILDNODE_PREREQS) |
| 186 | $(ANSIBLE_PB) $(PI)/prep-buildnode-playbook.yml $(LOGCMD) |
Zack Williams | a5fcefd | 2017-07-27 22:06:33 -0700 | [diff] [blame] | 187 | @echo Waiting 20 seconds to timeout SSH ControlPersist, and so future ansible commands gain docker group membership |
| 188 | sleep 20 |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 189 | touch $@ |
| 190 | |
| 191 | $(M)/prep-headnode: | $(M)/vagrant-up $(M)/cord-config $(PREP_HEADNODE_PREREQS) |
| 192 | $(ANSIBLE_PB) $(PI)/prep-headnode-playbook.yml $(LOGCMD) |
| 193 | touch $@ |
| 194 | |
Zack Williams | 0a7ef16 | 2017-07-18 18:15:26 -0700 | [diff] [blame] | 195 | $(M)/deploy-elasticstack: | $(M)/prep-headnode |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 196 | $(ANSIBLE_PB) $(PI)/deploy-elasticstack-playbook.yml $(LOGCMD) |
| 197 | touch $@ |
| 198 | |
| 199 | $(M)/prep-computenode: | $(M)/prep-headnode |
| 200 | $(ANSIBLE_PB) $(PI)/prep-computenode-playbook.yml $(LOGCMD) |
| 201 | touch $@ |
| 202 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 203 | |
| 204 | # MaaS targets |
| 205 | $(M)/build-maas-images: | $(M)/prep-buildnode $(BUILD_MAAS_IMAGES_PREREQS) |
| 206 | $(SSH_BUILD) "cd $(BUILD_CORD_DIR)/build/maas; make MAKE_CONFIG=../$(MAKEFILE_CONFIG) build" $(LOGCMD) |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 207 | touch $@ |
| 208 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 209 | $(M)/maas-prime: | $(M)/deploy-elasticstack |
| 210 | $(ANSIBLE_PB) $(MAAS)/prime-node.yml $(LOGCMD) |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 211 | touch $@ |
| 212 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 213 | $(M)/publish-maas-images: | $(M)/maas-prime $(M)/build-maas-images |
Andy Bavier | 0941047 | 2017-08-15 14:29:35 -0700 | [diff] [blame] | 214 | $(SSH_BUILD) "cd $(BUILD_CORD_DIR)/build/maas; rm -f consul.publish; make MAKE_CONFIG=../$(MAKEFILE_CONFIG) publish" $(LOGCMD) |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 215 | touch $@ |
| 216 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 217 | $(M)/deploy-maas: | $(M)/publish-maas-images $(M)/cord-config $(M)/copy-config |
| 218 | $(ANSIBLE_PB) $(MAAS)/head-node.yml $(LOGCMD) |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 219 | touch $@ |
| 220 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 221 | |
| 222 | # ONOS targets |
| 223 | $(M)/build-onos-apps: | $(M)/prep-buildnode $(BUILD_ONOS_APPS_PREREQS) |
| 224 | $(SSH_BUILD) "cd $(BUILD_CORD_DIR)/onos-apps; make MAKE_CONFIG=../$(MAKEFILE_CONFIG) build" $(LOGCMD) |
| 225 | touch $@ |
| 226 | |
| 227 | $(M)/publish-onos-apps: | $(M)/maas-prime $(M)/build-onos-apps |
| 228 | $(SSH_BUILD) "cd $(BUILD_CORD_DIR)/onos-apps; make MAKE_CONFIG=../$(MAKEFILE_CONFIG) publish" $(LOGCMD) |
| 229 | touch $@ |
| 230 | |
| 231 | $(M)/deploy-mavenrepo: | $(M)/publish-onos-apps |
| 232 | $(ANSIBLE_PB) $(PI)/deploy-mavenrepo-playbook.yml $(LOGCMD) |
| 233 | touch $@ |
| 234 | |
| 235 | $(M)/deploy-onos: | $(M)/docker-images $(DEPLOY_ONOS_PREREQS) |
| 236 | $(ANSIBLE_PB) $(PI)/deploy-onos-playbook.yml $(LOGCMD) |
| 237 | touch $@ |
| 238 | |
| 239 | |
| 240 | # XOS targets |
Zack Williams | a5fcefd | 2017-07-27 22:06:33 -0700 | [diff] [blame] | 241 | $(M)/docker-images: | $(M)/prep-buildnode $(DOCKER_IMAGES_PREREQS) |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 242 | $(SSH_BUILD) "cd $(BUILD_CORD_DIR)/build; $(IMAGEBUILDER) -f $(MASTER_CONFIG) -l $(BUILD)/image_logs -g $(BUILD)/ib_graph.dot -a $(BUILD)/ib_actions.yml " $(LOGCMD) |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 243 | touch $@ |
| 244 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 245 | $(M)/core-image: | $(M)/docker-images |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 246 | $(ANSIBLE_PB) $(PI)/build-core-image-playbook.yml $(LOGCMD) |
| 247 | touch $@ |
| 248 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 249 | # Requires ib_actions.yml file which is on the build host |
| 250 | $(M)/publish-docker-images: | $(M)/maas-prime $(M)/docker-images $(M)/core-image |
| 251 | $(SSH_BUILD) "cd $(BUILD_CORD_DIR)/build; $(ANSIBLE_PB_LOCAL) $(PI)/publish-images-playbook.yml" $(LOGCMD) |
| 252 | touch $@ |
| 253 | |
Zack Williams | 0a7ef16 | 2017-07-18 18:15:26 -0700 | [diff] [blame] | 254 | $(M)/start-xos: | $(M)/prep-headnode $(M)/core-image $(START_XOS_PREREQS) |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 255 | $(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) $(PI)/start-xos-playbook.yml" $(LOGCMD) |
| 256 | touch $@ |
| 257 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 258 | $(M)/onboard-profile: | $(M)/start-xos |
| 259 | $(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) $(PI)/onboard-profile-playbook.yml" $(LOGCMD) |
Zack Williams | 2f56eee | 2017-07-17 09:59:16 -0700 | [diff] [blame] | 260 | touch $@ |
| 261 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 262 | |
| 263 | # OpenStack targets |
| 264 | $(M)/glance-images: | $(M)/prep-headnode |
| 265 | $(ANSIBLE_PB) $(PI)/glance-images-playbook.yml $(LOGCMD) |
| 266 | touch $@ |
| 267 | |
| 268 | $(M)/deploy-openstack: | $(M)/deploy-elasticstack $(M)/prep-headnode $(M)/prep-computenode $(DEPLOY_OPENSTACK_PREREQS) |
| 269 | $(ANSIBLE_PB) $(PI)/deploy-openstack-playbook.yml $(LOGCMD) |
| 270 | touch $@ |
| 271 | |
| 272 | $(M)/deploy-computenode: | $(M)/deploy-openstack |
| 273 | $(ANSIBLE_PB) $(PI)/deploy-computenode-playbook.yml $(LOGCMD) |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 274 | touch $@ |
| 275 | |
Zack Williams | a5fcefd | 2017-07-27 22:06:33 -0700 | [diff] [blame] | 276 | $(M)/onos-debug: | $(M)/onboard-profile |
| 277 | $(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) $(PI)/onos-debug-playbook.yml" $(LOGCMD) |
| 278 | touch $@ |
| 279 | |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 280 | $(M)/onboard-openstack: | $(M)/deploy-computenode $(M)/glance-images $(M)/deploy-onos $(M)/onboard-profile |
| 281 | $(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) $(PI)/onboard-openstack-playbook.yml" $(LOGCMD) |
| 282 | touch $@ |
| 283 | |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 284 | |
| 285 | # Post-onboarding targets |
| 286 | $(M)/setup-automation: | $(M)/onboard-profile $(M)/deploy-onos $(SETUP_AUTOMATION_PREREQS) |
| 287 | $(ANSIBLE_PB) $(PI)/cord-automation-playbook.yml $(LOGCMD) |
| 288 | touch $@ |
| 289 | |
| 290 | |
| 291 | # Additional CiaB targets |
| 292 | $(M)/vagrant-up-switches: | $(M)/setup-automation |
| 293 | $(VAGRANT) up $(VAGRANT_SWITCHES) --provider $(VAGRANT_PROVIDER) $(LOGCMD) |
| 294 | touch $@ |
| 295 | |
| 296 | $(M)/setup-ciab-pcu: | $(M)/setup-automation |
| 297 | $(ANSIBLE_PB) $(MAAS)/setup-ciab-pcu.yml |
| 298 | touch $@ |
| 299 | |
| 300 | $(M)/compute%-up: | $(M)/setup-ciab-pcu $(M)/vagrant-up-switches |
| 301 | $(VAGRANT) up compute$* --provider $(VAGRANT_PROVIDER) $(LOGCMD) |
| 302 | $(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) ansible/maas-provision.yml --extra-vars='maas_user=maas vagrant_name=cord_compute$*'" $(LOGCMD) |
| 303 | touch $@ |
| 304 | |
| 305 | |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 306 | # Testing targets |
Andy Bavier | 35d238e | 2017-07-24 16:47:22 -0700 | [diff] [blame] | 307 | pod-test: $(M)/setup-automation collect-diag |
| 308 | $(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) $(PI)/pod-test-playbook.yml" $(LOGCMD) |
| 309 | |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 310 | |
| 311 | # Local Targets, bring up XOS containers without a VM |
Zack Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 312 | $(M)/local-cord-config: |
| 313 | $(ANSIBLE_PB) $(PI)/cord-config-playbook.yml $(LOGCMD) |
| 314 | touch $@ |
| 315 | |
| 316 | $(M)/local-docker-images: | $(M)/local-cord-config |
| 317 | $(IMAGEBUILDER) -f $(MASTER_CONFIG) -l $(BUILD)/image_logs -g $(BUILD)/ib_graph.dot -a $(BUILD)/ib_actions.yml $(LOGCMD) |
| 318 | touch $@ |
| 319 | |
| 320 | $(M)/local-core-image: | $(M)/local-docker-images |
| 321 | $(ANSIBLE_PB) $(PI)/build-core-image-playbook.yml $(LOGCMD) |
| 322 | touch $@ |
| 323 | |
| 324 | $(M)/local-start-xos: | $(M)/local-core-image |
| 325 | $(ANSIBLE_PB) $(PI)/start-xos-playbook.yml $(LOGCMD) |
| 326 | touch $@ |
| 327 | |
| 328 | $(M)/local-onboard-profile: | $(M)/local-start-xos |
| 329 | $(ANSIBLE_PB) $(PI)/onboard-profile-playbook.yml $(LOGCMD) |
| 330 | touch $@ |
| 331 | |