All Projects → iamhsa → pkenv

iamhsa / pkenv

Licence: MIT license
Packer version manager

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to pkenv

windows-docker-desktop-box
Vagrant box to test Docker Desktop with Linux/Windows containers
Stars: ✭ 17 (-66%)
Mutual labels:  packer
Origami
Packer compressing .net assemblies, (ab)using the PE format for data storage
Stars: ✭ 111 (+122%)
Mutual labels:  packer
packer-builder-hcloud
Packer builder plugin for Hetzner Cloud - https://hetzner.cloud
Stars: ✭ 24 (-52%)
Mutual labels:  packer
learn-terraform-provisioning
Companion code repository for learning to provision Terraform instances with Packer & cloud-init
Stars: ✭ 56 (+12%)
Mutual labels:  packer
packer-windows
Windows Templates for Packer: Windows 11, Windows 10, Windows Server 2022, 2019, 2016, also with Docker
Stars: ✭ 1,116 (+2132%)
Mutual labels:  packer
icp-ce-on-linux-containers
Multi node IBM Cloud Private Community Edition 3.2.x w/ Kubernetes 1.13.5 in a Box. Terraform, Packer and BASH based Infrastructure as Code script sets up a multi node LXD cluster, installs ICP-CE and clis on a metal or VM Ubuntu 18.04 host.
Stars: ✭ 52 (+4%)
Mutual labels:  packer
nvim-config
My neovim config
Stars: ✭ 63 (+26%)
Mutual labels:  packer
opnsense-starterkit
Try opnsense, build opnsense images or start development
Stars: ✭ 18 (-64%)
Mutual labels:  packer
local-hashicorp-stack
Local Hashicorp Stack for DevOps Development without Hypervisor or Cloud
Stars: ✭ 23 (-54%)
Mutual labels:  packer
kubash
Kubash - the K8$ shell for your kube clusters
Stars: ✭ 20 (-60%)
Mutual labels:  packer
kiteshield
Packer/Protector for x86-64 ELF binaries on Linux
Stars: ✭ 71 (+42%)
Mutual labels:  packer
dockpack
This project uses ansible, packer and vagrant to create an agile lab.
Stars: ✭ 13 (-74%)
Mutual labels:  packer
docker-files
Teracy docker-files project to build common Docker images
Stars: ✭ 87 (+74%)
Mutual labels:  packer
oracle-linux
Scripts, examples, and tutorials to get started with Oracle Linux
Stars: ✭ 77 (+54%)
Mutual labels:  packer
packer-kali linux
This is a repository that will be used to help create a process of a new kali vagrant box for hashicorp each week.
Stars: ✭ 36 (-28%)
Mutual labels:  packer
packer-plugin-amazon-ami-management
Packer post-processor plugin for Amazon AMI management
Stars: ✭ 95 (+90%)
Mutual labels:  packer
packer-vagrant-builder
Build Solaris,CentOS or Ubuntu Vagrant box with puppet rpm's
Stars: ✭ 49 (-2%)
Mutual labels:  packer
circleci-packer-example
Example: packer image builder on CircleCI
Stars: ✭ 20 (-60%)
Mutual labels:  packer
packer-FreeBSD
Build a FreeBSD VM for Vagrant using packer
Stars: ✭ 23 (-54%)
Mutual labels:  packer
laravel-Packer
CSS, Javascript and Images packer/processors to Laravel
Stars: ✭ 57 (+14%)
Mutual labels:  packer

Build Status

pkenv

Packer version manager mainly inspired by tfenv

Support

Currently pkenv supports the following OSes

  • Linux (64bit)
  • Mac OS X (64bit)
  • Arm
  • Windows - tested in Cygwin and WSL.

Installation

On Mac OS X, you can install pkenv with Homebrew:

$ brew tap kwilczynski/homebrew-pkenv
$ brew install pkenv

On any other platform, you can install pkenv as follows:

  1. Check out pkenv into any path (here is ${HOME}/.pkenv)
