diff --git a/xos/onboard/README.md b/xos/onboard/README.md
new file mode 100644
index 0000000..2030708
--- /dev/null
+++ b/xos/onboard/README.md
@@ -0,0 +1,3 @@
+This directory is a temporary placeholder for services that can be on-boarded. 
+
+Once we move to Gerritt and service-per-repo, this directory will be removed.
diff --git a/xos/onboard/exampleservice/admin.py b/xos/onboard/exampleservice/admin.py
new file mode 100644
index 0000000..f679e4e
--- /dev/null
+++ b/xos/onboard/exampleservice/admin.py
@@ -0,0 +1,116 @@
+# admin.py - ExampleService Django Admin
+
+from core.admin import ReadOnlyAwareAdmin, SliceInline
+from core.middleware import get_request
+from core.models import User
+
+from django import forms
+from django.contrib import admin
+
+from services.exampleservice.models import *
+
+class ExampleServiceForm(forms.ModelForm):
+
+    class Meta:
+        model = ExampleService
+
+    def __init__(self, *args, **kwargs):
+        super(ExampleServiceForm, self).__init__(*args, **kwargs)
+
+        if self.instance:
+            self.fields['service_message'].initial = self.instance.service_message
+
+    def save(self, commit=True):
+        self.instance.service_message = self.cleaned_data.get('service_message')
+        return super(ExampleServiceForm, self).save(commit=commit)
+
+class ExampleServiceAdmin(ReadOnlyAwareAdmin):
+
+    model = ExampleService
+    verbose_name = SERVICE_NAME_VERBOSE
+    verbose_name_plural = SERVICE_NAME_VERBOSE_PLURAL
+    form = ExampleServiceForm
+    inlines = [SliceInline]
+
+    list_display = ('backend_status_icon', 'name', 'service_message', 'enabled')
+    list_display_links = ('backend_status_icon', 'name', 'service_message' )
+
+    fieldsets = [(None, {
+        'fields': ['backend_status_text', 'name', 'enabled', 'versionNumber', 'service_message', 'description',],
+        'classes':['suit-tab suit-tab-general',],
+        })]
+
+    readonly_fields = ('backend_status_text', )
+    user_readonly_fields = ['name', 'enabled', 'versionNumber', 'description',]
+
+    extracontext_registered_admins = True
+
+    suit_form_tabs = (
+        ('general', 'Example Service Details', ),
+        ('slices', 'Slices',),
+        )
+
+    suit_form_includes = ((
+        'top',
+        'administration'),
+        )
+
+    def queryset(self, request):
+        return ExampleService.get_service_objects_by_user(request.user)
+
+admin.site.register(ExampleService, ExampleServiceAdmin)
+
+class ExampleTenantForm(forms.ModelForm):
+
+    class Meta:
+        model = ExampleTenant
+
+    creator = forms.ModelChoiceField(queryset=User.objects.all())
+
+    def __init__(self, *args, **kwargs):
+        super(ExampleTenantForm, self).__init__(*args, **kwargs)
+
+        self.fields['kind'].widget.attrs['readonly'] = True
+        self.fields['kind'].initial = SERVICE_NAME
+
+        self.fields['provider_service'].queryset = ExampleService.get_service_objects().all()
+
+        if self.instance:
+            self.fields['creator'].initial = self.instance.creator
+            self.fields['tenant_message'].initial = self.instance.tenant_message
+
+        if (not self.instance) or (not self.instance.pk):
+            self.fields['creator'].initial = get_request().user
+            if ExampleService.get_service_objects().exists():
+                self.fields['provider_service'].initial = ExampleService.get_service_objects().all()[0]
+
+    def save(self, commit=True):
+        self.instance.creator = self.cleaned_data.get('creator')
+        self.instance.tenant_message = self.cleaned_data.get('tenant_message')
+        return super(ExampleTenantForm, self).save(commit=commit)
+
+
+class ExampleTenantAdmin(ReadOnlyAwareAdmin):
+
+    verbose_name = TENANT_NAME_VERBOSE
+    verbose_name_plural = TENANT_NAME_VERBOSE_PLURAL
+
+    list_display = ('id', 'backend_status_icon', 'instance', 'tenant_message')
+    list_display_links = ('backend_status_icon', 'instance', 'tenant_message', 'id')
+
+    fieldsets = [(None, {
+        'fields': ['backend_status_text', 'kind', 'provider_service', 'instance', 'creator', 'tenant_message'],
+        'classes': ['suit-tab suit-tab-general'],
+        })]
+
+    readonly_fields = ('backend_status_text', 'instance',)
+
+    form = ExampleTenantForm
+
+    suit_form_tabs = (('general', 'Details'),)
+
+    def queryset(self, request):
+        return ExampleTenant.get_tenant_objects_by_user(request.user)
+
+admin.site.register(ExampleTenant, ExampleTenantAdmin)
+
diff --git a/xos/onboard/exampleservice/exampleservice-onboard.yaml b/xos/onboard/exampleservice/exampleservice-onboard.yaml
new file mode 100644
index 0000000..0095e44
--- /dev/null
+++ b/xos/onboard/exampleservice/exampleservice-onboard.yaml
@@ -0,0 +1,30 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the exampleservice
+
+imports:
+   - custom_types/xos.yaml
+
+topology_template:
+  node_templates:
+    exampleservice:
+      type: tosca.nodes.ServiceController
+      base_url: file:/opt/xos/onboard/exampleservice/
+
+    exampleservice_models:
+      type: tosca.nodes.ServiceControllerResource
+      kind: models
+      format: python
+      url: models.py
+
+    exampleservice_admin:
+      type: tosca.nodes.ServiceControllerResource
+      kind: admin
+      format: python
+      url: admin.py
+
+    exampleservice_synchronizer:
+      type: tosca.nodes.ServiceControllerResource
+      kind: synchronizer
+      format: manifest
+      url: synchronizer/manifest
diff --git a/xos/onboard/exampleservice/models.py b/xos/onboard/exampleservice/models.py
new file mode 100644
index 0000000..5d3e258
--- /dev/null
+++ b/xos/onboard/exampleservice/models.py
@@ -0,0 +1,53 @@
+# models.py -  ExampleService Models
+
+from core.models import Service, TenantWithContainer
+from django.db import models, transaction
+
+SERVICE_NAME = 'exampleservice'
+SERVICE_NAME_VERBOSE = 'Example Service'
+SERVICE_NAME_VERBOSE_PLURAL = 'Example Services'
+TENANT_NAME_VERBOSE = 'Example Tenant'
+TENANT_NAME_VERBOSE_PLURAL = 'Example Tenants'
+
+class ExampleService(Service):
+
+    KIND = SERVICE_NAME
+
+    class Meta:
+        app_label = SERVICE_NAME
+        verbose_name = SERVICE_NAME_VERBOSE
+
+    service_message = models.CharField(max_length=254, help_text="Service Message to Display")
+
+class ExampleTenant(TenantWithContainer):
+
+    KIND = SERVICE_NAME
+
+    class Meta:
+        verbose_name = TENANT_NAME_VERBOSE
+
+    tenant_message = models.CharField(max_length=254, help_text="Tenant Message to Display")
+
+    def __init__(self, *args, **kwargs):
+        exampleservice = ExampleService.get_service_objects().all()
+        if exampleservice:
+            self._meta.get_field('provider_service').default = exampleservice[0].id
+        super(ExampleTenant, self).__init__(*args, **kwargs)
+
+    def save(self, *args, **kwargs):
+        super(ExampleTenant, self).save(*args, **kwargs)
+        model_policy_exampletenant(self.pk)
+
+    def delete(self, *args, **kwargs):
+        self.cleanup_container()
+        super(ExampleTenant, self).delete(*args, **kwargs)
+
+
+def model_policy_exampletenant(pk):
+    with transaction.atomic():
+        tenant = ExampleTenant.objects.select_for_update().filter(pk=pk)
+        if not tenant:
+            return
+        tenant = tenant[0]
+        tenant.manage_container()
+
