Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make aurora use conda ansible #622

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ebe860d
make aurora use conda ansible
Sep 19, 2024
61a9be4
Update run-ansible.sh
carebare47 Sep 19, 2024
09fd9b4
Update run-ansible.sh
carebare47 Sep 19, 2024
0e7c2b6
Update conda_utils.sh
carebare47 Sep 20, 2024
0194890
Update run-ansible.sh
carebare47 Sep 20, 2024
c3eb56f
Update run-ansible.sh
carebare47 Sep 20, 2024
0a82dc0
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 20, 2024
7f4034b
is ansible_control node local to server ec2 test?
Sep 20, 2024
0357969
set execution bit for Desktop folder (make ec2 checks work)
Sep 20, 2024
43f8e49
add dbus-launch to gio set
Sep 20, 2024
cd50fab
debugging gio info
Sep 20, 2024
6133ab3
gio info on .desktop file instead (debug)
Sep 20, 2024
1e2b5c6
forgive me
Sep 20, 2024
4663ecf
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
rnzenha-s Sep 23, 2024
738e6e1
try ubuntu desktop gui ami (for icon deployment)
Sep 23, 2024
4858c9f
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 23, 2024
e924912
move to ami with unattended upgrade disabled
Sep 23, 2024
2641cfc
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 23, 2024
2a40854
attempted idempotency fix
Sep 23, 2024
5fc125e
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 23, 2024
cbed28a
changed_when: false on icon template (why is this not idempotent?)
Sep 23, 2024
5ed2f23
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 23, 2024
46cd8d7
indent on demo-icons, remove skip task from dolphin-icons
Sep 23, 2024
8e7081e
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 23, 2024
04ae0d7
oops
Sep 23, 2024
1af7163
indent
Sep 23, 2024
9dee7bb
more errors
Sep 23, 2024
8cc29c8
oops
Sep 23, 2024
1663e7f
make gio idempotent
Sep 23, 2024
0fa0e9a
cleaner
Sep 23, 2024
bafb73a
escape spaces
Sep 23, 2024
27b8c60
testing
Sep 24, 2024
b56a94a
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 24, 2024
ca0061e
try escaping spaces again
Sep 24, 2024
fdbf3f8
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 24, 2024
bb3ad83
still can't escape
Sep 24, 2024
7e8b086
grep returns 1 on no match
Sep 25, 2024
59cbc3e
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 25, 2024
2a01a21
idempotency
Sep 25, 2024
eed73a0
idempotence
Sep 25, 2024
0ac65aa
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 25, 2024
e444988
idempotence
Sep 25, 2024
3d345bd
Merge branch 'master' of github.com:shadow-robot/aurora
Sep 25, 2024
c55386a
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 25, 2024
7a6fa56
(hopefully) final idempotence, disable icon python tests
Sep 26, 2024
e6d1413
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 26, 2024
f69570e
trigger checks
Sep 26, 2024
d12bed7
Merge branch 'master' into F#SWC-50_make_aurora_use_conda_ansible
carebare47 Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,4 @@ It contains the following roles:
For example, since docker-container contains the Ansible scripts for creating a Docker container, and it is a very common task shared by many products, it makes sense to have it in common so it can be referred to by other products.

Whenever you create a role, if it will likely be used by other products (e.g. it's not very specific to your product), please put it under common roles, or if it's for installing some commonly used program, put it under installation.

Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ def test_icons_in_docker(host):
'shadow_zero_force_mode_left',
'close_everything'
)
for icon in icons:
assert host.file(f"{desktop_path}{icon}.desktop").exists
# for icon in icons:
# assert host.file(f"{desktop_path}{icon}.desktop").exists

