lxd-compose

command module
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

README

LXD Compose

Build Status CII Best Practices Go Report Card

lxd-compose supply a way to deploy a complex environment to an LXD Cluster or LXD standalone installation.

It permits to organize and trace all configuration steps of infrastructure and create test suites.

All configuration files could be created at runtime through two different template engines: Mottainai or Jinja2 (require j2cli tool).

It's under heavy development phase and specification could be changed in the near future.

Installation

lxd-compose is available as Mocaccino OS package and installable in every Linux distro through luet tool with these steps:

$> curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh
$> sudo luet install repository/mocaccino-extra-stable
$> sudo luet install app-emulation/lxd-compose
Upgrade lxd-compose

$> sudo luet upgrade

Use lxd-compose with LXD installed from snapd

LXD available through snapd doesn't expose local unix socket under default path /var/lib/lxd/unix.socket but normally under the path /var/snap/lxd/common/lxd/unix.socket.

This means that to use local connection it's better to create under the config.yaml an entry like this:

  local-snapd:
    addr: unix:///var/snap/lxd/common/lxd/unix.socket
    public: false

and then to use local-snapd in connection option.

Instead, if it's used the HTTPS API this is not needed.

Documentation

The complete lxd-compose documentation is available here.

Examples

We maintain a project that supply ready to build environments at LXD Compose Galaxy.

Getting Started

Deploy an environment

$> lxd-compose apply myproject

# Disable hooks with flag foo
$> lxd-compose apply --disable-flag foo

# Execute only hooks with flag foo
$> lxd-compose apply --enable-flag foo

Destroy an environment

$> lxd-compose destroy myproject

Validate environemnts

$> lxd-compose validate

Create single node

$> lxd-compose node create node1 --hooks

# Execute only hooks with flag foo
$> lxd-compose node create node1 --hooks --enable-flag foo

# Disable hooks with flag foo
$> lxd-compose node create node1 --hooks --disable-flag foo

Diagnose loaded variables

$> lxd-compose diagnose vars project1

Show list of the project

$> lxd-compose project list

Documentation

Overview

Copyright (C) 2020 Daniele Rondina <geaaru@sabayonlinux.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL