Skip to content

Installation for tenants

Info

This install guide is for non-NAV employees only. If you are a NAV employee, or a consultant hired by NAV, install a different version of naisdevice as described here.

Device-specific installation steps

macOS Installation

  1. Install Homebrew unless you already have it.

Homebrew makes it possible to install and maintain apps using the terminal app on your Mac.

  1. Open terminal (Use <Command> + <Space> to find Terminal.app) and add the nais tap by typing or pasting the text below and press <Enter>.

Adding the nais tap lets Homebrew know where to get and update files from. Do not worry about where it will be installed, we got you covered.

brew tap nais/tap
  1. When the tap is added, you are ready to install naisdevice, by typing or pasting the following in terminal and press <Enter>.
brew install naisdevice-tenant
  1. You will be asked for your local device account's password to finish the installation.

  2. Turn on your freshly installed naisdevice app.

  3. Use <Command> + <Space> to find your naisdevice.app and press <Enter>.

  4. Follow the instructions to connect your nais device.

  5. If you need to connect to anything running in K8s cluster, remember to update your kubeconfig

Windows Installation

Install using Scoop

  1. Install Scoop unless you already have it.

Scoop makes it possible to install and maintain programs from the command line.

  1. Use the following command in the command line to add the nais bucket to let Scoop know where to get and update files from. Do not worry about where it will be installed, we got you covered.
    scoop bucket add nais https://github.com/nais/scoop-bucket
    
  2. When the bucket is added, you are ready to install naisdevice, by typing the following in the command line:
    scoop install naisdevice-tenant
    
    (you will be asked for administrator access to run the installer)
  3. If you need to connect to anything running in K8s cluster, remember to update your kubeconfig
  4. Start naisdevice from the Start menu

Manual installation

  1. Download and install naisdevice-tenant.exe (you will be asked for administrator access when you run the installer)
  2. If you need to connect to anything running in K8s cluster, remember to update your kubeconfig
  3. Start naisdevice from the Start menu

Ubuntu Installation

Warning

Using Gnome DE on latest Ubuntu LTS - only supported variant atm

  1. Add the nais PPA repo:
NAIS_GPG_KEY="/etc/apt/keyrings/nav_nais_gar.asc"
curl -sfSL "https://europe-north1-apt.pkg.dev/doc/repo-signing-key.gpg" | sudo dd of="$NAIS_GPG_KEY"
echo "deb [arch=amd64 signed-by=$NAIS_GPG_KEY] https://europe-north1-apt.pkg.dev/projects/nais-io nais-ppa main" | sudo tee /etc/apt/sources.list.d/nav_nais_gar.list
sudo apt update

NOTE curl is not installed in a "fresh" ubuntu:

sudo apt install curl
  1. Install the naisdevice package:
    sudo apt install naisdevice-tenant
    
  2. Turn on your freshly installed naisdevice application.
  3. Find naisdevice in your application menu, or use the naisdevice command in a terminal to start the application.
  4. Follow the instructions to connect your nais device.
  5. Remember to update your kubeconfig.

Connect naisdevice through task/sys -tray icon

A macOS systray exemplifying a red-colored naisdevice icon.

When you have opened naisdevice, you may be concerned that nothing happened. The little naisdevice icon has appeared in your Systray (where all your small program icons are located - see above picture for how it looks on Mac):

  1. Find your naisdevice icon (pictured above - though it should not be red at first attempted connection).
  2. Can't find the icon? Make sure it is installed (See macOS, Windows or Ubuntu)
  3. Left-click it and select Connect.
  4. Left-click the naisdevice icon again and click Connect. You might need to allow ~20 seconds to pass before clicking Connect turns your naisdevice icon green.

The list of "Do's and don'ts" of naisdevice

naisdevice removes the need for full blown management of your device. This means that there are some do's and don'ts. You have to agree to the following set of guidelines to be admitted to the "program":

Do

  • make sure that you have activated your screen lock, especially if running on Linux. And beware of apps that override, i.e. Caffeine/Amphetamine etc.
  • your best to secure your device
  • report any security shortcomings you discover
  • ask the nais team if in doubt

Don't

  • share your device with others. A naisdevice is a personal device.
  • turn on sshd or similar services on your device.
  • set up your device as a proxy. For anything!
  • share network interfaces with virtual machines, meaning set them up as separate nodes on the network.
  • take shortcuts
  • move credentials off your device and transport them elsewhere

And otherwise: Just be nais.

Connecting to NAIS clusters

  1. Install nais-cli by following the installation instructions.
  2. Install gcloud by following the installation instructions.
  3. Install kubectl by following the installation instructions.
  4. Login to gcloud by running gcloud auth login --update-adc.
  5. Run nais naas kubeconfig to generate a kubeconfig for all NAIS clusters in the default directory (~/.kube/config).
  6. If you want to generate the kubeconfig in a different directory, you can specify the environment variable KUBECONFIG to point to the desired location.

Last update: 2023-08-29
Created: 2023-05-22