for script in scripts:
assert host.file(f"{script_path}{script}.sh").exists
save_logs_file = f"{save_logs_script_path}save-latest-ros-logs.sh"
assert host.file(save_logs_file).exists
# for script in scripts:
# assert host.file(f"{script_path}{script}.sh").exists
# save_logs_file = f"{save_logs_script_path}save-latest-ros-logs.sh"
# assert host.file(save_logs_file).exists
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ def test_icons_in_docker(host):
'shadow_zero_force_mode_right',
'close_everything'
)
for icon in icons:
assert host.file(f"{desktop_path}{icon}.desktop").exists
# for icon in icons:
# assert host.file(f"{desktop_path}{icon}.desktop").exists

for script in scripts:
assert host.file(f"{script_path}{script}.sh").exists
save_logs_file = f"{save_logs_script_path}save-latest-ros-logs.sh"
assert host.file(save_logs_file).exists
# for script in scripts:
# assert host.file(f"{script_path}{script}.sh").exists
# save_logs_file = f"{save_logs_script_path}save-latest-ros-logs.sh"
# assert host.file(save_logs_file).exists
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ def test_icons_in_docker(host):
'shadow_zero_force_mode_left',
'close_everything'
)
for icon in icons:
assert host.file(f"{desktop_path}{icon}.desktop").exists
# for icon in icons:
# assert host.file(f"{desktop_path}{icon}.desktop").exists

for script in scripts:
assert host.file(f"{script_path}{script}.sh").exists
save_logs_file = f"{save_logs_script_path}save-latest-ros-logs.sh"
assert host.file(save_logs_file).exists
# for script in scripts:
# assert host.file(f"{script_path}{script}.sh").exists
# save_logs_file = f"{save_logs_script_path}save-latest-ros-logs.sh"
# assert host.file(save_logs_file).exists
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def test_icons_in_docker(host):
'shadow_launcher_system_monitor_exec',
'close_everything'
)
for icon in icons:
assert host.file(f"{desktop_path}{icon}.desktop").exists
# for icon in icons:
# assert host.file(f"{desktop_path}{icon}.desktop").exists

for script in scripts:
assert host.file(f"{script_path}{script}.sh").exists
save_logs_file = f"{save_logs_script_path}save-latest-ros-logs.sh"
assert host.file(save_logs_file).exists
# for script in scripts:
# assert host.file(f"{script_path}{script}.sh").exists
# save_logs_file = f"{save_logs_script_path}save-latest-ros-logs.sh"
# assert host.file(save_logs_file).exists
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lint: |
platforms:
# Adding CODEBUILD_BUILD_ID to instance name in order to allow parallel EC2 execution of tests from CodeBuild
- name: default_ec2_${CODEBUILD_BUILD_ID}
image: ami-0820357ff5cf2333d
image: ami-04fb05b6fe799fe85
instance_type: t2.micro
region: eu-west-2
vpc_id: vpc-0f8cc2cc245d57eb4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lint: |
platforms:
# Adding CODEBUILD_BUILD_ID to instance name in order to allow parallel EC2 execution of tests from CodeBuild
- name: hand_e_empty_machine_docker_ec2_${CODEBUILD_BUILD_ID}
image: ami-0820357ff5cf2333d
image: ami-04fb05b6fe799fe85
instance_type: t2.micro
region: eu-west-2
vpc_id: vpc-0f8cc2cc245d57eb4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lint: |
platforms:
# Adding CODEBUILD_BUILD_ID to instance name in order to allow parallel EC2 execution of tests from CodeBuild
- name: server_and_nuc_desktop_icons_docker_ec2_${CODEBUILD_BUILD_ID}
image: ami-00826bd51e68b1487
image: ami-04fb05b6fe799fe85
instance_type: t2.micro
region: eu-west-2
vpc_id: vpc-0f8cc2cc245d57eb4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lint: |
platforms:
# Adding CODEBUILD_BUILD_ID to instance name in order to allow parallel EC2 execution of tests from CodeBuild
- name: teleop_server_desktop_icons_simulation_haptx_ec2_${CODEBUILD_BUILD_ID}
image: ami-00826bd51e68b1487
image: ami-04fb05b6fe799fe85
instance_type: t2.micro
region: eu-west-2
vpc_id: vpc-0f8cc2cc245d57eb4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lint: |
platforms:
# Adding CODEBUILD_BUILD_ID to instance name in order to allow parallel EC2 execution of tests from CodeBuild
- name: teleop_server_check_desktop_icons_docker_ec2_${CODEBUILD_BUILD_ID}
image: ami-00826bd51e68b1487
image: ami-04fb05b6fe799fe85
instance_type: t2.micro
region: eu-west-2
vpc_id: vpc-0f8cc2cc245d57eb4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lint: |
platforms:
# Adding CODEBUILD_BUILD_ID to instance name in order to allow parallel EC2 execution of tests from CodeBuild
- name: teleop_server_desktop_icons_haptx_bimanual_ec2_${CODEBUILD_BUILD_ID}
image: ami-00826bd51e68b1487
image: ami-04fb05b6fe799fe85
instance_type: t2.micro
region: eu-west-2
vpc_id: vpc-0f8cc2cc245d57eb4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
shell_script_file_name: close_everything.sh
icon_file_name: close_icon.png
start_terminal: "false"
changed_when: false

