Compare commits

...
6 Commits
Author SHA1 Message Date
xavierandClaude 3c8e9f532e fix: Swap btrfs and zfs storage profile filenames
The file contents were inverted:
- btrfs.profile.yaml contained the zfs profile
- zfs.profile.yaml contained the btrfs profile

Fixed by swapping the filenames to match their content.

Fixes #8

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 23:16:11 +02:00
xavier 320d3b5bb8 Merge pull request 'feat: Add LXD host socket profile for container management' (#6) from feat/lxd-host-socket-profile into dev
Reviewed-on: cloud.logerais.com/lxd-profiles#6
2025-10-05 23:29:43 +02:00
xavierandClaude 736d47ee72 fix: Use ubuntu:lts for consistency in documentation examples
Replace ubuntu:22.04 with ubuntu:lts in test container creation example
to maintain consistency with other examples in the documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 23:28:08 +02:00
xavierandClaude dbe4414499 feat: Add LXD host socket profile for container management
This profile allows containers to access the host LXD daemon via Unix socket,
enabling centralized LXD management from within containers.

Features:
- Proxy host LXD socket to container at same path
- Automatic LXD client installation via snap
- No additional configuration required
- Practical guide and example script included

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 23:28:08 +02:00
xavier 1d8eecc674 Merge pull request 'fix: Standardize proxy profile filenames to use .profile.yaml extension' (#7) from fix/proxy-profiles-naming-consistency into dev
Reviewed-on: cloud.logerais.com/lxd-profiles#7
2025-10-05 23:27:51 +02:00
xavierandClaude a51c432c66 fix: Standardize proxy profile filenames to use .profile.yaml extension
Rename all proxy profile files to follow the repository naming convention:
- proxy-docker-tcp.yaml -> proxy-docker-tcp.profile.yaml
- proxy-docker-unix.yaml -> proxy-docker-unix.profile.yaml
- proxy-http.yaml -> proxy-http.profile.yaml
- proxy-https.yaml -> proxy-https.profile.yaml
- proxy-taskwarrior.yaml -> proxy-taskwarrior.profile.yaml

This ensures consistency across all profile categories in the repository.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 00:01:48 +02:00
10 changed files with 108 additions and 6 deletions

No files matched your search

+65
View File
@@ -0,0 +1,65 @@
# Create LXD Manager Container
## Install Profile
Install the lxd-host-socket profile :
```bash
lxc profile create lxd-host-socket
curl https://gitea.cloud.logerais.com/cloud.logerais.com/lxd-profiles/raw/branch/main/profiles/containerization/lxd-host-socket.profile.yaml | lxc profile edit lxd-host-socket
```
Or use the local profile:
```bash
./install.bash profiles/containerization/lxd-host-socket.profile.yaml
```
## Launch Container
Create and start an LXD manager container:
```bash
lxc launch ubuntu:lts -p default -p lxd-host-socket lxd-manager
```
### Fix IP Address (Optional)
To assign a static IP address:
```bash
lxc network attach lxdbr0 lxd-manager eth0 eth0
lxc config device set lxd-manager eth0 ipv4.address 10.0.1.20
```
## Use the Container
Access the container and manage host LXD:
```bash
# Wait for cloud-init to complete
lxc exec lxd-manager -- cloud-init status --wait
# Access the container
lxc shell lxd-manager
# Inside the container - verify LXD client is installed
lxc version
# List containers on the host
lxc list
# Create a new container from the manager
lxc launch ubuntu:lts test-container
# Manage the new container
lxc info test-container
lxc stop test-container
lxc delete test-container
```
## Security Warning
⚠️ **This container has full access to the host LXD daemon**. Use only in trusted environments and limit access to this management container.
Your LXD manager container is now ready for centralized container management.
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
CONTAINER_NAME="${1:-lxd-manager}"
echo "Creating LXD manager container: $CONTAINER_NAME"
# Install the profile using the helper script
./install.bash profiles/containerization/lxd-host-socket.profile.yaml
# Launch the container
lxc launch ubuntu:lts -p default -p lxd-host-socket "$CONTAINER_NAME"
# Wait for cloud-init
echo "Waiting for cloud-init to complete..."
lxc exec "$CONTAINER_NAME" -- cloud-init status --wait
echo "LXD manager container '$CONTAINER_NAME' is ready!"
echo "Access with: lxc shell $CONTAINER_NAME"
echo "WARNING: This container has full access to host LXD daemon"
@@ -0,0 +1,18 @@
name: lxd-host-socket
description: "Permet à un container d'accéder au démon LXD de l'hôte via le socket Unix"
devices:
lxd-socket:
type: proxy
listen: unix:/var/snap/lxd/common/lxd/unix.socket
connect: unix:/var/snap/lxd/common/lxd/unix.socket
uid: 0
gid: 0
mode: "0660"
config:
cloud-init.vendor-data: |
#cloud-config
package_update: true
packages:
- snapd
runcmd:
- snap install lxd --channel=latest/stable
File renamed without changes.
File renamed without changes.
+3 -3
View File
@@ -1,7 +1,7 @@
name: zfs name: btrfs
description: "root device on zfs pool" description: "root device on btrfs pool"
devices: devices:
root: root:
type: disk type: disk
pool: zfs pool: btrfs
path: / path: /
+3 -3
View File
@@ -1,7 +1,7 @@
name: btrfs name: zfs
description: "root device on btrfs pool" description: "root device on zfs pool"
devices: devices:
root: root:
type: disk type: disk
pool: btrfs pool: zfs
path: / path: /