GithubHelp home page GithubHelp logo

simhaonline / lxdhub Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erickeller/lxdhub

0.0 0.0 0.0 4.46 MB

Display, search and copy LXD images using a web interface.

Home Page: https://lxdhub.xyz

License: Apache License 2.0

JavaScript 2.29% Shell 1.39% TypeScript 93.88% Dockerfile 0.29% CSS 1.82% HTML 0.33%

lxdhub's Introduction

LXD Hub Logo

Display, search and copy LXC images using a web interface.

Gitter Circle CI Status

Purpose

LXDHub is a management system for linux containers (LXC). With LXDHub you can visualize LXC images of multiple (private & public) remotes. One of the key features of LXDHub is to clone LXC images from one remote to another. Therefor you can mirror public remotes to your private remote.

Installation

Prerequisites

The fastest way to run LXDHub on your computer is by pulling the LXDHub LXC image from our public remote.

# launch lxdhub
lxc remote add lxdhub https://lxdhub.xyz:8443 --accept-certificate --public
lxc launch lxdhub:lxdhub mylxdhub

# forward the port (let it be accessible from the outside)
lxc config device add mylxdhub lxdhub-web proxy listen=tcp:0.0.0.0:80 connect=tcp:localhost:3000

You can now access lxdhub from the machine you launched the container on port 80 (http). Inside the container lxdhub binds to the port 3000.

Adding your remotes:

lxc exec mylxdhub -- su -l lxdhub -c "cat << EOF >> ~/lxdhub/lxdhub.yml
  - name: efiks
    url: https://images.efiks.ovh:8443
    protocol: lxd
    public: true
    readonly: true
EOF"

# run the dbsync
lxc exec mylxdhub --  node /var/lib/lxdhub/lxdhub/packages/dbsync/lib/cli.js start -c /var/lib/lxdhub/lxdhub/lxdhub.yml

LXDHub can also be installed with other technologies:

Configuration Management

Ansible

You can also install lxdhub with ansible on any target (ssh/lxd)

NOTE: these playbooks were tested in the following environment:

  • ansible >= 2.5.1
  • Ubuntu
  • lxc (snap/native)

one can use the roles in the ansible folder to deploy lxdhub on their own server.

ansible-playbook ansible/install-lxdhub.yml -i REMOTE, [-u USER --key-file SSH_KEY]

One can also parametrize the lxdhub_version to be checked out as extra-vars. See the git tags for available versions.

ansible-playbook ansible/install-lxdhub.yml -e "lxdhub_version=v1.8.0"

You can also install lxdhub inside a lxd container:

# setup the continer to install lxdhub in
lxc launch ubuntu:18.04 lxdhub
lxc exec lxdhub -- apt update && apt install python

# install lxdhub inside the lxd container
ansible-playbook ansible/install-lxdhub.yml -c lxd -i lxdhub,

This playbook will:

  1. clone and build lxdhub inside the target
  2. setup systemctl services

Packages

Under the hood, LXDHub is split in five packages. The following graph visualizes the dependencies of each package.

Package Dependency

Name Version Description
@lxdhub/web npm version The LXDHub webinterface
@lxdhub/api npm version The REST API for the LXDHub webinterface
@lxdhub/dbsync npm version The script to synchronize multiple LXD remotes with the LXDHub database
@lxdhub/db npm version The package, which provides database functions for the @lxdhub/api and @lxdhub/dbsync packages
@lxdhub/common npm version The package, which provides common functions for all LXDHub-packages.

The packages @lxdhub/db and @lxdhub/common are solely libraries, which can not be run seperatly. Whereas the packages @lxdhub/web, @lxdhub/api and @lxdhub/dbsync can be run seperatly via Docker or NodeJS.

Tests

Prerequisites

Unit / Integration Tests

Run the automated test cases with NodeJS.

docker build -t $USER/lxdhub .
docker run -it $USER/lxdhub test
docker run -it $USER/lxdhub lint

Related

  • @lxdhub/web: The LXDHub webinterface
  • @lxdhub/api: The REST API for the LXDHub webinterface
  • @lxdhub/dbsync: The script to synchronize multiple LXD remotes with the LXDHub database
  • @lxdhub/db: The package, which provides database functions for the @lxdhub/api and @lxdhub/dbsync packages
  • @lxdhub/common: The package, which provides common functions for all LXDHub-packages
  • CONTRIBUTING.md: The contributing guidelines
  • COPYRIGHT: Copyright informations
  • publish.md: Documentation on how LXDHub is being published
  • LXC: The underlying technology behind LXDHub

People

lxdhub's People

Contributors

brunnel6 avatar brunnerlivio avatar dependabot-preview[bot] avatar dependabot[bot] avatar erickeller avatar greenkeeper[bot] avatar randombenj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.