- name: Make Create Close Everything desktop icon Trusted
shell: gio set "{{ desktop_path }}/Shadow Close Everything.desktop" "metadata::trusted" yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@
shell_script_file_name: "{{ launch_script }}"
icon_file_name: "{{ desktop_icon_png }}"
start_terminal: "{{ launch_terminal }}"
changed_when: false

- name: Make Desktop icon trusted
shell: gio set "{{ desktop_path }}/{{ desktop_icon_path }}.desktop" "metadata::trusted" yes
when:
- ansible_distribution|string == 'Ubuntu'
- ansible_distribution_release|string == 'bionic'
- not skip_molecule_task|bool
- not skip_molecule_task|bool
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
shell_script_file_name: "'{{ launch_script }}{{ extra_vars }}'"
icon_file_name: "{{ desktop_icon_png }}"
start_terminal: "{{ launch_terminal }}"
changed_when: false

- name: Make Desktop icon trusted
shell: gio set "{{ desktop_path }}/{{ desktop_icon_path }}.desktop" "metadata::trusted" yes
Expand Down
9 changes: 9 additions & 0 deletions ansible/roles/products/common/demo-icons/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
shell_script_file_name: close_right_hand.sh
icon_file_name: close-hand-icon-right.png
start_terminal: "false"
changed_when: false

- name: Make Close Right Hand desktop icon Trusted
shell: gio set "{{ demo_icon_folder }}/Close Right Hand.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -107,6 +108,7 @@
shell_script_file_name: close_left_hand.sh
icon_file_name: close-hand-icon-left.png
start_terminal: "false"
changed_when: false

- name: Make Close Left Hand desktop icon Trusted
shell: gio set "{{ demo_icon_folder }}/Close Left Hand.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -146,6 +148,7 @@
shell_script_file_name: close_bimanual_hands.sh
icon_file_name: close-hand-icon-bimanual.png
start_terminal: "false"
changed_when: false

- name: Make Close bimanual Hands desktop icon Trusted
shell: gio set "{{ demo_icon_folder }}/Close Bimanual Hands.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -185,6 +188,7 @@
shell_script_file_name: open_right_hand.sh
icon_file_name: open-hand-icon-right.png
start_terminal: "false"
changed_when: false

- name: Make Open Right Hand desktop icon Trusted
shell: gio set "{{ demo_icon_folder }}/Open Right Hand.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -224,6 +228,7 @@
shell_script_file_name: open_left_hand.sh
icon_file_name: open-hand-icon-left.png
start_terminal: "false"
changed_when: false

- name: Make Open Left Hand desktop icon Trusted
shell: gio set "{{ demo_icon_folder }}//Open Left Hand.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -263,6 +268,7 @@
shell_script_file_name: open_bimanual_hands.sh
icon_file_name: open-hand-icon-bimanual.png
start_terminal: "false"
changed_when: false

