[CORD-1903]
Remove old build system
Change-Id: I2b75701a11d38f921d0e1d9082d8fa2c1a246240
diff --git a/build-images-playbook.yml b/build-images-playbook.yml
deleted file mode 100644
index 93f1e59..0000000
--- a/build-images-playbook.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# 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.
-
-
----
-# build-images-playbook.yml
-
-- name: Create XOS docker images
- hosts: localhost
- roles:
- - build-images
diff --git a/build-xos-playbook.yml b/build-xos-playbook.yml
deleted file mode 100644
index a6cc5f7..0000000
--- a/build-xos-playbook.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# 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.
-
-
----
-# build-xos-playbook.yml
-
-- name: Include vars
- hosts: localhost
- tasks:
- - name: Include variables
- include_vars: "{{ item }}"
- with_items:
- - "group_vars/all"
- - "../../build/platform-install/profile_manifests/{{ cord_profile }}.yml"
- - "../../build/platform-install/profile_manifests/local_vars.yml"
-
-- include: ../../orchestration/xos/build-images-playbook.yml
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index 66a0dff..0000000
--- a/build.gradle
+++ /dev/null
@@ -1,83 +0,0 @@
-
-/*
- * Copyright 2017-present Open Networking Foundation
-
- * 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.yaml.snakeyaml.Yaml
-
-ext {
-
- // 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'
-
- println "Using deployment config: $deployConfig"
- File configFile = new File(deployConfig)
- def yaml = new Yaml()
- config = yaml.load(configFile.newReader())
-
- // 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')
- : config.docker && config.docker.registry
- ? config.docker.registry
- : config.headnode.ip
- ? config.headnode.ip + ":5000"
- : 'localhost:5000'
-
- // The tag used to tag the docker images push to the target registry
- targetTag = project.hasProperty('targetTag')
- ? project.getProperty('targetTag')
- : config.docker && config.docker.imageVersion
- ? config.docker.imageVersion
- : 'candidate'
-}
-
-// Pull XOS images that exist on Docker Hub.
-// All images will get rebuilt during the buildImages step, but may at least
-// be able to use some intermediate images.
-task fetch(type: Exec) {
- executable = "ansible-playbook"
- args = [
- "--extra-vars", "@../../build/genconfig/config.yml",
- "--extra-vars", "build_docker_tag="+targetTag,
- "--extra-vars", "cord_dir=../..",
- "pull-xos-playbook.yml" ]
-}
-
-// Build all XOS images from source.
-task buildImages(type: Exec) {
- executable = "ansible-playbook"
- args = [
- "--extra-vars", "@../../build/genconfig/config.yml",
- "--extra-vars", "build_docker_tag="+targetTag,
- "--extra-vars", "cord_dir=../..",
- "build-xos-playbook.yml" ]
-}
-
-// Publish XOS images to the head node registry.
-task publish(type: Exec) {
- executable = "ansible-playbook"
- args = [ "-i", "../../build/genconfig/cord-inv",
- "--extra-vars", "@../../build/genconfig/config.yml",
- "--extra-vars", "build_docker_tag="+targetTag,
- "--extra-vars", "deploy_docker_tag="+targetTag,
- "--extra-vars", "deploy_docker_registry="+targetReg,
- "publish-xos-playbook.yml" ]
-}
diff --git a/group_vars/all b/group_vars/all
deleted file mode 100644
index 4dd0349..0000000
--- a/group_vars/all
+++ /dev/null
@@ -1,113 +0,0 @@
----
-# group_vars/all
-
-# Defaults for XOS container build and publish roles.
-# Can be overridden by variables in the profile manifest.
-
-# the path below is a hack, and going away soon
-build_cord_dir: "{{ playbook_dir ~ '/../..' }}"
-
-chameleon_dirs:
- - "{{ build_cord_dir }}/orchestration/xos/containers/chameleon/tmp.chameleon"
- - "{{ build_cord_dir }}/orchestration/xos/containers/xos/tmp.chameleon"
-
-docker_images:
- - name: "xosproject/xos-base"
- path: "{{ build_cord_dir }}/orchestration/xos/containers/xos"
- dockerfile: "Dockerfile.base"
- pull: False
- build: True
- publish: False
- - name: "xosproject/xos-postgres"
- path: "{{ build_cord_dir }}/orchestration/xos/containers/postgresql"
- dockerfile: "Dockerfile"
- pull: True
- publish: True
- - name: "xosproject/xos-libraries"
- path: "{{ build_cord_dir }}/orchestration/xos"
- dockerfile: "containers/xos/Dockerfile.libraries"
- pull: False
- publish: True
- - name: "xosproject/xos"
- path: "{{ build_cord_dir }}/orchestration/xos"
- dockerfile: "containers/xos/Dockerfile.xos"
- pull: False
- publish: True
- - name: "xosproject/chameleon"
- path: "{{ build_cord_dir }}/orchestration/xos/containers/chameleon"
- dockerfile: "Dockerfile.chameleon"
- pull: False
- publish: True
- - name: "xosproject/xos-client"
- path: "{{ build_cord_dir }}/orchestration/xos"
- dockerfile: "containers/xos/Dockerfile.client"
- pull: False
- publish: True
- - name: "xosproject/xos-synchronizer-base"
- path: "{{ build_cord_dir }}/orchestration/xos"
- dockerfile: "containers/xos/Dockerfile.synchronizer-base"
- pull: False
- publish: True
- - name: "xosproject/xos-ws"
- path: "{{ build_cord_dir }}/orchestration/xos-rest-gw" # TODO rename repo
- dockerfile: "Dockerfile"
- pull: False
- publish: True
- - name: "xosproject/xos-gui"
- path: "{{ build_cord_dir }}/orchestration/xos-gui"
- dockerfile: "Dockerfile"
- pull: False
- publish: True
- - name: "xosproject/xos-gui-extension-builder"
- path: "{{ build_cord_dir }}/orchestration/xos-gui/"
- dockerfile: "Dockerfile.xos-gui-extension-builder"
- pull: False
- publish: False
- - name: "xosproject/xos-corebuilder"
- path: "{{ build_cord_dir }}/orchestration/xos"
- dockerfile: "containers/xos/Dockerfile.corebuilder"
- pull: False
- publish: True
- - name: "nginx:latest"
- path: ""
- dockerfile: ""
- pull: True
- publish: False
- - name: "gliderlabs/consul-server:latest"
- path: ""
- dockerfile: ""
- pull: True
- publish: False
- - name: "gliderlabs/registrator:latest"
- path: ""
- dockerfile: ""
- pull: True
- publish: False
- - name: "xosproject/xos-tosca"
- path: "{{ build_cord_dir }}/orchestration/xos-tosca"
- dockerfile: "Dockerfile"
- pull: False
- publish: True
- - name: "node:7.9.0"
- path: ""
- dockerfile: ""
- pull: True
- publish: False
-
-build_optional_images: False
-
-docker_optional_images:
- - name: "xosproject/xos-test"
- dockerfile: "Dockerfile.test"
- pull: False
- publish: False
-
-build_docker_tag: "candidate"
-
-misc_docker_images: []
-
-enabled_gui_extensions: []
-
-frontend_only: False
-
-xos_services: []
diff --git a/publish-images-playbook.yml b/publish-images-playbook.yml
deleted file mode 100644
index 41119c9..0000000
--- a/publish-images-playbook.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# 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.
-
-
----
-# publish-xos-playbook.yml
-
-- name: Publish XOS docker images
- hosts: localhost
- roles:
- - publish-images
diff --git a/publish-xos-playbook.yml b/publish-xos-playbook.yml
deleted file mode 100644
index e4f261b..0000000
--- a/publish-xos-playbook.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# 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.
-
-
----
-# publish-xos-playbook.yml
-
-- name: Include vars
- hosts: localhost
- tasks:
- - name: Include variables
- include_vars: "{{ item }}"
- with_items:
- - "group_vars/all"
- - "../../build/platform-install/profile_manifests/{{ cord_profile }}.yml"
- - "../../build/platform-install/profile_manifests/local_vars.yml"
-
-- include: ../../orchestration/xos/publish-images-playbook.yml
diff --git a/pull-images-playbook.yml b/pull-images-playbook.yml
deleted file mode 100644
index 2727898..0000000
--- a/pull-images-playbook.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# 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.
-
-
----
-# pull-images-playbook.yml
-
-- name: Create XOS docker images
- hosts: localhost
- roles:
- - pull-images
diff --git a/pull-xos-playbook.yml b/pull-xos-playbook.yml
deleted file mode 100644
index 5b93867..0000000
--- a/pull-xos-playbook.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# 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.
-
-
-
----
-# pull-xos-playbook.yml
-
-- name: Include vars
- hosts: localhost
- tasks:
- - name: Include variables
- include_vars: "{{ item }}"
- with_items:
- - "group_vars/all"
- - "../../build/platform-install/profile_manifests/{{ cord_profile }}.yml"
- - "../../build/platform-install/profile_manifests/local_vars.yml"
-
-- include: ../../orchestration/xos/pull-images-playbook.yml
diff --git a/roles/build-images/tasks/main.yml b/roles/build-images/tasks/main.yml
deleted file mode 100644
index 212d567..0000000
--- a/roles/build-images/tasks/main.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# 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.
-
-
----
-# build-images/tasks/main.yml
-
-- name: Clean up chameleon temp directory
- file:
- path: "{{ build_cord_dir }}/orchestration/xos/containers/chameleon/tmp.chameleon"
- state: absent
- with_items: "{{ chameleon_dirs }}"
-
-- name: Populate chameleon temp directory
- shell: cp -a "{{ build_cord_dir }}/component/chameleon" "{{ item }}"
- with_items: "{{ chameleon_dirs }}"
- tags:
- - skip_ansible_lint # docker can't access files outside of build context, so we must copy
-
-# If an image was previously pulled it won't get built
-- name: Build images
- docker_image:
- name: "{{ item.name }}"
- path: "{{ item.path }}"
- tag: "{{ build_docker_tag }}"
- dockerfile: "{{ item.dockerfile }}"
- pull: False
- force: True
- with_items: "{{ docker_images }}"
- when: "{{ item.build | default(True) }}"
-
-- name: Build optional images
- docker_image:
- name: "{{ item.name }}"
- path: "{{ item.path }}"
- tag: "{{ build_docker_tag }}"
- dockerfile: "{{ item.dockerfile }}"
- pull: False
- force: True
- with_items: "{{ docker_optional_images }}"
- when: build_optional_images
-
-# Build extensions images
-- name: Build xos-gui-extensions docker images
- docker_image:
- name: "xosproject/gui-extension-{{ item.name }}"
- path: "{{ build_cord_dir }}/{{ item.path }}"
- tag: "{{ build_docker_tag }}"
- pull: False
- force: True
- with_items: "{{ enabled_gui_extensions }}"
-
-# Build synchronizer images
-- name: Build synchronizer docker images
- docker_image:
- name: "xosproject/{{ item.name }}-synchronizer"
- path: "{{ build_cord_dir }}/{{ item.path }}/xos/synchronizer"
- dockerfile: "Dockerfile.synchronizer"
- tag: "{{ build_docker_tag }}"
- pull: False
- force: True
- with_items: "{{ xos_services }}"
- when: not frontend_only and (item.synchronizer is not defined or item.synchronizer)
diff --git a/roles/publish-images/tasks/main.yml b/roles/publish-images/tasks/main.yml
deleted file mode 100644
index 52b95e0..0000000
--- a/roles/publish-images/tasks/main.yml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# 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.
-
-
----
-# publish-xos-docker-images/tasks/main.yml
-
-# Remove the old local images to force them to be re-pushed
-- name: Remove old local XOS images
- docker_image:
- name: "{{ deploy_docker_registry }}/{{ item.name }}:{{ deploy_docker_tag }}"
- state: absent
- with_items: "{{ docker_images | selectattr('publish') | list }}"
-
-- name: Tag and push locally built images to docker registry
- docker_image:
- name: "{{ item.name }}:{{ deploy_docker_tag }}"
- repository: "{{ deploy_docker_registry }}/{{ item.name }}:{{ deploy_docker_tag }}"
- push: True
- with_items: "{{ docker_images | selectattr('publish') | list }}"
-
-# Remove the old local images to force them to be re-pushed
-- name: Remove old local XOS GUI extension images
- docker_image:
- name: "{{ deploy_docker_registry }}/xosproject/gui-extension-{{ item.name }}:{{ deploy_docker_tag }}"
- state: absent
- with_items: "{{ enabled_gui_extensions }}"
-
-- name: Tag and push locally built images to docker registry
- docker_image:
- name: "xosproject/gui-extension-{{ item.name }}:{{ deploy_docker_tag }}"
- repository: "{{ deploy_docker_registry }}/xosproject/gui-extension-{{ item.name }}:{{ deploy_docker_tag }}"
- push: True
- with_items: "{{ enabled_gui_extensions }}"
-
-# Remove the old local images to force them to be re-pushed
-- name: Remove old local synchronizer images
- docker_image:
- name: "{{ deploy_docker_registry }}/xosproject/{{ item.name }}-synchronizer:{{ deploy_docker_tag }}"
- state: absent
- with_items: "{{ xos_services }}"
-
-- name: Tag and push locally built synchronizer images to docker registry
- docker_image:
- name: "xosproject/{{ item.name }}-synchronizer:{{ deploy_docker_tag }}"
- repository: "{{ deploy_docker_registry }}/xosproject/{{ item.name }}-synchronizer:{{ deploy_docker_tag }}"
- push: True
- with_items: "{{ xos_services }}"
- when: not frontend_only and (item.synchronizer is not defined or item.synchronizer)
-
-# Remove the old local images to force them to be re-pushed
-- name: Remove old local miscellaneous images
- docker_image:
- name: "{{ deploy_docker_registry }}/{{ item }}"
- state: absent
- with_items: "{{ misc_docker_images }}"
-
-# Just needed for onboarding, will go away
-- name: Tag and push miscellaneous images
- docker_image:
- name: "{{ item }}"
- repository: "{{ deploy_docker_registry }}/{{ item }}"
- push: True
- with_items: "{{ misc_docker_images }}"
diff --git a/roles/pull-images/tasks/main.yml b/roles/pull-images/tasks/main.yml
deleted file mode 100644
index 688c2d2..0000000
--- a/roles/pull-images/tasks/main.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# 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.
-
-
----
-# pull-images/tasks/main.yml
-
-- name: Pull latest versions of images if not present
- docker_image:
- name: "{{ item.name }}"
- repository: "{{ item.name }}:{{ build_docker_tag }}"
- force: True
- with_items: "{{ docker_images | selectattr('pull') | list }}"