Avoid node dependency for bitwarden cli by using static binary.
This commit is contained in:
@ -69,28 +69,19 @@ Finally, we should upgrade the python package manger ~pip~ that we installed, be
|
|||||||
sudo pip install --upgrade pip && sudo pip3 install podman-compose
|
sudo pip install --upgrade pip && sudo pip3 install podman-compose
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
For additional package management namely ~bitwarden~ we use [[https://www.npmjs.com/][node package manager]]. The code below installs node ~16.x~, which is the latest stable release as of <2021-10-02 Sat>.
|
|
||||||
|
|
||||||
#+NAME: Install node
|
|
||||||
#+BEGIN_SRC shell
|
|
||||||
# Curl down the shell script for adding version 16 of nodejs to apt
|
|
||||||
sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
|
|
||||||
|
|
||||||
# Install the nodejs package via apt
|
|
||||||
sudo apt-get install -y nodejs
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
|
|
||||||
For managing secrets we use [[https://bitwarden.com/][bitwarden]] which provides a great [[https://github.com/bitwarden/cli][cli utility]]. Additionally in our [[.bashrc][bashrc]] file included in this repository there are a number of helper functions to make working with ~bw~ easier.
|
For managing secrets we use [[https://bitwarden.com/][bitwarden]] which provides a great [[https://github.com/bitwarden/cli][cli utility]]. Additionally in our [[.bashrc][bashrc]] file included in this repository there are a number of helper functions to make working with ~bw~ easier.
|
||||||
|
|
||||||
#+NAME: Install bitwarden and login
|
#+NAME: Install bitwarden and login
|
||||||
#+BEGIN_SRC tmate
|
#+begin_src tmate
|
||||||
# Install the bitwarden cli via node package manager
|
# Download the latest release
|
||||||
sudo npm install -g @bitwarden/cli
|
wget "https://vault.bitwarden.com/download/?app=cli&platform=linux" --output-document "bw.zip"
|
||||||
|
|
||||||
# Test login to bitwarden
|
# Unzip and install the latest release
|
||||||
|
unzip "bw.zip" && sudo install "bw" "/usr/local/bin" && rm "bw" "bw.zip"
|
||||||
|
|
||||||
|
# Login to bitwarden
|
||||||
bw login mail@jamesblair.net
|
bw login mail@jamesblair.net
|
||||||
#+END_SRC
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
For ad-hoc system administration we use [[https://deb.nodesource.com/setup_12.x ][ansible]]. We install ansible via ~pip3~ to ensure any modules or additional packages required at a later date can be easily managed.
|
For ad-hoc system administration we use [[https://deb.nodesource.com/setup_12.x ][ansible]]. We install ansible via ~pip3~ to ensure any modules or additional packages required at a later date can be easily managed.
|
||||||
|
|||||||
Reference in New Issue
Block a user