Skip to content

Instantly share code, notes, and snippets.

@7MinSec
Last active May 7, 2023 14:24
Show Gist options
  • Save 7MinSec/9525c45aeda14b2cbab96d5611460001 to your computer and use it in GitHub Desktop.
Save 7MinSec/9525c45aeda14b2cbab96d5611460001 to your computer and use it in GitHub Desktop.
Quick start guide to install NPK (https://github.com/Coalfire-Research/npk) on Ubuntu 18

This gist is a little long in the tooth, so your mileage my vary. We also covered NPK in a podcast episode.


This is an in-progress quick start install guide for NPK on Ubuntu 18.

From a new Ubuntu 18 box, install the essentials:

apt install unzip -y
apt install python3-pip -y
apt install jq -y
apt install npm -y
pip3 install awscli --upgrade —-user

Download/build install the Google version of jsonnet!!! Installing the apt/snap version from Ubuntu was a major issue for me that caused NPK's install to fail terribly!

Now open ~/.profile and add this to the end:

export PATH=~/.local/bin:$PATH

Now update that file with:

source ~/.profile

Download a working version of Terraform (the very latest seems not to work right with NPK):

cd /tmp
wget https://releases.hashicorp.com/terraform/0.11.2/terraform_0.11.2_linux_amd64.zip
unzip terraform_0.11.2_linux_amd64.zip
cp terraform ./local/bin

Create an npk user with awscli:

aws configure —-profile npk

When asked, fill out AWS access key, secret access key, default region name (I think us-east-1 is fine).

Then download NPK:

git clone https://github.com/Coalfire-Research/npk.git /opt/npk

Now follow their instructions to configure the npk-settings.json file and then you should (fingers crossed) be ready to run deploy.sh and let the crackin' begin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment