By default pip installs packages from a public PyPi repository but can also be configured to install them from the private repositories, like Nexus or Artifactory. In this note i will show how to configure pip to install packages from the private repositories. I will also show how to define username and password in pip […]
SSH Fingerprint: Get Fingerprint of SSH RSA Key
The fingerprint is a unique sequence of letters and numbers used to identify the SSH RSA key. It is the fingerprint of a key that is verified when you try to connect to a remote host using SSH. In this note i will show how to generate the md5 and sha256 fingerprints of the SSH […]
Nginx: `proxy_pass` Without Trailing Slash
The URLs with and without trailing slash are considered by web-servers as well as by search engines as different web-pages. By this reason the URLs with trailing slash may return 404 Not Found error, while without the trailing slash they are reachable. In this note i will show how to remove the trailing slash from […]
Install Ansible on Ubuntu – APT Repository
Ansible is a popular agent-less automation tool used to configure local or remote systems and deploy applications. The easiest way to install the latest version of Ansible on Ubuntu is to get it from the official APT repository. This short note shows how to install Ansible on Ubuntu, check its version, locate the configuration file […]
Ansible: Human-Readable Output Format
By default Ansible sends output of the plays, tasks and module arguments to STDOUT in the format that is not suitable for human reading. Starting from Ansible 2.5, the default output format can be changed to a human-readable using the callback plugin. This short note shows how to change the default Ansible’s JSON output format […]
Pip: Install Requirements – Exclude Specific Packages
The requirements.txt file that contains the Python application dependencies is usually generated by developers using the pip freeze > requirements.txt command. If you install dependencies with the pip install -r requirements.txt command as a part of some automated pipeline or a Dockerfile and you have an issue with some of the dependencies, you may wonder […]
Pip: Show Python Package Dependencies
The dependencies of the installed Python packages can be listed using the built-in pip show command. Alternatively the dependencies can be shown as a tree structure using the pipdeptree command. In this note i will show several examples of how to list dependencies of the installed Python packages.
Docker Compose: Specify Dockerfile Path – Example
The docker-compose build or docker-compose up –build commands read the docker-compose.yml file looking for all services containing the build configuration option and run a docker build command for each of them. If the Dockerfile has been renamed or placed out of the context directory, you can specify the alternate path in the Docker Compose file. […]
Jenkins: Hide Passwords – MaskPasswordsBuildWrapper
For some reason you may not want to store credentials in Jenkins using the Credentials Plugin. Nevertheless, you still may need to hide sensitive data, like passwords or secret keys from the console output in Jenkins. One of the possible solution is to wrap the parts of the code you want to hide with set […]
Jenkins Pipeline: Input Step – Example
In Jenkins declarative pipelines it is possible to prompt a user for an interactive input by creating the input step. For example, at some stage of the Jenkins pipeline you may want to ask a user to provide the credentials. The user input can be saved as an environment variable and used in the next […]