GithubHelp home page GithubHelp logo

juju4 / ansible-lxd Goto Github PK

View Code? Open in Web Editor NEW
26.0 6.0 11.0 213 KB

Ansible role to setup LXD, its bridge, pre-copy images and eventually pre-configure some

License: BSD 2-Clause "Simplified" License

Shell 34.70% Ruby 24.78% Jinja 40.51%

ansible-lxd's Introduction

Actions Status - Master Actions Status - Devel

LXD ansible role

Ansible role to install LXD only and do network configuration. https://linuxcontainers.org/lxd/getting-started-cli/

Containers configuration or publishing is done in separated roles.

Requirements & Dependencies

Ansible

It was tested on the following versions:

  • 2.0
  • 2.2
  • 2.5

Operating systems

Tested on Ubuntu 18.04, 20.04 and 22.04. Initial support for RHEL/Centos7 through ngompa/snapcore-el7 copr.

Example Playbook

Just include this role in your list. For example

- host: all
  roles:
    - juju4.lxd

Variables

Nothing specific for now.

Continuous integration

This role has a travis test calling kitchen with lxd (for github), kitchen local with vagrant+virtualbox and also a Vagrantfile (test/vagrant).

Once you ensured all necessary roles are present, You can test with:

$ cd /path/to/roles/juju4.lxd
## lxd backend
$ kitchen verify
$ kitchen login
## vagrant+virtualbox backend
$ KITCHEN_YAML=".kitchen.vagrant.yml" kitchen verify

or

$ cd /path/to/roles/juju4.lxd/test/vagrant
$ vagrant up
$ vagrant ssh

Troubleshooting & Known issues

  • for network connectivity check if http_proxy is set (usually from /etc/default/lxd-bridge proxy settings) check iptables nat config for masquerading
# iptables -t nat -L
## if empty
# iptables -t nat -A POSTROUTING -s 10.x.y.0/24 -o eth0 -j MASQUERADE
  • if you want to forward traffic external to host to one of the private lxc container
# iptables -t nat -A PREROUTING -i if_incoming -p tcp --dport port_incoming -j DNAT --to-destination container_ip:container_port
  • role can be executed on centos/redhat system on containers as kernel is host's but RHEL/CentOS 7 has kernel 3.10 which is ?not compatible with LXC.
  • service command on centos7 stalling
$ /bin/systemctl start lxd

License

BSD 2-clause

ansible-lxd's People

Contributors

ahnooie avatar aiqs4 avatar dependabot[bot] avatar jfowl avatar juju4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ansible-lxd's Issues

Ansible-galaxy install version detection problem

When I try ansible-galaxy install juju4.lxd, I get:

- downloading role 'lxd', owned by juju4
 [WARNING]: - juju4.lxd was NOT installed successfully: Unable to compare role versions (v0.8, 0.9.0) to determine the
most recent version due to incompatible version formats. Please contact the role author to resolve versioning
conflicts, or specify an explicit role version to install.

ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.

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.