Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "add new role for ISSU - openstack_compute_legacy"
- Loading branch information
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
# run openstack-compute-init container with mounted volumes: | ||
# /usr/bin:/opt/plugin/bin | ||
# PYTHONPATH:/opt/plugin/site-packages | ||
|
||
- name: create /etc/contrail/compute-legacy | ||
file: | ||
path: /etc/contrail/compute-legacy | ||
state: directory | ||
recurse: yes | ||
|
||
- name: Getting PYTHONPATH | ||
shell: python -c "import sys; paths = [path for path in sys.path if 'packages' in path] ; print(paths[-1])" | ||
register: pythonpath | ||
|
||
- name: update image | ||
shell: "docker pull {{ container_registry }}/{{ item }}:{{ contrail_version_tag }}" | ||
with_items: | ||
- contrail-openstack-compute-init | ||
when: UPDATE_IMAGES is undefined or UPDATE_IMAGES != false | ||
|
||
- name: "create contrail compute-legacy compose file" | ||
template: | ||
src: contrail-compute-legacy.yaml.j2 | ||
dest: "/etc/contrail/compute-legacy/docker-compose.yaml" | ||
|
||
- name: "start contrail compute-legacy" | ||
docker_service: | ||
project_src: /etc/contrail/compute-legacy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
playbooks/roles/install_contrail/templates/contrail-compute-legacy.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: '2' | ||
services: | ||
openstack-compute-legacy: | ||
image: "{{ container_registry }}/contrail-openstack-compute-init:{{ contrail_version_tag }}" | ||
network_mode: "host" | ||
volumes: | ||
- /usr/bin:/opt/plugin/bin | ||
- {{ pythonpath.stdout }}:/opt/plugin/site-packages |