diff --git a/CT-Build/Alpine.Jenkinsfile b/CT-Build/Alpine.Jenkinsfile index 00c9730..30a2107 100644 --- a/CT-Build/Alpine.Jenkinsfile +++ b/CT-Build/Alpine.Jenkinsfile @@ -1,4 +1,4 @@ -String[] ImgVariantList = ['minimal', 'default' , 'gitea' , 'nginx' , 'ddns' , 'transfersh' ] +String[] ImgVariantList = ['minimal', 'default' , 'gitea' , 'nginx' , 'ddns' , 'transfersh' , 'iscsi' ] pipeline { agent { label 'LXCBuilder' } diff --git a/CT-Build/Alpine.yaml b/CT-Build/Alpine.yaml index 8218bf5..4225cf8 100644 --- a/CT-Build/Alpine.yaml +++ b/CT-Build/Alpine.yaml @@ -351,6 +351,13 @@ packages: variants: - transfersh + #PKGS for iscsi + - packages: + - targetcli + action: install + variants: + - iscsi + repositories: - name: /etc/apk/repositories url: |- @@ -400,5 +407,13 @@ actions: - ddns - transfersh +- trigger: post-files + action: |- + #!/bin/sh + rc-update add dbus + rc-update add targetcli + variants: + - iscsi + mappings: architecture_map: alpinelinux diff --git a/Readme.md b/Readme.md index afaf838..45bf113 100644 --- a/Readme.md +++ b/Readme.md @@ -31,7 +31,8 @@ This can be done on a Minimal debian CT (make sure to enable nesting) on the new | gitea | Alpine | Gitea server | | nginx | Alpine | Nginx server for reverse-proxy use | | ddns | Alpine | DDNS client configured for OVH/OVH-Cloud | -| transfersh | Alpine | transfer.sh instance | +| transfersh | Alpine | transfer.sh instance | +| iscsi | Alpine | iSCSI server | ## TODO **Begin original list** @@ -39,7 +40,7 @@ This can be done on a Minimal debian CT (make sure to enable nesting) on the new Hass+Mqtt Z2mqtt+zw2mqtt SMB -iSCSI + Nextcloud @@ -85,23 +86,85 @@ Then select the created credential and click save ## gitea 1. Edit the parameters in the FistRun script in the container `vi /opt/Setup/Scripts/FirstRun.sh` 2. Run the FistRun scipt in the container `ash /opt/Setup/Scripts/FirstRun.sh` -# nginx +## nginx * Run the FistRun scipt in the container `ash /opt/Setup/Scripts/FirstRun.sh` -# pihole +## pihole * Run the FistRun scipt in the container `ash /opt/Setup/Scripts/FirstRun.sh` -# colabora +## colabora * Update the configuration in /etc/loolwsd/loolwsd.xml and reload the service `systemctl restart loolwsd` -# jellyfin +## jellyfin * To set-up the system follow the inital set-up wizard on http://:8096 -# domoticz +## domoticz * Avalible on http://:8080 -# transfersh +## transfersh * Avalible on http://:8080 -# omadaV3 +## omadaV3 * To set-up the system follow the inital set-up wizard on http://:8088 -# docker +## docker * Run the FistRun scipt in the container `ash /opt/Setup/Scripts/FirstRun.sh` This container can be set up in two ways 1. As controller with portainer 2. As remote with docker tcp on port 2375 -3. BONUS if FistRun scipt the CT has clean docker \ No newline at end of file +3. BONUS if FistRun scipt the CT has clean docker +## iscsi +### In Proxmox +* Run following commands +``` +modprobe target_core_mod +printf "#Load iSCSI module at boot\ntarget_core_mod" > /etc/modules-load.d/iSCSI-target.conf +``` +* Add the following to /etc/pve/lxc/.conf +``` +lxc.apparmor.profile: unconfined +``` +* Restart CT + +### In CT +* in the targetcli shell (by using the `targetcli` command) run the following commands +``` +cd /iscsi +create +exit +``` + +# Further CT documentation + +## iscsi +### Allow Remote +Set the iqn of the client to one of the server:hostname/nickname +### In CT +* in the targetcli shell (by using the `targetcli` command) run the following commands +``` +cd /iscsi//tpg1/acls/ +create +exit +``` + + +### Add Drive +#### In Proxmox +* Create LVM Volume (Avalible @ /dev//) +``` +lvcreate --name --size G +``` +* Create ZFS Volume (Avalible @ /dev//) +``` +zfs create -o volblocksize=32k -V G / +zfs set sync=disabled / +``` +* Get id by using ls -l /dev/ +* Add the folling to /etc/pve/lxc/.conf +``` +lxc.cgroup2.devices.allow: b : rwm +lxc.mount.entry: /dev/ dev/ none bind,optional,create=file +``` +* Restart CT +#### In CT +* in the targetcli shell (by using the `targetcli` command) run the following commands +``` +cd /backstores/block +create /dev/ +cd /iscsi//tpg1/luns +create +exit +``` \ No newline at end of file