use service-profile repo for configuration
diff --git a/roles/docker-compose/tasks/main.yml b/roles/docker-compose/tasks/main.yml
index 9edb437..59325e4 100644
--- a/roles/docker-compose/tasks/main.yml
+++ b/roles/docker-compose/tasks/main.yml
@@ -29,5 +29,5 @@
- name: Copy admin-openrc.sh into XOS container
command: ansible xos-1 -u ubuntu -m copy \
- -a "src=~/admin-openrc.sh dest=~/xos/xos/configurations/{{ xos_configuration }}"
+ -a "src=~/admin-openrc.sh dest=~/service-profile/{{ xos_configuration }}"
diff --git a/roles/onos-load-apps/tasks/main.yml b/roles/onos-load-apps/tasks/main.yml
index 4a6cec6..9039fe1 100644
--- a/roles/onos-load-apps/tasks/main.yml
+++ b/roles/onos-load-apps/tasks/main.yml
@@ -5,7 +5,7 @@
- name: Disable loading from Maven repo
command: ansible xos-1 -u ubuntu -m lineinfile \
- -a "dest=~/xos/xos/configurations/{{ xos_configuration }}/make-vtn-external-yaml.sh state=absent regexp='install_dependencies'"
+ -a "dest=~/service-profile/{{ xos_configuration }}/make-vtn-external-yaml.sh state=absent regexp='install_dependencies'"
- name: Load the apps using Docker
command: ansible xos-1 -u ubuntu -m shell \
diff --git a/roles/xos-install/defaults/main.yml b/roles/xos-install/defaults/main.yml
index e28acb4..c77f9ac 100644
--- a/roles/xos-install/defaults/main.yml
+++ b/roles/xos-install/defaults/main.yml
@@ -1,9 +1,12 @@
---
# default variables for xos-install role
-xos_repo_url: "https://github.com/open-cloud/xos.git"
+xos_repo_url: "https://gerrit.opencord.org/xos"
xos_repo_dest: "~/xos"
xos_repo_branch: "HEAD"
xos_configuration: "devel"
xos_container_rebuild: false
+service_profile_repo_url: "https://gerrit.opencord.org/p/service-profile.git"
+service_profile_repo_dest: "~/service-profile"
+service_profile_repo_branch: "HEAD"
diff --git a/roles/xos-install/tasks/main.yml b/roles/xos-install/tasks/main.yml
index ba656e4..22a045a 100644
--- a/roles/xos-install/tasks/main.yml
+++ b/roles/xos-install/tasks/main.yml
@@ -6,15 +6,20 @@
dest={{ xos_repo_dest }}
version={{ xos_repo_branch }}
+- name: checkout service-profile repo
+ git: repo={{ service_profile_repo_url }}
+ dest={{ service_profile_repo_dest }}
+ version={{ service_profile_repo_branch }}
+
- name: Rebuild XOS containers
when: xos_container_rebuild
command: make {{ item }}
- chdir="{{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/"
+ chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}/"
with_items:
- common_cloudlab
- base
- name: Initial build of XOS
command: make
- chdir="{{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/"
+ chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}/"
diff --git a/roles/xos-vm-install/defaults/main.yml b/roles/xos-vm-install/defaults/main.yml
index ed946c4..64c4421 100644
--- a/roles/xos-vm-install/defaults/main.yml
+++ b/roles/xos-vm-install/defaults/main.yml
@@ -8,3 +8,6 @@
xos_container_rebuild: false
+service_profile_repo_url: "https://gerrit.opencord.org/p/service-profile.git"
+service_profile_repo_dest: "~/service-profile"
+service_profile_repo_branch: "HEAD"
diff --git a/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml b/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml
index 66ff0bf..0481444 100644
--- a/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml
+++ b/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml
@@ -28,10 +28,17 @@
version={{ xos_repo_branch }}
force=yes
+ - name: Clone service-profile repo
+ git:
+ repo={{ service_profile_repo_url }}
+ dest={{ service_profile_repo_dest }}
+ version={{ service_profile_repo_branch }}
+ force=yes
+
- name: Copy over SSH keys
copy:
src=~/.ssh/{{ item }}
- dest={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/
+ dest={{ service_profile_repo_dest }}/{{ xos_configuration }}/
owner={{ ansible_user_id }} mode=0600
with_items:
- id_rsa
@@ -40,13 +47,13 @@
- name: copy over SSH key as node_key
copy:
src=~/.ssh/id_rsa
- dest={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/node_key
+ dest={{ service_profile_repo_dest }}/{{ xos_configuration }}/node_key
- name: download software image
get_url:
url={{ item.url }}
checksum={{ item.checksum }}
- dest={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/images/{{ item.name }}.img
+ dest={{ service_profile_repo_dest }}/{{ xos_configuration }}/images/{{ item.name }}.img
with_items: "{{ xos_images }}"
- name: Pull docker images for XOS
@@ -60,7 +67,7 @@
- name: Rebuild XOS containers
when: xos_container_rebuild
command: make {{ item }}
- chdir="{{ xos_repo_dest }}/containers/xos/"
+ chdir="{{ service_profile_repo_dest }}/containers/xos/"
with_items:
- base
diff --git a/roles/xos-vm-install/templates/xos-setup-vars.yml.j2 b/roles/xos-vm-install/templates/xos-setup-vars.yml.j2
index 87a0584..9a0afbb 100644
--- a/roles/xos-vm-install/templates/xos-setup-vars.yml.j2
+++ b/roles/xos-vm-install/templates/xos-setup-vars.yml.j2
@@ -10,3 +10,7 @@
xos_images:
{{ xos_images | to_nice_yaml }}
+
+service_profile_repo_url: "{{ service_profile_repo_url }}"
+service_profile_repo_dest: "{{ service_profile_repo_dest }}"
+service_profile_repo_branch: "{{ service_profile_repo_branch }}"