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
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
| 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
| ------------------------------------------------------------------------------------------ | |
| #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
| 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
| --------------------------------------------------------------------------------------------------- | |
| #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
| 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
| ---------------------------------------------------------------------------------------------------------------------- | |
| Option 1 — Use full path in run_backup.sh | |
| Find where Ansible is installed: | |
| docker exec -it ansible-netops which ansible-playbook | |
| ---------------------------------------------------------------------------------------------------------------------- | |
| $ ansible --version | |
| ansible 2.9.27 |
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
| ========================================================================================================== | |
| # 8. VBoxManage | |
| https://www.virtualbox.org/manual/ | |
| ========================================================================================================== | |
| # Networking Modes | |
| https://www.virtualbox.org/manual/ch06.html#network_bridged | |
| ========================================================================================================== | |
| Windows Host | |
| >vboxmanage --version |
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-galaxy --version | |
| ansible-galaxy 2.4.2.0 | |
| ============================================================================ | |
| ansible-galaxy install --roles-path . -r requirements.yml | |
| ansible-galaxy --offline init role_name | |
| ============================================================================ | |
| ansible-galaxy install -r requirements.yml | |
| ansible-playbook playbook.yml -i inventory | |
| ============================================================================ |
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
| gpg --version | |
| gpg (GnuPG) 2.0.22 | |
| eval $(gpg-agent --daemon) -> make sure gpg-agent is running | |
| gpg-agent -> Check if gpg-agent is running | |
| gpg --gen-key -> generate a GPG key pair | |
| gpg --list-secret-keys --keyid-format LONG -> List public and private key GPG keys. | |
| A private key is required for signing commits or tags. | |
| gpg --delete-secret-keys 3AA5C34371567BD2 -> delete secret keys |