Install¶
There are many different ways to install imds-mock. You can install the binary using either a supported package manager, manually, or by compiling the source yourself. Or you can pull a prebuilt image using Docker.
Installing the binary¶
Homebrew¶
To use Homebrew:
Apt¶
To install using the apt package manager:
echo 'deb [trusted=yes] https://fury.purpleclay.dev/apt/ /' | sudo tee /etc/apt/sources.list.d/purpleclay.list
sudo apt update
sudo apt install -y imds-mock
You may need to install the ca-certificates
package if you encounter trust issues with regards to the gemfury certificate:
Yum¶
To install using the yum package manager:
echo '[purpleclay]
name=purpleclay
baseurl=https://fury.purpleclay.dev/yum/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/purpleclay.repo
sudo yum install -y imds-mock
Aur¶
To install from the aur using yay:
Linux Packages¶
Download and manually install one of the .deb
, .rpm
or .apk
packages from the Releases page.
Go Install¶
Bash Script¶
To install the latest version using a bash script:
A specific version can be downloaded by using the -v
flag. By default the script uses sudo
, which can be turned off by using the --no-sudo
flag.
curl https://raw.githubusercontent.com/purpleclay/imds-mock/main/scripts/install | bash -s -- -v v0.1.0 --no-sudo
Manually¶
Binary downloads of imds-mock can be found on the Releases page. Unpack the imds-mock binary and add it to your PATH
.
Compiling from source¶
imds-mock is written using Go 1.18+ and should be installed along with go-task, as it is preferred over using make.
Then clone the code from GitHub:
Build imds-mock:
And check that everything works:
Running with Docker¶
You can run imds-mock directly from a docker image.
Verifying Artefacts¶
All verification is carried out using cosign and it must be installed before proceeding.
Binaries¶
All binaries can be verified using the checksum file, which has been signed using cosign.
- Download the checksum files that need to be verified:
curl -sL https://github.com/purpleclay/imds-mock/releases/download/v0.1.0/checksums.txt -O
curl -sL https://github.com/purpleclay/imds-mock/releases/download/v0.1.0/checksums.txt.sig -O
curl -sL https://github.com/purpleclay/imds-mock/releases/download/v0.1.0/checksums.txt.pem -O
- Verify the signature of the checksum file:
- Download any release artefact and verify its SHA256 signature matches the entry within the checksum file:
Don't mix versions
For checksum verification to work, all artefacts must be downloaded from the same release
Docker¶
Docker images can be verified using cosign directly, as the signature will be embedded within the docker manifest.