@nikitajs/incus

1.0.0-alpha.9 • Public • Published

Nikita "incus" package

The "incus" package provides Nikita actions for various LXD operations.

Running the test

The tests require a local LXD client. On a Linux hosts, you can follow the installation instructions. On non Linux hosts, you can setup the client to communicate with a remote LXD server hosted on a virtual machine. You will however have to mount the project directory into the "/nikita" folder of the virtual machine. The provided Vagrantfile definition inside "@nikitajs/core/env/cluster/assets" will set you up.

# For windows and MacOS users
./bin/cluster start
npm test

Usage

import "@nikitajs/incus/register";
import nikita from "@nikitajs/core";

const {$status} = await nikita.incus.init({
  image: "images:alpine/latest",
  container: "nikita-list-vm1",
  vm: true,
});
console.info("Machine was created:", $status);

Notes

Windows and MacOS users

LXD is only available on Linux. To work around this limitation, we run LXD in a virtual machine.

We provide a script to run LXD inside Multipass which also run on MacOS ARM architecture:

./assets/multipass.sh

Networks

The LXD tests create two bridge networks:

  • Nikita LXD public: nktincuspub, 192.0.2.1/30 (reserved IP subnet ssigned as TEST-NET-1)
  • Nikita LXD private: nktincusprv, 192.0.2.5/30 (reserved IP subnet ssigned as TEST-NET-1)

To avoid collision, other tests must create and use their own bridge.

Package Sidebar

Install

npm i @nikitajs/incus

Weekly Downloads

4

Version

1.0.0-alpha.9

License

MIT

Unpacked Size

115 kB

Total Files

133

Last publish

Collaborators

  • david