diff --git a/containers/xos/Dockerfile.UI b/containers/xos/Dockerfile.UI
index 03930d3..71c95e3 100644
--- a/containers/xos/Dockerfile.UI
+++ b/containers/xos/Dockerfile.UI
@@ -19,7 +19,7 @@
 
 # Label image
 ARG org_label_schema_schema_version=1.0
-ARG org_label_schema_name=xos-corebuilder
+ARG org_label_schema_name=xos-ui
 ARG org_label_schema_version=unknown
 ARG org_label_schema_vcs_url=unknown
 ARG org_label_schema_vcs_ref=unknown
diff --git a/containers/xos/Dockerfile.corebuilder b/containers/xos/Dockerfile.corebuilder
deleted file mode 100644
index 0e1d0fc..0000000
--- a/containers/xos/Dockerfile.corebuilder
+++ /dev/null
@@ -1,46 +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.
-
-
-# xosproject/xos-corebuilder
-FROM xosproject/xos-libraries:candidate
-
-# Label image
-ARG org_label_schema_schema_version=1.0
-ARG org_label_schema_name=xos-corebuilder
-ARG org_label_schema_version=unknown
-ARG org_label_schema_vcs_url=unknown
-ARG org_label_schema_vcs_ref=unknown
-ARG org_label_schema_build_date=unknown
-ARG org_opencord_vcs_commit_date=unknown
-
-LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
-      org.label-schema.name=$org_label_schema_name \
-      org.label-schema.version=$org_label_schema_version \
-      org.label-schema.vcs-url=$org_label_schema_vcs_url \
-      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
-      org.label-schema.build-date=$org_label_schema_build_date \
-      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
-
-ENV HOME /root
-WORKDIR /opt/xos/tools/corebuilder
-
-# Install the corebuilder tools and the tosca custom_types that it needs
-ADD xos/tools/corebuilder /opt/xos/tools/corebuilder
-ADD xos/tosca/custom_types /opt/xos/tools/corebuilder/custom_types
-
-ENTRYPOINT ["/usr/bin/python", "corebuilder.py"]
-# CMD sleep 86400
-
diff --git a/containers/xos/Makefile b/containers/xos/Makefile
deleted file mode 100644
index b776456..0000000
--- a/containers/xos/Makefile
+++ /dev/null
@@ -1,89 +0,0 @@
-# Docker container Makefile for XOS
-#
-# Targets:
-#
-#  `base`   - XOS prerequistie files, no XOS code, builds xosproject/xos-base
-#  `build`  - base + XOS code, git pulled in Dockerfile from main repo,
-#             builds xosproject/xos
-#  `custom` - base + XOS code, git pulled in Dockerfile from selectable repo,
-#             builds xosproject/xos
-#  `devel`  - base + XOS code from local directory, builds xosproject/xos
-#  `test`   - xosproject/xos + nodejs testing frameworks, builds
-#             xosproject/xos-test
-#
-
-NO_DOCKER_CACHE    ?= false
-
-CONTAINER_NAME     ?= xos-server
-IMAGE_NAME         ?= xosproject/xos
-
-XOS_GIT_REPO       ?= https://github.com/opencord/xos.git
-XOS_GIT_BRANCH     ?= master
-
-XOS_GIT_COMMIT_HASH     ?= $(shell git log --pretty=format:'%H' -n 1 || echo -n "unknown" )
-XOS_GIT_COMMIT_DATE     ?= $(shell git log --pretty=format:'%ad' -n 1 || echo -n "unknown" )
-
-TOSCA_CONFIG_PATH  ?= /opt/xos/configurations/opencloud/opencloud.yaml
-
-BUILD_ARGS =
-ifdef http_proxy
-BUILD_ARGS += --build-arg http_proxy=${http_proxy}
-endif
-ifdef https_proxy
-BUILD_ARGS += --build-arg https_proxy=${https_proxy}
-endif
-
-base:
-	sudo docker build --no-cache=${NO_DOCKER_CACHE} --rm \
-	-f Dockerfile.base -t xosproject/xos-base ${BUILD_ARGS} .
-
-test:
-	sudo docker build --no-cache=${NO_DOCKER_CACHE} --rm \
-	-f Dockerfile.test -t xosproject/xos-test ${BUILD_ARGS} ../..
-
-client:
-	rm -rf tmp.chameleon
-	cp -R /opt/cord/component/chameleon tmp.chameleon
-	sudo docker build --no-cache=${NO_DOCKER_CACHE} --rm \
-	--build-arg XOS_GIT_COMMIT_HASH="${XOS_GIT_COMMIT_HASH}" \
-	--build-arg XOS_GIT_COMMIT_DATE="${XOS_GIT_COMMIT_DATE}" \
-	-f Dockerfile.client -t xosproject/xos-client ${BUILD_ARGS} ../..
-	rm -rf tmp.chameleon
-	docker tag xosproject/xos-client:latest xosproject/xos-client:candidate
-
-corebuilder:
-	sudo docker build  --no-cache=${NO_DOCKER_CACHE} --rm \
-        --build-arg XOS_GIT_COMMIT_HASH="${XOS_GIT_COMMIT_HASH}" \
-        --build-arg XOS_GIT_COMMIT_DATE="${XOS_GIT_COMMIT_DATE}" \
-        -f Dockerfile.corebuilder -t xosproject/xos-corebuilder ${BUILD_ARGS} ../..
-	docker tag xosproject/xos-corebuilder:latest xosproject/xos-corebuilder:candidate
-
-ui:
-	sudo docker build  --no-cache=${NO_DOCKER_CACHE} --rm \
-	--build-arg XOS_GIT_COMMIT_HASH="${XOS_GIT_COMMIT_HASH}" \
-	--build-arg XOS_GIT_COMMIT_DATE="${XOS_GIT_COMMIT_DATE}" \
-	-f Dockerfile.UI -t xosproject/xos-ui ${BUILD_ARGS} ../..
-	docker tag xosproject/xos-ui:latest xosproject/xos-ui:candidate
-
-synchronizer-base: 
-	sudo docker build --no-cache=${NO_DOCKER_CACHE} --rm \
-	-f Dockerfile.synchronizer-base -t xosproject/xos-synchronizer-base ${BUILD_ARGS} ../..
-	docker tag xosproject/xos-synchronizer-base:latest xosproject/xos-synchronizer-base:candidate
-
-run:
-	sudo docker run -d --name ${CONTAINER_NAME} -p 80:8000 \
-	${IMAGE_NAME}
-
-runtosca:
-	sudo docker exec -it ${CONTAINER_NAME} \
-  /usr/bin/python /opt/xos/tosca/run.py padmin@vicci.org ${TOSCA_CONFIG_PATH}
-
-stop:
-	sudo docker stop ${CONTAINER_NAME}
-
-rm:
-	sudo docker rm ${CONTAINER_NAME}
-
-rmi:
-	sudo docker rmi `docker images | grep "^<none>" | awk '{print $$3}'`
-
diff --git a/xos/tools/corebuilder/README.md b/xos/tools/corebuilder/README.md
deleted file mode 100644
index 0813fcc..0000000
--- a/xos/tools/corebuilder/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Corebuilder #
-
-Corebuilder is a build tool that is used to aid in generating the `xosproject/xos-ui` container image from the `xosproject/xos` container image. It does this by creating a `BUILD` tree that can be used to layer models and other files on top of the code base that is present in `xosproject/xos`. It's intended that corebuilder is run once to generate the BUILD tree, and then docker is run to generate the `xosproject/xos-ui` container image.  
-
-TODO: Say something about how Corebuilder integrates xproto here.
-
-## Running Corebuilder ##
-
-Corebuilder is usually containerized and run from inside its container. See `Dockerfile.corebuilder` in `containers/xos` for reference on how the Corebuilder container is built. Running the corebuilder container usually requires a few docker volume mounts be used. For example, to run from the CORD dev node:
-
-    docker run -it --rm -v /cord:/opt/cord -v /cord//orchestration/xos/containers/xos/BUILD:/opt/xos_corebuilder/BUILD /bin/bash docker-registry:5000/xosproject/xos-corebuilder:candidate <list of onboarding recipe pathnames>
-
-In a typical CORD build, Corebuilder will be run automatically by the `xos-core-build` role of `platform-install`. 
-
-## Running Unit Tests ##
-
-The corebuilder container image includes the dependencies necessary to run the tool. If this container image is constructed, then the unit tests may be run as follows:
-
-    docker run -it --rm --entrypoint python docker-registry:5000/xosproject/xos-corebuilder:candidate ./corebuilder_test.py
-
-If the container image is not available, then the local environment can be setup to run the unit test directly.
-
-1. Install the necessary python pip dependencies. See `containers/xos/pip_requirements.txt` for reference. At minimum, `tosca-parser==0.7.0` should be installed.
-2. Create a directory, `custom_types` in the directory where `corebuilder_test.py` is to be run from.
-3. Copy the contents of `xos/tosca/custom_types` to the `custom_types` directory created in step 2.
-4. Execute `corebuilder_test.py`
-
-
diff --git a/xos/tools/corebuilder/corebuilder.py b/xos/tools/corebuilder/corebuilder.py
deleted file mode 100644
index 065d4a7..0000000
--- a/xos/tools/corebuilder/corebuilder.py
+++ /dev/null
@@ -1,416 +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.
-
-
-#!/usr/bin/python
-
-from stat import *
-
-""" CoreBuilder
-
-    Read XOS Tosca Onboarding Recipes and generate a BUILD directory.
-
-    Arguments:
-        A list of onboarding recipes. Except this list to originate from
-        platform-install's service inventory in the profile manifest.
-
-    Output:
-        /opt/xos_corebuilder/BUILD, populated with files from services
-
-    Example:
-        # for testing, run from inside a UI container
-        python ./corebuilder.py \
-            /opt/xos_services/olt-service/xos/volt-onboard.yaml \
-            /opt/xos_services/vtn-service/xos/vtn-onboard.yaml \
-            /opt/xos_services/openstack/xos/openstack-onboard.yaml \
-            /opt/xos_services/onos-service/xos/onos-onboard.yaml \
-            /opt/xos_services/vrouter/xos/vrouter-onboard.yaml \
-            /opt/xos_services/vsg/xos/vsg-onboard.yaml \
-            /opt/xos_services/vtr/xos/vtr-onboard.yaml \
-            /opt/xos_services/fabric/xos/fabric-onboard.yaml \
-            /opt/xos_services/exampleservice/xos/exampleservice-onboard.yaml \
-            /opt/xos_services/monitoring/xos/monitoring-onboard.yaml \
-            /opt/xos_libraries/ng-xos-lib/ng-xos-lib-onboard.yaml
-
-        # (hypothetical) run from build container
-        python ./corebuilder.py \
-            /opt/cord/orchestration/xos_services/olt-service/xos/volt-onboard.yaml \
-            /opt/cord/orchestration/xos_services/vtn-service/xos/vtn-onboard.yaml \
-            /opt/cord/orchestration/xos_services/openstack/xos/openstack-onboard.yaml \
-            /opt/cord/orchestration/xos_services/onos-service/xos/onos-onboard.yaml \
-            /opt/cord/orchestration/xos_services/vrouter/xos/vrouter-onboard.yaml \
-            /opt/cord/orchestration/xos_services/vsg/xos/vsg-onboard.yaml \
-            /opt/cord/orchestration/xos_services/vtr/xos/vtr-onboard.yaml \
-            /opt/cord/orchestration/xos_services/fabric/xos/fabric-onboard.yaml \
-            /opt/cord/orchestration/xos_services/exampleservice/xos/exampleservice-onboard.yaml \
-            /opt/cord/orchestration/xos_services/monitoring/xos/monitoring-onboard.yaml \
-            /opt/cord/orchestration/xos_libraries/ng-xos-lib/ng-xos-lib-onboard.yaml
-"""
-
-import argparse
-import os
-import pdb
-import shutil
-import sys
-import tempfile
-import traceback
-import urlparse
-from xosgenx.generator import XOSProcessor
-from toscaparser.tosca_template import ToscaTemplate
-
-BUILD_DIR = "/opt/xos_corebuilder/BUILD"
-
-def makedirs_if_noexist(pathname):
-    if not os.path.exists(pathname):
-        os.makedirs(pathname)
-
-class CoreBuilderException(Exception):
-    pass
-
-class CoreBuilderMissingRecipeException(CoreBuilderException):
-    pass
-
-class CoreBuilderMalformedValueException(CoreBuilderException):
-    pass
-
-class CoreBuilderMalformedUrlException(CoreBuilderException):
-    pass
-
-class CoreBuilderMissingResourceException(CoreBuilderException):
-    pass
-
-class CoreBuilderUnknownResourceException(CoreBuilderException):
-    pass
-
-class XOSCoreBuilder(object):
-    def __init__(self, recipe_list, parent_dir=None):
-        # TOSCA will look for imports using a relative path from where the
-        # template file is located, so we have to put the template file
-        # in a specific place.
-        if not parent_dir:
-            parent_dir = os.getcwd()
-
-        self.parent_dir = parent_dir
-
-        # list of resources in the form (src_fn, dest_fn)
-        self.resources = []
-
-        # list of __init__.py files that should be ensured
-        self.inits = []
-
-        self.app_names = []
-
-        for recipe in recipe_list:
-            if not os.path.exists(recipe):
-                raise CoreBuilderMissingRecipeException("Onboarding Recipe %s does not exist" % recipe)
-            tosca_yaml = open(recipe).read()
-            self.execute_recipe(tosca_yaml)
-
-    def get_property_default(self, nodetemplate, name, default=None):
-        props = nodetemplate.get_properties()
-        if props and name in props.keys():
-            return props[name].value
-        return default
-
-    def get_dest_dir(self, kind, service_name):
-        xos_base = "opt/xos"
-        if service_name!='core':
-            service_subdir = 'services'
-        else:
-            service_subdir = ''
-
-        base_dirs = {"models": "%s/services/%s/" % (xos_base, service_name),
-                     "xproto": "%s/%s/%s/" % (xos_base, service_subdir, service_name),
-                     "admin": "%s/services/%s/" % (xos_base, service_name),
-                     "admin_template": "%s/services/%s/templates/" % (xos_base, service_name),
-                     "django_library": "%s/services/%s/" % (xos_base, service_name),
-                     "synchronizer": "%s/synchronizers/%s/" % (xos_base, service_name),
-                     "tosca_custom_types": "%s/tosca/custom_types/" % (xos_base),
-                     "tosca_resource": "%s/tosca/resources/" % (xos_base),
-                     "rest_service": "%s/api/service/" % (xos_base),
-                     "rest_tenant": "%s/api/tenant/" % (xos_base),
-                     "private_key": "%s/services/%s/keys/" % (xos_base, service_name),
-                     "public_key": "%s/services/%s/keys/" % (xos_base, service_name),
-                     "vendor_js": "%s/core/xoslib/static/vendor/" % (xos_base)}
-
-        dest_dir = base_dirs[kind]
-
-        return dest_dir
-
-    def fixup_path(self, fn):
-        """ This is to maintain compatibility with the legacy Onboarding
-            synchronizer and recipes, which has some oddly-named directories
-        """
-
-#        if fn.startswith("/opt/xos/key_import"):
-#            fn = "/opt/cord_profile/key_import" + fn[19:]
-
-        fixups = ( ("/opt/xos_services/", "/opt/cord/orchestration/xos_services/"),
-                   ("/opt/xos/core/", "/opt/cord/orchestration/xos/xos/core/"),
-                   ("/opt/xos_libraries/", "/opt/cord/orchestration/xos_libraries/") )
-
-        for (pattern, replace) in fixups:
-            if fn.startswith(pattern):
-                fn = replace + fn[len(pattern):]
-
-        return fn
-
-    def execute_recipe(self, tosca_yaml):
-        tmp_pathname = None
-        try:
-            (tmp_handle, tmp_pathname) = tempfile.mkstemp(dir=self.parent_dir, suffix=".yaml")
-            os.write(tmp_handle, tosca_yaml)
-            os.close(tmp_handle)
-
-            template = ToscaTemplate(tmp_pathname)
-        except:
-            traceback.print_exc()
-            raise
-        finally:
-            if tmp_pathname:
-                os.remove(tmp_pathname)
-
-        # Only one model (ServiceController aka Library), so no need to sort
-        # dependencies...
-
-        for nodetemplate in template.nodetemplates:
-            self.execute_nodetemplate(nodetemplate)
-
-    def execute_nodetemplate(self, nodetemplate):
-        if nodetemplate.type == "tosca.nodes.ServiceController":
-            self.execute_servicecontroller(nodetemplate)
-        elif nodetemplate.type == "tosca.nodes.Library":
-            # Library works just like ServiceController
-            self.execute_servicecontroller(nodetemplate)
-        else:
-            raise CoreBuilderUnknownResourceException("Nodetemplate %s's type %s is not a known resource" % (nodetemplate.name, nodetemplate.type))
-
-    def execute_servicecontroller(self, nodetemplate):
-        service_name = nodetemplate.name
-        if "#" in service_name:
-            service_name = service_name.split("#")[1]
-
-        base = self.get_property_default(nodetemplate, "base_url", None)
-
-        copyin_resources = ("xproto", "models", "admin", "admin_template", "django_library", "tosca_custom_types", "tosca_resource",
-                            "rest_service", "rest_tenant", "private_key", "public_key", "vendor_js")
-
-        for k in copyin_resources:
-            v = self.get_property_default(nodetemplate, k, None)
-            if not v:
-                continue
-
-            # Private keys should not be installed to core, only synchronizers
-            if (k=="private_key"):
-                continue
-
-            # Public keys should be volume mounted in /opt/cord_profile
-            if (k=="public_key"):
-                continue
-
-            # TOSCA custom types and custom resources have been deprecated by the new engine
-            if (k == "tosca_custom_types" or k == "tosca_resource"):
-                print 'Custom TOSCA definition are not allowed anymore, please remove them from service %s on resource %s and filename %s' % (service_name, k, v)
-                continue
-
-            # If the ServiceController has models, then add it to the list of
-            # django apps.
-            if (k in ["models","xproto"] and service_name!="core"):
-                self.app_names.append(service_name)
-
-            # filenames can be comma-separated
-            for src_fn in v.split(","):
-                src_fn = src_fn.strip()
-
-                # parse the "subdirectory:name" syntax
-                subdirectory = ""
-                if (" " in src_fn):
-                    parts=src_fn.split()
-                    for part in parts[:-1]:
-                       if ":" in part:
-                           (lhs, rhs) = part.split(":", 1)
-                           if lhs=="subdirectory":
-                               subdirectory=rhs
-                           else:
-                               raise CoreBuilderMalformedValueException("Malformed value %s in resource %s of recipe %s" % (v, k, nodetemplate.name))
-                       else:
-                           raise CoreBuilderMalformedValueException("Malformed value %s in resource %s of recipe %s" % (v, k, nodetemplate.name))
-                    src_fn = parts[-1]
-
-                # apply base_url to src_fn
-                if base:
-                    src_fn = urlparse.urljoin(base, src_fn)
-
-                # ensure that it's a file:// url
-                if not src_fn.startswith("file://"):
-                    raise CoreBuilderMalformedUrlException("Resource `%s: %s` of recipe %s does not start with file://" % (k, src_fn, nodetemplate.name))
-                src_fn = src_fn[7:]
-
-                src_fn = self.fixup_path(src_fn)
-
-                if not os.path.exists(src_fn):
-                    raise CoreBuilderMissingResourceException("Resource '%s: %s' of recipe %s does not exist" % (k, src_fn, nodetemplate.name))
-
-                dest_dir = self.get_dest_dir(k, service_name)
-                dest_fn = os.path.join(dest_dir, subdirectory, os.path.basename(src_fn))
-
-                self.resources.append( (k, src_fn, dest_fn, service_name) )
-
-                # Add __init__.py files anywhere that we created a new
-                # directory.
-                # NOTE: omitting core, out of concern it could interfere with
-                #       core's __init__.py file.
-
-                if ((k in ["admin", "models", "rest_service", "rest_tenant", "xproto"]) and (service_name!="core")):
-                    if dest_dir not in self.inits:
-                        self.inits.append(dest_dir)
-
-                    if subdirectory:
-                        dir = dest_dir
-                        for part in subdirectory.split("/"):
-                            dir = os.path.join(dir, part)
-                            if dir not in self.inits:
-                                self.inits.append(dir)
-
-    def build(self):
-        # Destroy anything in the old build directory
-        if os.path.exists(BUILD_DIR):
-            for dir in os.listdir(BUILD_DIR):
-                shutil.rmtree(os.path.join(BUILD_DIR, dir))
-
-        # Copy all of the resources into the build directory
-        for (kind, src_fn, dest_fn, service_name) in self.resources:
-
-            build_dest_fn = os.path.join(BUILD_DIR, dest_fn)
-            makedirs_if_noexist(os.path.dirname(build_dest_fn))
-
-            if (os.path.isdir(src_fn)):
-                if (not os.path.isdir(build_dest_fn)):
-                    shutil.copytree(src_fn, build_dest_fn, symlinks=True)
-                else:
-                    os.system(
-                        'cp -R %(src_fn)s/*.xproto %(src_fn)s/attic %(src_fn)s/models.py %(src_fn)s/*header.py %(build_dst_fn)s 2> /dev/null || :' % {
-                            'src_fn': src_fn, 'build_dst_fn': build_dest_fn})
-            else:
-                shutil.copyfile(src_fn, build_dest_fn)
-
-            if (kind == 'xproto'):
-                xprotos =  [f for f in os.listdir(src_fn) if f.endswith('xproto')]
-
-                file_list = []
-                for x in xprotos:
-                    file_list.append(os.path.join(src_fn, x))
-
-                try:
-                    class Args:
-                        pass
-                    # Generate models
-                    is_service = service_name != 'core'
-
-                    args = Args()
-                    args.output = build_dest_fn
-                    args.attic = src_fn + '/attic'
-                    args.files = file_list
-
-                    if is_service:
-                        args.target = 'service.xtarget'
-                        args.write_to_file = 'target'
-                    else:
-                        args.target = 'django.xtarget'
-                        args.dest_extension = 'py'
-                        args.write_to_file = 'model'
-
-                    XOSProcessor.process(args)
-
-                    # Generate security checks
-                    class SecurityArgs:
-                        output = build_dest_fn
-                        target = 'django-security.xtarget'
-                        dest_file = 'security.py'
-                        write_to_file = 'single'
-                        files = file_list
-
-                    XOSProcessor.process(SecurityArgs())
-
-                    # Generate __init__.py
-                    if service_name == "core":
-                        class InitArgs:
-                            output = build_dest_fn
-                            target = 'init.xtarget'
-                            dest_file = '__init__.py'
-                            write_to_file = 'single'
-                            files = file_list
-
-                        XOSProcessor.process(InitArgs())
-
-                except Exception, e:
-                    print 'xproto build failed.'
-                    raise e
-
-
-        # Create the __init__.py files
-        for fn in self.inits:
-            build_dest_fn = os.path.join(BUILD_DIR, fn, "__init__.py")
-            makedirs_if_noexist(os.path.dirname(build_dest_fn))
-            file(build_dest_fn, "w").write("")
-
-        # Generate the migration list
-        mig_list_fn = os.path.join(BUILD_DIR, "opt/xos/xos", "xosbuilder_migration_list")
-        makedirs_if_noexist(os.path.dirname(mig_list_fn))
-        file(mig_list_fn, "w").write("\n".join(self.app_names)+"\n")
-
-        # Generate the app list
-        app_list_fn = os.path.join(BUILD_DIR, "opt/xos/xos", "xosbuilder_app_list")
-        makedirs_if_noexist(os.path.dirname(app_list_fn))
-        file(app_list_fn, "w").write("\n".join(["services.%s" % x for x in self.app_names])+"\n")
-
-def parse_args():
-    parser = argparse.ArgumentParser()
-
-    _help = 'enable verbose logging'
-    parser.add_argument('-v', '--verbose',
-                        dest='verbose',
-                        action='store_true',
-                        default=False,
-                        help=_help)
-
-    _help = 'list of onboarding recipe filenames'
-    parser.add_argument('recipe_names',
-                        metavar="RECIPE",
-                        nargs='+',
-                        help=_help)
-
-    args = parser.parse_args()
-
-    return args
-
-def main():
-   global options
-
-   options = parse_args()
-
-   try:
-       builder = XOSCoreBuilder(options.recipe_names)
-       builder.build()
-   except CoreBuilderException, e:
-       if options.verbose:
-           traceback.print_exc()
-       else:
-           print >> sys.stderr, "Error:", str(e)
-       sys.exit(-1)
-
-if __name__ == "__main__":
-    main()
-
diff --git a/xos/tools/corebuilder/corebuilder_test.py b/xos/tools/corebuilder/corebuilder_test.py
deleted file mode 100644
index c616170..0000000
--- a/xos/tools/corebuilder/corebuilder_test.py
+++ /dev/null
@@ -1,173 +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 shutil
-import unittest
-from corebuilder import *
-
-class TestCoreBuilder(unittest.TestCase):
-    def setUp(self):
-        if not os.path.exists("/tmp/fake_library"):
-            os.mkdir("/tmp/fake_library")
-        file("/tmp/fake_library/fake.js","w").write("stuff")
-
-    def tearDown(self):
-        if os.path.exists("/tmp/fake_library"):
-           shutil.rmtree("/tmp/fake_library")
-        if os.path.exists("/opt/xos_corebuilder/BUILD/opt"):
-           shutil.rmtree("/opt/xos_corebuilder/BUILD/opt")
-        if os.path.exists("/tmp/recipe"):
-           os.remove("/tmp/recipe")
-
-    #--------------------------------------------------------------------------
-    # test_XOSCoreBuilder_init
-    #--------------------------------------------------------------------------
-
-    def test_XOSCoreBuilder_init(self):
-        recipe = \
-"""tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Onboard fake library
-
-imports:
-   - custom_types/xos.yaml
-
-topology_template:
-  node_templates:
-    library#fake:
-      type: tosca.nodes.Library
-      properties:
-          base_url: file:///tmp/fake_library/
-          vendor_js: fake.js
-"""
-        file("/tmp/recipe", "w").write(recipe)
-
-        CoreBuilderMissingResourceException(XOSCoreBuilder, ["/tmp/recipe"])
-
-    #--------------------------------------------------------------------------
-    # test_bad_recipe_name
-    #--------------------------------------------------------------------------
-
-    def test_bad_recipe_name(self):
-        self.assertRaises(CoreBuilderMissingRecipeException,
-                          XOSCoreBuilder,
-                          ["/tmp/does_not_exit"])
-
-    #--------------------------------------------------------------------------
-    # test_missing_resource
-    #--------------------------------------------------------------------------
-
-    def test_missing_resource(self):
-        recipe = \
-"""tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Onboard fake library
-
-imports:
-   - custom_types/xos.yaml
-
-topology_template:
-  node_templates:
-    library#fake:
-      type: tosca.nodes.Library
-      properties:
-          base_url: file:///tmp/fake_library/
-          vendor_js: missing_fake.js
-"""
-        file("/tmp/recipe", "w").write(recipe)
-        self.assertRaises(CoreBuilderMissingResourceException,
-                          XOSCoreBuilder,
-                          ["/tmp/recipe"])
-
-    #--------------------------------------------------------------------------
-    # test_malformed_url
-    #--------------------------------------------------------------------------
-
-    def test_malformed_url(self):
-        recipe = \
-"""tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Onboard fake library
-
-imports:
-   - custom_types/xos.yaml
-
-topology_template:
-  node_templates:
-    library#fake:
-      type: tosca.nodes.Library
-      properties:
-          base_url: http:///tmp/fake_library/
-          vendor_js: fake.js
-"""
-        file("/tmp/recipe", "w").write(recipe)
-        self.assertRaises(CoreBuilderMalformedUrlException,
-                          XOSCoreBuilder,
-                          ["/tmp/recipe"])
-
-    #--------------------------------------------------------------------------
-    # test_malformed_value
-    #--------------------------------------------------------------------------
-
-    def test_malformed_value(self):
-        recipe = \
-"""tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Onboard fake library
-
-imports:
-   - custom_types/xos.yaml
-
-topology_template:
-  node_templates:
-    library#fake:
-      type: tosca.nodes.Library
-      properties:
-          base_url: file:///tmp/fake_library/
-          vendor_js: badvalue=bad fake.js
-"""
-        file("/tmp/recipe", "w").write(recipe)
-        self.assertRaises(CoreBuilderMalformedValueException,
-                          XOSCoreBuilder,
-                          ["/tmp/recipe"])
-
-    #--------------------------------------------------------------------------
-    # test_unknown_resource
-    #--------------------------------------------------------------------------
-
-    def test_unknown_resource(self):
-        recipe = \
-"""tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Onboard fake library
-
-imports:
-   - custom_types/xos.yaml
-
-topology_template:
-  node_templates:
-    library#fake:
-      type: tosca.nodes.Slice
-"""
-        file("/tmp/recipe", "w").write(recipe)
-        self.assertRaises(CoreBuilderUnknownResourceException,
-                          XOSCoreBuilder,
-                          ["/tmp/recipe"])
-
-if __name__ == '__main__':
-    unittest.main()
-
-
diff --git a/xos/tools/corebuilder/headnode_corebuilder b/xos/tools/corebuilder/headnode_corebuilder
deleted file mode 100644
index f3ffecf..0000000
--- a/xos/tools/corebuilder/headnode_corebuilder
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/bash
-
-# Runs the corebuilder tools from inside the xosproject/corebuilder container
-# This script is setup to be run from the headnode, using paths based in /opt/cord 
-
-docker run -it -v /opt/cord:/opt/cord:ro -v /opt/cord/orchestration/xos/containers/xos/BUILD:/opt/xos_corebuilder/BUILD xosproject/xos-corebuilder:candidate $@
