@wolfogaming/node-lxd
v3.1.3
Published
![npm](https://badges.aleen42.com/src/npm.svg) [![npm version](https://badge.fury.io/js/@wolfogaming%2Fnode-lxd.svg)](https://github.com/Wolfo-Gaming/node-lxd) ![typescript](https://badges.aleen42.com/src/typescript.svg)
Downloads
54
Readme
Node LXD
A client for communicating with a local or remote instance of LXD.
Installing
$ npm install --save @wolfogaming/node-lxd
Getting Started
The following example connects to the local LXD instance and launches a new instance.
var { Client } = require("@wolfogaming/node-lxd");
var client = new Client(null, {type:"unix"});
client.createInstance("improved-elk", {
"config": {
"limits.cpu": 3,
"limits.memory": "1GB",
"security.nesting": true
},
"image": "ubuntu/21.04",
"description": "test Instance",
"profiles": ["default"]
}).then((emitter) => {
emitter.on('progress', (progress) => {
console.log(progress, "% completed")
})
emitter.on('finished', (instance) => {
console.log("finished creating instance " + instance.name())
})
})