$ git clone https://github.com/iamhsa/pkenv.git ${HOME}/.pkenv
  1. Add ${HOME}/.pkenv/bin to your $PATH any way you like
$ echo 'export PATH="${HOME}/.pkenv/bin:$PATH"' >> ${HOME}/.bash_profile

OR you can make symlinks for pkenv/bin/* scripts into a path that is already added to your $PATH (e.g. /usr/local/bin) OSX/Linux Only!

$ ln -s ${HOME}/.pkenv/bin/* /usr/local/bin

On Ubuntu/Debian touching /usr/local/bin might require sudo access, but you can create ${HOME}/bin or ${HOME}/.local/bin and on next login it will get added to the session $PATH or by running . ${HOME}/.profile it will get added to the current shell session's $PATH.

$ mkdir -p ~/.local/bin/
$ . ~/.profile
$ ln -s ~/.pkenv/bin/* ~/.local/bin
$ command -v pkenv

Usage

pkenv install [version]

Install a specific version of Packer. Available options for version:

  • i.j.k exact version to install
  • latest is a syntax to install latest version
  • latest:<regex> is a syntax to install latest version matching regex (used by grep -e)
$ pkenv install 1.1.1
$ pkenv install latest
$ pkenv install latest:^1.3
$ pkenv install

If shasum is present in the path, pkenv will verify the download against Hashicorp's published sha256 hash. If keybase is available in the path it will also verify the signature for those published hashes using Hashicorp's published public key.

You can opt-in to using GnuPG tools for PGP signature verification if keybase is not available:

$ echo 'trust-pkenv: yes' > ~/.pkenv/use-gpgv
$ pkenv install

The trust-pkenv directive means that verification uses a copy of the Hashicorp OpenPGP key found in the pkenv repository. Skipping that directive means that the Hashicorp key must be in the existing default trusted keys. Use the file ~/.pkenv/use-gnupg to instead invoke the full gpg tool and see web-of-trust status; beware that a lack of trust path will not cause a validation failure.

.packer-version

If you use .packer-version, pkenv install (no argument) will install the version written in it.

Specify architecture

Architecture other than the default amd64 can be specified with the PKENV_ARCH environment variable

PKENV_ARCH=arm pkenv install 1.3.1

pkenv use

Switch a version to use latest is a syntax to use the latest installed version latest:<regex> is a syntax to use latest installed version matching regex (used by grep -e)

$ pkenv use 0.12.3
$ pkenv use latest
$ pkenv use latest:^0.12

pkenv uninstall

Uninstall a specific version of Packer latest is a syntax to uninstall latest version latest:<regex> is a syntax to uninstall latest version matching regex (used by grep -e)

$ pkenv uninstall 0.7.0
$ pkenv uninstall latest
$ pkenv uninstall latest:^0.8

pkenv list

List installed versions

$ pkenv list
* 1.1.1 (set by /opt/pkenv-build/work/pkenv/version)
  0.12.3
  0.12.2
  0.7.5
  0.6.1

pkenv list-remote

List installable versions

$ pkenv list-remote
1.4.2
1.4.1
1.4.0
1.3.5
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.3
1.1.2
1.1.1
...

.packer-version

If you put .packer-version file on your project root, or in your home directory, pkenv detects it and use the version written in it. If the version is latest or latest:<regex>, the latest matching version currently installed will be selected.

$ cat .packer-version
1.4.2

$ packer --version
1.4.2

$ echo 1.4.2 > .packer-version

$ packer --version
1.4.2

$ echo latest:^1.4 > .packer-version

$ packer version
1.4.2

Environment Variables

PKENV

PKENV_REMOTE

String (Default: https://releases.hashicorp.com)

To install from a remote other than the default

$ PKENV_REMOTE=https://example.jfrog.io/artifactory/hashicorp

Upgrading

$ git --git-dir=${HOME}/.pkenv/.git pull

Uninstalling

$ rm -rf ${HOME}/.pkenv

LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].