diff --git a/6-12-2023 Cohort 1 Sync Notes.md b/6-12-2023 Cohort 1 Sync Notes.md new file mode 100644 index 0000000..c295fab --- /dev/null +++ b/6-12-2023 Cohort 1 Sync Notes.md @@ -0,0 +1,45 @@ +1400h: Started + +Code review: + +https://gogs.gtsplab.com:5432/SVIG/pricer/src/main/basic_checks_Sloetjes.yml + +Current error: +``` +TASK [Run pricer container] **************************************************************************************************************** +An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'requests' +fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (requests) on d460010e2174's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"} +``` + +Ansible host patterns: https://docs.ansible.com/ansible/latest/inventory_guide/intro_patterns.html# +Ansible magic variables: https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html + +* Talked about sharing repositories, communicating, keeping changes in a common place instead of making separate copies +* Demonstrated `git blame`, which doesn't seem to be supported in VSC's native git extension, you need to use the git history or gitlens extension +* `git blame ` will show the file with each line annotated with the time, date, user, and commit +* Mentioned that `git blame --incremental` can be useful when investigating changes in large files, as it doesn't require reading all the commits into memory first +* Removed in-file change time notes, asked interns to use `git blame` instead +* Demonstrated 3-way merge +* Review of LISP history, emacs, 3-way merge using `emerge` +* Let's try meld +* Explained about alt/option-right click to open on Mac to get around code signing restrictions +* meld isn't a true 3-way merge tool +* Selected kdiff3 as the 3-way merge tool +* 3-way merging overview: https://www.youtube.com/watch?v=muGkkIa1pJg +* 3-way merging with conflict overview: https://www.youtube.com/watch?v=muGkkIa1pJg +* 3-way merge article: https://medium.com/@karol.rossa/git-3-way-merge-addc2728c300 +* Mentioned github copilot isn't useful for our python learning, but is useful for writing Ansible code due to the lack of syntax details and the sheer amount of code to be written +* Couldn't figure out how to get docker from the Windows host to be accessible from the docker tools inside the wsl distribution, even though the integration was enabled: https://docs.docker.com/desktop/windows/wsl/ +* TODO: @j figure out how to make that work +* Explained that `become: true` gives extra privileges to the tasks that run under that play/task, and make sure to stop using it once you're done using administrative ansible modules and can go back to being a regular user. +* You can use block to group tasks by a `when` condition or a `become` command +* How to dump ansible variables in a playbook: +``` + ... tasks above here + register: pricer_container + - error: + msg: "{{ pricer_container }}" +``` +* All tasks return some values: https://docs.ansible.com/ansible/2.9/reference_appendices/common_return_values.html#common-return-values +* docker_container returns some information about the container: https://docs.ansible.com/ansible/2.9/modules/docker_container_module.html#return-values +* Next step is to figure out how to extract the container name so we can use it later to stop and re-start the container with systemd, then do it again once selenium is installed \ No newline at end of file