ravenliquid

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ravenliquid's Achievements

Noob

Noob (1/14)

0

Reputation

  1. Everything is working great, I can even get the IP from the ansible module return value after running the SSH setup commands in the container. So I can just get the IP from the result and reconnect via SSH right away without having to resolve the IP from the hostname. Thanks! I'll set it up with un-get. One more question regarding the template parameter: It currently uses "/usr/share/lxc/templates/lxc-download", which suggests it will download the template. There is also lxc-local (or something similar, can't check right now). Should it check local first and if not available download the template or does it automatically do this with lxc-download? (I pulled the path from a UI created container config, just like the other values I needed).
  2. It seems to be working! Managed to create a container through Ansible. Had some issues with starting until I copied the root and config path patterns from a container created trough the UI. Only thing not working seems to be the network so I'll have to see how to copy that as it just seems not set. Something for tomorrow, been a long day and I'm very happy with my progress so far all thanks to you! Edit: Networking also works as well as running commands from ansible in the container to setup ssh. And that is enough to reconnect via ssh and run all the container setup without the need for anything else on the Unraid host.
  3. Didn't think about using Debian to build the package. But I have to say my Linux knowledge about portability is not that great. Python3 I just pulled from the plugins. It also included pip and some other stuff. And don't sweat it, if it is something I can figure out I'm happy enough with the information you already provided.
  4. Didn't know it was available on pip. Tried it but it boils down to the same issue: it tries to build it and thus I get the exact same error. Did some more digging and I figured out it expects the limits.h to be in /usr/include. It is not there of course, and I don't quite understand what does place those files there. I though kernel-headers would be the source but I guess those go in to the /usr/include/linux subfolder. I think it comes down to missing part of the build toolchain (I'm more of a Debian user which has a package for that, and also a .net developer so the C/C++ tool chains is something I have avoided for many years now since I last used it. For this exact reason... dependencies, includes and libs). I don't know if this exists, but would a solution be to find something like a slackware VM image that has all those things out of the box? A slackware dev box? And then build and copy the binary? I don't know how your toolchain looks like for the stuff you make for unraid, but I guess this is something you run in to as well? I agree with you on the whole Red Hat issue, they have been making dumb choices for a while now. Something to keep in mind down the line, especially considering Ansible is heavily supported by the community. But Unraid is also not in the open source regard, I can get behind the paid license but it would be nice if the rest was more open to build your own and not be as restricted.
  5. Ansible is indeed used for automation, it uses SSH connections to run tasks on remote systems. Most of these tasks are modules build with python. The module I want to use allows Ansible to create and run commands in LXC containers, but the module is build on top of python3-lxc. A python library for interfacing with LXC. I created a lot of playbooks for proxmox to create containers and install applications with automatic backup and restore so that they can be quickly and easily deployed anywhere without much knowledge and configuration. I modified them to also support the lxc module (proxmox has it's own that works a little different). LXD is a different module so I don't think there is a dependency. The most basic functionality I need is remote creation and start, SSH root access and the IP address it got after creation. If Ansible can do those steps, it can then switch to SSH in the container and continue as normal (setup users, applications, restore backups etc.).
  6. What do you mean? Neither docker or a VM is a solution here. I cannot virtualize Unraid due to some hardware/driver issue that prevents me from giving unraid direct disk access, and there is nothing to virtualize otherwise. Ansible is not running on the machine that runs Unraid, I just want to provision it from Ansible. I don't need a general purpose Linux, I just need the LXC plugin from the Unraid plugin frontend and python bindings for it. The only part that doesn't work is the bindings because I would need to compile them as there is no precompiled slackware package available.
  7. I have Unraid running bare metal on an HP Gen 8 microserver because I couldn't get PCI passthrough working for the raid card. My original choise was to run it on Proxmox but I thought it would be fine as I wanted to automate most stuff through ansible ans there is a LXC plugin. So part of that plan worked, until I found out that Unraid runs Slackware, and slackware is basically everything I hated about Linux years ago before. The issue: I can't get the lxc-container module from ansible working on Unraid because it depends on python3-lxc. Not a problem on debian as there is a package, big issue on slackware as I cannot get it to build from source due to the dependency hell I have to solve. I'm getting a bit desperate, so I'm kind of afraid I'm going to break the OS. I installed NerdTools, but it doesn't list anything I need. I installed packages through upgradepkg from pkgs.org (first ofcourse the wrong ones for 14.2 until I figured out my OS is 15) - pkg-config - gcc - gcc g++ And then I hit a nice error about limits.h root@Tower:~/repos/python3-lxc# python3 setup.py build running build running build_py running build_ext Package lxc was not found in the pkg-config search path. Perhaps you should add the directory containing `lxc.pc' to the PKG_CONFIG_PATH environment variable No package 'lxc' found building '_lxc' extension gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/python3.9 -c lxc.c -o build/temp.linux-x86_64-cpython-39/lxc.o In file included from /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/include-fixed/syslimits.h:7, from /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/include-fixed/limits.h:34, from /usr/include/python3.9/Python.h:11, from lxc.c:25: /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/include-fixed/limits.h:203:15: fatal error: limits.h: No such file or directory 203 | #include_next <limits.h> /* recurse down to the real one */ | ^~~~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 Which I just can't fix and can't find a solution for. I installed slackpg hoping it would fix dependencies but no luck. I installed kernel-headers from there as I read some where it should contain the header. But no luck. I'm also not quite sure if the error about lxc is an issue. I would appreciate any help pointing me in a direction that helps m