This file contains hidden or 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
---------------------------------------------------------------------------------------------------------------------- | |
$ ansible --version | |
ansible 2.9.27 | |
config file = /etc/ansible/ansible.cfg | |
configured module search path = [u'/home/ansiadm/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] | |
ansible python module location = /usr/lib/python2.7/dist-packages/ansible | |
executable location = /usr/bin/ansible | |
python version = 2.7.17 (default, Mar 18 2022, 13:21:42) [GCC 7.5.0] | |
---------------------------------------------------------------------------------------------------------------------- | |
#specify a different inventory file using the -i <path> option on the command line |
This file contains hidden or 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
singularity selftest -> run a selftest | |
singularity --version -> verify installation | |
which singularity -> verify installation | |
sudo singularity build --sandbox /tmp/debian docker://debian:latest -> Build a base sandbox from DockerHub | |
sudo singularity exec /tmp/debian apt-get update -y -> Make changes to it | |
sudo singularity exec --writable /tmp/debian apt-get install git-> Make changes to it | |
sudo singularity build /tmp/mondebian.simg /tmp/debian -> Build your custom image | |
sudo singularity exec /tmp/mondebian.simg ls -> Browse your custom image |
This file contains hidden or 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
--------------------------------------------------------------------------------------------------- | |
#vscode 1.63.2 | |
#remove deleted branches on github that still exist on vscode | |
Vscode-File-Preferences-Settings-Git-Git:Prune On Fetch #make VS Code run git fetch --prune when fetching remote refs | |
Vscode-Terminal | |
git fetch --prune #update/delete remote branch references | |
git fetch -p #update/delete remote branch references | |
git branch <branch-name> -D #delete the local branch (-D to force) |
This file contains hidden or 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
SaltStack master operations | |
salt-key -L -> Showing all minions | |
salt-key -a <minion_id> -> Accepting an unaccepted minion | |
salt-key -A -> Accepting all unaccepted minions | |
salt-key -d <minion_id> -> Removing a minion | |
salt '*' state.sls nginx -> Running formula | |
salt '*' cmd.run 'ls -l /etc' | |
salt '*' pkg.install vim |
This file contains hidden or 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
------------------------------------------------------------------------------------------ | |
#CLI shortcut keystrokes(linux&MAC) | |
Ctrl+L: Clear the screen. This is similar to running the “clear” command. | |
Ctrl+C: Interrupt (kill) the current foreground process running in in the terminal. This sends the SIGINT signal to the process | |
Ctrl+Z: Suspend the current foreground process running in bash. This sends the SIGTSTP signal to the process. To return the process to the foreground later, use the fg process_name command. | |
Ctrl+D: Close the bash shell.This is similar to running the exit command | |
Ctrl+L: Clear the screen. This is similar to running the “clear” command. | |
Ctrl+S: Stop all output to the screen. This is particularly useful when running commands with a lot of long, verbose output, but you don’t want to stop the command itself with Ctrl+C. | |
Ctrl+Q: Resume output to the screen after stopping it with Ctrl+S. |
This file contains hidden or 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
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
The ".hcl" file extension is used for HashiCorp Configuration Language (HCL) files, which are used to define infrastructure as code using HashiCorp tools such as Vagrant and Packer. | |
In the context of Vagrant, the "pkr.hcl" file is used to define how Packer builds machine images that can be used as base boxes for Vagrant. The "pkr.hcl" file specifies the builders (e.g. virtualization providers like VirtualBox, VMware), provisioners (e.g. shell scripts, Ansible, Chef), and post-processors (e.g. compressing the image, uploading to a cloud provider) that Packer should use to create the machine image | |
The "pkr.hcl" file can also include variables, which allow for more dynamic and flexible configuration. These variables can be set via the command line, a separate variables file, or even environment variables. | |
-------------------------- |
This file contains hidden or 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
#===================================================================== | |
Docker Playground | |
https://www.katacoda.com/courses/docker/playground | |
Play with Docker | |
https://labs.play-with-docker.com/ | |
#===================================================================== | |
/var/lib/docker/volumes/ #docker volumes stored in Docker host filesystem | |
/var/lib/docker #Docker daemon directory on Linux. | |
C:\ProgramData\docker #Docker daemon directory on Windows. | |
#===================================================================== |
This file contains hidden or 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
---------------------------------------------------------------------------------------------------- | |
#shortcuts ubuntu desktop mate | |
type to search - keyboard shortcuts | |
ctrl+alt+d minimize/maximize all windows | |
alt+F9 - minimize windows | |
ctrl+alt+l - lock screen | |
-------------------------------------------------------------------------------------------------------------------- | |
#vmware workstation user authentication easy install bug, skip it | |
-------------------------------------------------------------------------------------------------------------------- |
This file contains hidden or 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
-------------------------------------------------------------------------- | |
# ofed_info -s | |
-------------------------------------------------------------------------- | |
Find Mellanox Adapter Type and Firmware/Driver version | |
ConnectX-4 card | |
# lspci | grep Mellanox | |
0a:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3] | |
# lspci -vv -s 0a:00.0 | grep "Part number" -A 3 | |
# lspci | grep Mellanox | awk '{print $1}' | xargs -i -r mstvpd {} |
This file contains hidden or 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
-------------------------------------------------------------------------------------------------------------------- | |
#Bard, how to import a CA certificate on centos streams 8 | |
Here are the steps on how to import a CA certificate on CentOS Streams 8 with examples: | |
Example 1: Importing a CA certificate from the Let's Encrypt website. | |
The Let's Encrypt website provides free CA certificates that can be used to secure websites. To import a CA certificate from the Let's Encrypt website, you can use the following steps: | |
Go to the Let's Encrypt website: https://letsencrypt.org/ and click on the "Download" button. |