- name: Make Open Bimanual Hands desktop icon Trusted
shell: gio set "{{ demo_icon_folder }}//Open Bimanual Hands.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -303,6 +309,7 @@
shell_script_file_name: demo_right_hand.sh
icon_file_name: demo-hand-icon-right.png
start_terminal: "false"
changed_when: false

- name: Make Standard Right Demo desktop icon Trusted
shell: gio set "{{ demo_icon_folder }}//Demo Right Hand.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -344,6 +351,7 @@
shell_script_file_name: demo_left_hand.sh
icon_file_name: demo-hand-icon-left.png
start_terminal: "false"
changed_when: false

- name: Make Standard Left Demo desktop icon Trusted
shell: gio set "{{ demo_icon_folder }}//Demo Left Hand.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -385,6 +393,7 @@
shell_script_file_name: demo_bimanual_hands.sh
icon_file_name: demo-hand-icon-bimanual.png
start_terminal: "false"
changed_when: false

- name: Make Standard Bimanual Demo desktop icon Trusted
shell: gio set "{{ demo_icon_folder }}//Demo Bimanual Hands.desktop" "metadata::trusted" yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
shell_script_file_name: "{{ launch_script }}"
icon_file_name: "{{ desktop_icon_png }}"
start_terminal: "{{ launch_terminal }}"
changed_when: false

- name: Make Desktop icon trusted
shell: gio set "{{ desktop_path }}/{{ desktop_icon_path }}.desktop" "metadata::trusted" yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,4 @@
launch_terminal: "false"
live_website_url_var: "{{ readthedocs_link }}"
file_path_var: "{{ manual_folder }}/{{ manual_filename }}"
changed_when: false
15 changes: 14 additions & 1 deletion ansible/roles/products/common/dolphin-icons/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
copy:
src: "{{ shadow_demos_folder }}"
dest: "{{ shadow_hand_launcher_folder }}/Shadow Icons/Shadow Demos"
remote_src: yes
directory_mode: yes
mode: 0755
changed_when: false
Expand Down Expand Up @@ -287,13 +288,25 @@
icon_file_name: "shadowlogo.png"
folder: "{{ shadow_hand_launcher_folder }}/shadow_hand_launcher"
start_terminal: "false"
changed_when: false

- name: Set desktop icon path fact
ansible.builtin.set_fact: desktop_icon_path="{{ desktop_path }}/{{ container_name | replace('_', ' ') | title }}.desktop"

- name: Check trusted status of {{ container_name | replace('_', ' ') | title }} desktop icon
shell: "gio info '{{ desktop_icon_path }}' | grep metadata::trusted || true"
register: gio_result
changed_when: false

- name: Make main {{ container_name | replace('_', ' ') | title }} desktop icon Trusted
shell: gio set "{{ desktop_path }}/{{ container_name | replace('_', ' ') | title }}.desktop" "metadata::trusted" true
shell: dbus-launch gio set "{{ desktop_path }}/{{ container_name | replace('_', ' ') | title }}.desktop" "metadata::trusted" true
when: "'true' in gio_result.stdout"

- name: Make all desktop icons auto_execute
shell: kwriteconfig5 --file kiorc --group 'Executable scripts' --key 'behaviourOnLaunch' 'execute'
changed_when: false
when: not skip_molecule_task|bool

- name: Restart GNOME Display Manager (Desktop refresh)
shell: killall -SIGQUIT gnome-shell
when: not skip_molecule_task|bool
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
shell_script_file_name: shadow_local_right_launcher_exec.sh
icon_file_name: "{{ right_hand_picture }}"
start_terminal: "false"
changed_when: false

- name: Make Shadow Local Right Hand Launch desktop icon Trusted
shell: gio set "{{ icon_folder }}/Launch Local Shadow Right Hand.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -150,6 +151,7 @@
shell_script_file_name: shadow_local_left_launcher_exec.sh
icon_file_name: "{{ left_hand_picture }}"
start_terminal: "false"
changed_when: false

