[CORD-2378] Adding make target to generate docker-compose.yml files for services and to run the them

Change-Id: I17db055ffa64913d515d5158f00888cdb7e07763
diff --git a/Makefile b/Makefile
index 98f4769..2f49d2f 100644
--- a/Makefile
+++ b/Makefile
@@ -183,6 +183,15 @@
 	cd $(CONFIG_CORD_PROFILE_DIR); docker-compose -p $(PROFILE) rm -s -f || true
 	rm -f $(M)/local-onboard-profile
 
+# ===== usage: make xos-service-config NAME=exampleservice PATH=exampleservice KEYPAIR=exampleservice_rsa =======
+
+xos-service-config:
+	# NOTE check that variables are set before calling ansible?
+	$(ANSIBLE_PB) --extra-vars 'xos_dynamic_services={"name": $(NAME), "path"=$(PATH), "keypair"= $(KEYPAIR)}' $(PI)/xos-service-config.yml $(LOGCMD)
+
+xos-services-up:
+	$(ANSIBLE_PB) $(PI)/xos-services-up.yml $(LOGCMD)
+
 # docs
 .PHONY: docs
 docs:
diff --git a/ansible/roles/genconfig/tasks/main.yml b/ansible/roles/genconfig/tasks/main.yml
index cb88406..8f4bde3 100644
--- a/ansible/roles/genconfig/tasks/main.yml
+++ b/ansible/roles/genconfig/tasks/main.yml
@@ -83,6 +83,12 @@
   with_items: "{{ profile_manifest.xos_services }}"
   when:  item.synchronizer is not defined or item.synchronizer
 
+- name: Add items to profile_container_list from profile_manifest.xos_dynamic_services
+  set_fact:
+    profile_container_list: "{{ profile_container_list }} + [ 'xosproject/{{ item.name }}-synchronizer' ]"
+  with_items: "{{ profile_manifest.xos_dynamic_services if 'xos_dynamic_services' in profile_manifest else [] }}"
+  when: item.synchronizer is not defined or item.synchronizer
+
 - name: Add items to profile_container_list from profile_manifest.enabled_gui_extensions
   set_fact:
     profile_container_list: "{{ profile_container_list }} + [ 'xosproject/gui-extension-{{ item.name }}' ]"