Skip to content

jphilaine/lxd-webui

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LXD WebUI

Requirements

to develop

  • Node.js >= 4
  • npm
npm install
npm start

to build angular 2 webapp

  • Node.js >= 4
  • npm
npm install
npm run build:prod
npm run server:prod # Not for production, just for test build

Resulat in build directory

to build electon application with deb package

  • Node.js >= 4
  • npm
npm install
npm run build:electron:prod
npm run package:electron:linux

Resulat in dist directory

Configuration on LXD

Allow LXD to listen on 8443 port

lxc config set core.https_address [::]:8443

Add CORS settings on LXD (Since LXD 2.0.0.rc2)

lxc config set core.https_allowed_origin "*" # SECURITY WARNING: prefer to restrict with lxd-webui url 
lxc config set core.https_allowed_methods "GET, POST, PUT, DELETE, OPTIONS"
lxc config set core.https_allowed_headers "Content-Type"

Accept self-sign server certificate

Go on LXD server url (https://127.0.0.1:8443) with your browser.

Generate x509 certificate for browser authentification

  • Generate a client private key
openssl genrsa -out lxd-webui.key 4096
  • Generate a certificate request (csr)
openssl req -new -key lxd-webui.key -out lxd-webui.csr
  • Generate an auto-sign certificate
openssl x509 -req -days 3650 -in lxd-webui.csr -signkey lxd-webui.key -out lxd-webui.crt
  • Export keys to pkcs12 for use in browers
openssl pkcs12 -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -export -in lxd-webui.crt -inkey lxd-webui.key -out lxd-webui.pfx -name "LXD WebUI"
lxc config trust add lxd-webui.crt

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.4%
  • TypeScript 8.0%
  • HTML 1.6%