From 2ae3bc7cba88ffdf7e6b70e9535aea44fb3d90cd Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Mon, 9 Jan 2023 14:50:46 -0500 Subject: [PATCH] fix: add pip3 docs and use pip3 to install the openshift lib Signed-off-by: Devin Buhl --- .taskfiles/AnsibleTasks.yml | 1 + README.md | 11 +++++++---- ansible/requirements.txt | 1 + configure | 7 ++++--- 4 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 ansible/requirements.txt diff --git a/.taskfiles/AnsibleTasks.yml b/.taskfiles/AnsibleTasks.yml index 9826259b..56abb29c 100644 --- a/.taskfiles/AnsibleTasks.yml +++ b/.taskfiles/AnsibleTasks.yml @@ -15,6 +15,7 @@ tasks: desc: Install / Upgrade Ansible galaxy deps dir: "{{.ANSIBLE_DIR}}" cmds: + - pip3 install --user --requirement requirements.txt - ansible-galaxy install -r requirements.yml --roles-path ~/.ansible/roles --force - ansible-galaxy collection install -r requirements.yml --collections-path ~/.ansible/collections --force diff --git a/README.md b/README.md index e3f56330..478d23b2 100644 --- a/README.md +++ b/README.md @@ -59,21 +59,24 @@ First and foremost some experience in debugging/troubleshooting problems **and a 📍 Install the **most recent version** of the CLI tools below. If you are **having trouble with future steps**, it is very likely you don't have the most recent version of these CLI tools, **!especially sops AND yq!**. -1. Install the following CLI tools on your workstation, if you are using [Homebrew](https://brew.sh/) on MacOS or Linux skip to steps 3 and 4. +1. Install the following CLI tools on your workstation, if you are **NOT** using [Homebrew](https://brew.sh/) on MacOS or Linux **ignore** steps 4 and 5. - * Required: [age](https://github.com/FiloSottile/age), [ansible](https://www.ansible.com), [flux](https://toolkit.fluxcd.io/), [weave-gitops](https://docs.gitops.weave.works/docs/installation/weave-gitops/), [go-task](https://github.com/go-task/task), [direnv](https://github.com/direnv/direnv), [ipcalc](http://jodies.de/ipcalc), [jq](https://stedolan.github.io/jq/), [kubectl](https://kubernetes.io/docs/tasks/tools/), [pre-commit](https://github.com/pre-commit/pre-commit), [sops v3](https://github.com/mozilla/sops), [terraform](https://www.terraform.io), [yq v4](https://github.com/mikefarah/yq) + * Required: [age](https://github.com/FiloSottile/age), [ansible](https://www.ansible.com), [flux](https://toolkit.fluxcd.io/), [weave-gitops](https://docs.gitops.weave.works/docs/installation/weave-gitops/), [go-task](https://github.com/go-task/task), [direnv](https://github.com/direnv/direnv), [ipcalc](http://jodies.de/ipcalc), [jq](https://stedolan.github.io/jq/), [kubectl](https://kubernetes.io/docs/tasks/tools/), [python-pip3](https://pypi.org/project/pip/), [pre-commit](https://github.com/pre-commit/pre-commit), [sops v3](https://github.com/mozilla/sops), [terraform](https://www.terraform.io), [yq v4](https://github.com/mikefarah/yq) * Recommended: [helm](https://helm.sh/), [kustomize](https://github.com/kubernetes-sigs/kustomize), [stern](https://github.com/stern/stern), [yamllint](https://github.com/adrienverge/yamllint) 2. This guide heavily relies on [go-task](https://github.com/go-task/task) as a framework for setting things up. It is advised to learn and understand the commands it is running under the hood. -3. Install [go-task](https://github.com/go-task/task) via Brew +3. Install Python 3 and pip3 using your Linux OS package manager, or Homebrew if using MacOS. + - Ensure `pip3` is working on your command line by running `pip3 --version` + +4. [Homebrew] Install [go-task](https://github.com/go-task/task) ```sh brew install go-task/tap/go-task ``` -4. Install workstation dependencies via Brew +5. [Homebrew] Install workstation dependencies ```sh task init diff --git a/ansible/requirements.txt b/ansible/requirements.txt new file mode 100644 index 00000000..db89003e --- /dev/null +++ b/ansible/requirements.txt @@ -0,0 +1 @@ +openshift==0.13.1 diff --git a/configure b/configure index 349b6f9c..c5c64af5 100755 --- a/configure +++ b/configure @@ -217,19 +217,20 @@ verify_age() { } verify_binaries() { + _has_binary "age" _has_binary "ansible" _has_binary "envsubst" _has_binary "flux" _has_binary "git" - _has_binary "age" + _has_binary "gitops" _has_binary "ipcalc" _has_binary "jq" - _has_binary "gitops" - _has_binary "yq" + _has_binary "pip3" _has_binary "sops" _has_binary "ssh" _has_binary "task" _has_binary "terraform" + _has_binary "yq" if ! [[ "$(sops --version)" =~ 3\.[0-9]+\.[0-9]+ ]]; then _log "ERROR(${FUNCNAME[0]})" "Incompatible sops version, make sure you are using the latest release of github.com/mozilla/sops" exit 1