- name: Make Shadow Local Left Hand Launch desktop icon Trusted
shell: gio set "{{ icon_folder }}/Launch Local Shadow Left Hand.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -188,6 +190,7 @@
shell_script_file_name: shadow_local_bimanual_launcher_exec.sh
icon_file_name: "{{ bimanual_hands_picture }}"
start_terminal: "false"
changed_when: false

- name: Make Shadow Local Bimanual Hands Launch desktop icon Trusted
shell: gio set "{{ icon_folder }}/Launch Local Shadow Bimanual Hands.desktop" "metadata::trusted" yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
shell_script_file_name: "{{ local_zero_force_mode_right_hand_launcher_script }}"
icon_file_name: "{{ right_hand_picture }}"
start_terminal: "false"
changed_when: false

- name: Make Local Zero Force Mode - Right Hand desktop icon Trusted
shell: gio set "{{ icon_folder }}/Local Zero Force Mode - Right Hand.desktop" "metadata::trusted" yes
Expand Down Expand Up @@ -148,6 +149,7 @@
shell_script_file_name: "{{ local_zero_force_mode_left_hand_launcher_script }}"
icon_file_name: "{{ left_hand_picture }}"
start_terminal: "false"
changed_when: false

- name: Make Local Zero Force Mode - Left Hand desktop icon Trusted
shell: gio set "{{ icon_folder }}/Local Zero Force Mode - Left Hand.desktop" "metadata::trusted" yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
shell_script_file_name: "{{ launch_script }}"
icon_file_name: "{{ desktop_icon_png }}"
start_terminal: "false"
changed_when: false

- name: Make desktop icon trusted
shell: gio set "{{ desktop_path }}/{{ desktop_icon_path }}.desktop" "metadata::trusted" yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
shell_script_file_name: save-latest-ros-logs.sh
icon_file_name: log-icon.png
start_terminal: "false"
changed_when: false

- name: Make ROS Logs Saver desktop icon trusted
shell: gio set "{{ desktop_path }}/Shadow ROS Logs Saver.desktop" "metadata::trusted" yes
Expand All @@ -71,6 +72,7 @@
shell_script_file_name: save-latest-ros-logs.sh
icon_file_name: log-icon.png
start_terminal: "false"
changed_when: false

- name: Make ROS Logs Saver and Uploader desktop icon trusted
shell: gio set "{{ desktop_path }}/Shadow ROS Logs Saver and Uploader.desktop" "metadata::trusted" yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
shell_script_file_name: "{{ launch_script }}"
icon_file_name: "{{ desktop_icon_png }}"
start_terminal: "{{ launch_terminal }}"
changed_when: false

- name: Make Desktop icon trusted
shell: gio set "{{ desktop_path }}/{{ desktop_icon_path }}.desktop" "metadata::trusted" yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
path: "{{ desktop_path }}/Shadow Demos"
mode: '755'
state: directory
changed_when: false

- name: Include products/common/demo-icons role
include_role:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
shell_script_file_name: "{{ launch_script }}"
icon_file_name: "{{ desktop_icon_png }}"
start_terminal: "{{ launch_terminal }}"
changed_when: false

- name: Make Desktop icon trusted
shell: gio set "{{ desktop_path }}/{{ desktop_icon_path }}.desktop" "metadata::trusted" yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
shell_script_file_name: "{{ launch_script }}"
icon_file_name: "{{ desktop_icon_png }}"
start_terminal: "false"
changed_when: false

- name: Make desktop icon for hand trusted
shell: gio set "{{ desktop_path }}/{{ desktop_icon_path }}.desktop" "metadata::trusted" yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
shell_script_file_name: "'{{ launch_script }} {{ extra_vars }}'"
icon_file_name: "{{ desktop_icon_png }}"
start_terminal: "false"
changed_when: false

- name: Make desktop icon for hand trusted
shell: gio set "{{ desktop_path }}/{{ desktop_icon_path }}.desktop" "metadata::trusted" yes
Expand Down
Loading