From 6edc69162377c96da81e2bfdeff3096f11b826ba Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 30 Jan 2024 00:39:45 -0700 Subject: [PATCH 1/8] remove Arduino IDE --- playbook.yaml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 27d8785..257abce 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -335,8 +335,6 @@ - install_fprime_tools vars: - arduino_ide_version: "2.2.1" - arduino_ide_bin_directory: "arduino-ide_{{ arduino_ide_version }}_Linux_64bit" arduino_cli_version: "0.33.1" arduino_pico_version: "3.3.0" arduino_esp32_version: "2.0.9" @@ -435,22 +433,6 @@ copy: src: /home/kasm-default-profile/install_files/99-adafruit-boards.rules dest: /etc/udev/rules.d - - name: Download Arduino IDE zip - get_url: - url: https://github.com/arduino/arduino-ide/releases/download/{{ arduino_ide_version }}/{{ arduino_ide_bin_directory }}.zip - dest: /home/kasm-default-profile/install_files - - name: Install Unzip - apt: - name: unzip - update_cache: yes - - name: Unarchive Arduino IDE zip - unarchive: - src: /home/kasm-default-profile/install_files/{{ arduino_ide_bin_directory }}.zip - dest: /opt/ - remote_src: yes - creates: /opt/{{ arduino_ide_bin_directory }}/LICENSE.electron.txt - - name: Create symlink for Arduino IDE binary in /usr/local/bin - shell: ln -srv /opt/{{ arduino_ide_bin_directory }}/arduino-ide /usr/local/bin/arduino-ide - # add default user to dialout group From 40d05df6f6b93a317478cc0894efb72c8bc97a75 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Mon, 26 Feb 2024 15:48:06 -0700 Subject: [PATCH 2/8] display disk usage after all tasks --- playbook.yaml | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 257abce..e1622f7 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -39,6 +39,12 @@ lineinfile: path: "/etc/skel/.profile" line: 'export PS1="\[\033[00;32m\][\w]\$\[\033[00m\] "' + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" # Handlers: the list of handlers that are executed as a notify # key from a task @@ -64,6 +70,12 @@ apt: name: build-essential update_cache: yes + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # install OpenJDK 11 @@ -84,6 +96,12 @@ shell: update-alternatives --install /usr/bin/java java /opt/jdk-11/bin/java 100 - name: Update alternatives so the command, javac, points to installed jdk shell: update-alternatives --install /usr/bin/javac javac /opt/jdk-11/bin/javac 100 + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # install firefox @@ -116,6 +134,14 @@ apt: update_cache: yes + tasks: + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" + roles: - role: staticdev.firefox @@ -184,6 +210,12 @@ src: /home/kasm-default-profile/install_files/.gitconfig dest: /home/kasm-default-profile/.gitconfig remote_src: yes + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # install Cross-compile toolchain for embedded Linux target @@ -237,6 +269,18 @@ fail: msg: "CMake Version Error: Expected {{ cmake_version }} | Found {{ installed_cmake_version.stdout }}" when: installed_cmake_version.stdout != cmake_version + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # Install Teensy programming tools @@ -252,6 +296,12 @@ apt: name: avr-libc, binutils-avr, cmake, g++, gcc, gcc-avr, git, libfontconfig1, libusb-dev, libxft-dev, make, unzip, vim, wget, xz-utils update_cache: yes + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # install Python packages with pip @@ -325,6 +375,12 @@ executable: /bin/bash - name: Delete fprime led blinker repo shell: rm -rf /home/kasm-default-profile/fprime-workshop-led-blinker + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # install arduino tools @@ -433,6 +489,12 @@ copy: src: /home/kasm-default-profile/install_files/99-adafruit-boards.rules dest: /etc/udev/rules.d + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # add default user to dialout group @@ -451,6 +513,12 @@ groups: "dialout" state: present remove: yes + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # install Minicom from debian package @@ -462,6 +530,12 @@ tasks: - name: Install Minicom debian package from install_files shell: dpkg -i /home/kasm-default-profile/install_files/minicom_2.7.1-1.1_amd64.deb + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # install Doctools @@ -498,6 +572,12 @@ cmd: cmake -G "Unix Makefiles" .. && make > /tmp/doxygen_build_output.txt 2>&1 && make install chdir: /opt/doxygen-{{ doxygen_version }}/build executable: /bin/bash + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # install sudo for the vs-code role below @@ -513,6 +593,12 @@ path: "/etc/sudoers" line: "Defaults env_keep += \"DONT_PROMPT_WSL_INSTALL\"" when: wsl2_environment + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # add dev user to give vs code somewhere to install extensions @@ -523,6 +609,12 @@ user: name: dev uid: 1002 + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" - # install the remainder of the tools @@ -565,6 +657,12 @@ name: dev state: absent remove: yes + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" # Three dots indicate the end of a YAML document ... From 42bde6630910bee70185ad49a4e6c26a33e3fcca Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Mon, 26 Feb 2024 16:00:34 -0700 Subject: [PATCH 3/8] install unpinned git version and set expected git version to 2.34.1 --- playbook.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index e1622f7..7ed948c 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -153,7 +153,7 @@ tags: install_utilities vars: - git_version: "2.43.0" + git_version: "2.34.1" git_version_to_install: "1:{{ git_version }}-0ppa1~ubuntu22.04.1" keychain_version: "2.8.5" keychain_version_to_install: "{{ keychain_version }}-2" @@ -164,7 +164,7 @@ shell: add-apt-repository ppa:git-core/ppa - name: Install git apt: - name: "git={{ git_version_to_install }}" + name: "git" - name: Install Git Bash Completion apt: name: bash-completion From dbb803995cb28f49e8f1daba10ddaebe1600af2a Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Mon, 26 Feb 2024 17:29:49 -0700 Subject: [PATCH 4/8] remove Arduino package index for ESP32 & SAMD boards --- playbook.yaml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 7ed948c..0bb16e4 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -393,8 +393,6 @@ vars: arduino_cli_version: "0.33.1" arduino_pico_version: "3.3.0" - arduino_esp32_version: "2.0.9" - adafruit_samd_version: "1.7.13" tasks: - name: Download Arduino CLI tarball @@ -429,8 +427,6 @@ shell: arduino-cli config init - name: Add URL for Arduino-Pico package index to Board Manager using arduino-cli shell: arduino-cli config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/{{ arduino_pico_version }}/package_rp2040_index.json - - name: Add URL for Arduino-ESP32 package index to Board Manager using arduino-cli - shell: arduino-cli config add board_manager.additional_urls https://github.com/espressif/arduino-esp32/releases/download/{{ arduino_esp32_version }}/package_esp32_index.json - name: Add URL for Adafruit package index to Board Manager using arduino-cli shell: arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/adafruit/arduino-board-index/8a67f577257b5f3e958ce32f18b55a8491f6d06f/package_adafruit_index.json - name: Add URL for Teensy package index to Board Manager using arduino-cli @@ -439,10 +435,6 @@ shell: arduino-cli core update-index - name: Install package index for Arduino-Pico using arduino-cli shell: arduino-cli core install rp2040:rp2040@{{ arduino_pico_version }} - - name: Install package index for Arduino-ESP32 using arduino-cli - shell: arduino-cli core install esp32:esp32@{{ arduino_esp32_version }} - - name: Install package index for Adafruit-SAMD using arduino-cli - shell: arduino-cli core install adafruit:samd@{{ adafruit_samd_version }} - name: Install package index for Teensy using arduino-cli shell: arduino-cli core install teensy:avr - name: Install RadioHead using arduino-cli @@ -450,33 +442,13 @@ - name: Get Arduino-Pico version shell: arduino-cli core list | grep rp2040 | awk '{ print $2'} register: installed_arduino_pico_version - - name: Get Arduino-ESP32 version - shell: arduino-cli core list | grep esp32 | awk '{ print $2'} - register: installed_arduino_esp32_version - - name: Get Adafruit-SAMD version - shell: arduino-cli core list | grep adafruit | awk '{ print $2'} - register: installed_adafruit_samd_version - name: Display Arduino-Pico version debug: msg: "Arduino-Pico version = {{ installed_arduino_pico_version.stdout }}" - - name: Display Arduino-ESP32 version - debug: - msg: "Arduino-ESP32 version = {{ installed_arduino_esp32_version.stdout }}" - - name: Display Adafruit board index version - debug: - msg: "Adafruit-SAMD version = {{ installed_adafruit_samd_version.stdout }}" - name: Test Arduino-Pico version fail: msg: "Arduino-Pico Version Error: Expected {{ arduino_pico_version }} | Found {{ installed_arduino_pico_version.stdout }}" when: installed_arduino_pico_version.stdout != arduino_pico_version - - name: Test Arduino-ESP32 version - fail: - msg: "Arduino-ESP32 Version Error: Expected {{ arduino_esp32_version }} | Found {{ installed_arduino_esp32_version.stdout }}" - when: installed_arduino_esp32_version.stdout != arduino_esp32_version - - name: Test Adafruit board index version - fail: - msg: "Adafruit-SAMD Version Error: Expected {{ adafruit_samd_version }} | Found {{ installed_adafruit_samd_version.stdout }}" - when: installed_adafruit_samd_version.stdout != adafruit_samd_version - name: Install Teensy rules to /etc/udev/rules.d copy: src: /home/kasm-default-profile/install_files/00-teensy.rules From b37d57541522b087c20593375ae9ba36709e45f3 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Mon, 26 Feb 2024 19:52:16 -0700 Subject: [PATCH 5/8] remove openjdk 11 --- playbook.yaml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 0bb16e4..03ca8c6 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -77,32 +77,6 @@ debug: msg: "{{ disk_usage.stdout }}" -- - # install OpenJDK 11 - hosts: localhost - connection: local - tasks: - - name: Download OpenJDK 11 tarball - shell: wget https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_linux-x64_bin.tar.gz -O /home/kasm-default-profile/openjdk-11+28_linux-x64_bin.tar.gz - - name: Extract OpenJDK 11 binaries - unarchive: - src: /home/kasm-default-profile/openjdk-11+28_linux-x64_bin.tar.gz - dest: /opt - remote_src: yes - creates: /opt/jdk-11/release - - name: Delete OpenJDK 11 tarball - shell: rm /home/kasm-default-profile/openjdk-11+28_linux-x64_bin.tar.gz - - name: Update alternatives so the command, java, points to installed jdk - shell: update-alternatives --install /usr/bin/java java /opt/jdk-11/bin/java 100 - - name: Update alternatives so the command, javac, points to installed jdk - shell: update-alternatives --install /usr/bin/javac javac /opt/jdk-11/bin/javac 100 - - name: Get disk usage - shell: df -h - register: disk_usage - - name: Display disk usage - debug: - msg: "{{ disk_usage.stdout }}" - - # install firefox hosts: localhost From 0be8fac9c561406d3ced520fbcab38bab801be7c Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Thu, 21 Mar 2024 01:42:04 -0700 Subject: [PATCH 6/8] Revert "remove Arduino package index for ESP32 & SAMD boards" This reverts commit dbb803995cb28f49e8f1daba10ddaebe1600af2a. --- playbook.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 03ca8c6..3fd50ef 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -367,6 +367,8 @@ vars: arduino_cli_version: "0.33.1" arduino_pico_version: "3.3.0" + arduino_esp32_version: "2.0.9" + adafruit_samd_version: "1.7.13" tasks: - name: Download Arduino CLI tarball @@ -401,6 +403,8 @@ shell: arduino-cli config init - name: Add URL for Arduino-Pico package index to Board Manager using arduino-cli shell: arduino-cli config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/{{ arduino_pico_version }}/package_rp2040_index.json + - name: Add URL for Arduino-ESP32 package index to Board Manager using arduino-cli + shell: arduino-cli config add board_manager.additional_urls https://github.com/espressif/arduino-esp32/releases/download/{{ arduino_esp32_version }}/package_esp32_index.json - name: Add URL for Adafruit package index to Board Manager using arduino-cli shell: arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/adafruit/arduino-board-index/8a67f577257b5f3e958ce32f18b55a8491f6d06f/package_adafruit_index.json - name: Add URL for Teensy package index to Board Manager using arduino-cli @@ -409,6 +413,10 @@ shell: arduino-cli core update-index - name: Install package index for Arduino-Pico using arduino-cli shell: arduino-cli core install rp2040:rp2040@{{ arduino_pico_version }} + - name: Install package index for Arduino-ESP32 using arduino-cli + shell: arduino-cli core install esp32:esp32@{{ arduino_esp32_version }} + - name: Install package index for Adafruit-SAMD using arduino-cli + shell: arduino-cli core install adafruit:samd@{{ adafruit_samd_version }} - name: Install package index for Teensy using arduino-cli shell: arduino-cli core install teensy:avr - name: Install RadioHead using arduino-cli @@ -416,13 +424,33 @@ - name: Get Arduino-Pico version shell: arduino-cli core list | grep rp2040 | awk '{ print $2'} register: installed_arduino_pico_version + - name: Get Arduino-ESP32 version + shell: arduino-cli core list | grep esp32 | awk '{ print $2'} + register: installed_arduino_esp32_version + - name: Get Adafruit-SAMD version + shell: arduino-cli core list | grep adafruit | awk '{ print $2'} + register: installed_adafruit_samd_version - name: Display Arduino-Pico version debug: msg: "Arduino-Pico version = {{ installed_arduino_pico_version.stdout }}" + - name: Display Arduino-ESP32 version + debug: + msg: "Arduino-ESP32 version = {{ installed_arduino_esp32_version.stdout }}" + - name: Display Adafruit board index version + debug: + msg: "Adafruit-SAMD version = {{ installed_adafruit_samd_version.stdout }}" - name: Test Arduino-Pico version fail: msg: "Arduino-Pico Version Error: Expected {{ arduino_pico_version }} | Found {{ installed_arduino_pico_version.stdout }}" when: installed_arduino_pico_version.stdout != arduino_pico_version + - name: Test Arduino-ESP32 version + fail: + msg: "Arduino-ESP32 Version Error: Expected {{ arduino_esp32_version }} | Found {{ installed_arduino_esp32_version.stdout }}" + when: installed_arduino_esp32_version.stdout != arduino_esp32_version + - name: Test Adafruit board index version + fail: + msg: "Adafruit-SAMD Version Error: Expected {{ adafruit_samd_version }} | Found {{ installed_adafruit_samd_version.stdout }}" + when: installed_adafruit_samd_version.stdout != adafruit_samd_version - name: Install Teensy rules to /etc/udev/rules.d copy: src: /home/kasm-default-profile/install_files/00-teensy.rules From 90c4dd5373bd49c75a7ad6da514b3dfef447f0a8 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Thu, 21 Mar 2024 12:30:08 -0700 Subject: [PATCH 7/8] Revert "remove Arduino IDE" This reverts commit 6edc69162377c96da81e2bfdeff3096f11b826ba. --- playbook.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 3fd50ef..d03f146 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -365,6 +365,8 @@ - install_fprime_tools vars: + arduino_ide_version: "2.2.1" + arduino_ide_bin_directory: "arduino-ide_{{ arduino_ide_version }}_Linux_64bit" arduino_cli_version: "0.33.1" arduino_pico_version: "3.3.0" arduino_esp32_version: "2.0.9" @@ -463,6 +465,22 @@ copy: src: /home/kasm-default-profile/install_files/99-adafruit-boards.rules dest: /etc/udev/rules.d + - name: Download Arduino IDE zip + get_url: + url: https://github.com/arduino/arduino-ide/releases/download/{{ arduino_ide_version }}/{{ arduino_ide_bin_directory }}.zip + dest: /home/kasm-default-profile/install_files + - name: Install Unzip + apt: + name: unzip + update_cache: yes + - name: Unarchive Arduino IDE zip + unarchive: + src: /home/kasm-default-profile/install_files/{{ arduino_ide_bin_directory }}.zip + dest: /opt/ + remote_src: yes + creates: /opt/{{ arduino_ide_bin_directory }}/LICENSE.electron.txt + - name: Create symlink for Arduino IDE binary in /usr/local/bin + shell: ln -srv /opt/{{ arduino_ide_bin_directory }}/arduino-ide /usr/local/bin/arduino-ide - name: Get disk usage shell: df -h register: disk_usage From 2f747f2bf4d0d02664331df1cbef591a5630ecbe Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Thu, 21 Mar 2024 14:45:14 -0700 Subject: [PATCH 8/8] Revert "remove openjdk 11" This reverts commit b37d57541522b087c20593375ae9ba36709e45f3. --- playbook.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index d03f146..fdcb575 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -77,6 +77,32 @@ debug: msg: "{{ disk_usage.stdout }}" +- + # install OpenJDK 11 + hosts: localhost + connection: local + tasks: + - name: Download OpenJDK 11 tarball + shell: wget https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_linux-x64_bin.tar.gz -O /home/kasm-default-profile/openjdk-11+28_linux-x64_bin.tar.gz + - name: Extract OpenJDK 11 binaries + unarchive: + src: /home/kasm-default-profile/openjdk-11+28_linux-x64_bin.tar.gz + dest: /opt + remote_src: yes + creates: /opt/jdk-11/release + - name: Delete OpenJDK 11 tarball + shell: rm /home/kasm-default-profile/openjdk-11+28_linux-x64_bin.tar.gz + - name: Update alternatives so the command, java, points to installed jdk + shell: update-alternatives --install /usr/bin/java java /opt/jdk-11/bin/java 100 + - name: Update alternatives so the command, javac, points to installed jdk + shell: update-alternatives --install /usr/bin/javac javac /opt/jdk-11/bin/javac 100 + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" + - # install firefox hosts: localhost