Added iscsi CT
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
String[] ImgVariantList = ['minimal', 'default' , 'gitea' , 'nginx' , 'ddns' , 'transfersh' ]
|
String[] ImgVariantList = ['minimal', 'default' , 'gitea' , 'nginx' , 'ddns' , 'transfersh' , 'iscsi' ]
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'LXCBuilder' }
|
agent { label 'LXCBuilder' }
|
||||||
|
|||||||
@@ -351,6 +351,13 @@ packages:
|
|||||||
variants:
|
variants:
|
||||||
- transfersh
|
- transfersh
|
||||||
|
|
||||||
|
#PKGS for iscsi
|
||||||
|
- packages:
|
||||||
|
- targetcli
|
||||||
|
action: install
|
||||||
|
variants:
|
||||||
|
- iscsi
|
||||||
|
|
||||||
repositories:
|
repositories:
|
||||||
- name: /etc/apk/repositories
|
- name: /etc/apk/repositories
|
||||||
url: |-
|
url: |-
|
||||||
@@ -400,5 +407,13 @@ actions:
|
|||||||
- ddns
|
- ddns
|
||||||
- transfersh
|
- transfersh
|
||||||
|
|
||||||
|
- trigger: post-files
|
||||||
|
action: |-
|
||||||
|
#!/bin/sh
|
||||||
|
rc-update add dbus
|
||||||
|
rc-update add targetcli
|
||||||
|
variants:
|
||||||
|
- iscsi
|
||||||
|
|
||||||
mappings:
|
mappings:
|
||||||
architecture_map: alpinelinux
|
architecture_map: alpinelinux
|
||||||
|
|||||||
81
Readme.md
81
Readme.md
@@ -32,6 +32,7 @@ This can be done on a Minimal debian CT (make sure to enable nesting) on the new
|
|||||||
| nginx | Alpine | Nginx server for reverse-proxy use |
|
| nginx | Alpine | Nginx server for reverse-proxy use |
|
||||||
| ddns | Alpine | DDNS client configured for OVH/OVH-Cloud |
|
| ddns | Alpine | DDNS client configured for OVH/OVH-Cloud |
|
||||||
| transfersh | Alpine | transfer.sh instance |
|
| transfersh | Alpine | transfer.sh instance |
|
||||||
|
| iscsi | Alpine | iSCSI server |
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
**Begin original list**
|
**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
|
Hass+Mqtt
|
||||||
Z2mqtt+zw2mqtt
|
Z2mqtt+zw2mqtt
|
||||||
SMB
|
SMB
|
||||||
iSCSI
|
|
||||||
|
|
||||||
|
|
||||||
Nextcloud
|
Nextcloud
|
||||||
@@ -85,23 +86,85 @@ Then select the created credential and click save
|
|||||||
## gitea
|
## gitea
|
||||||
1. Edit the parameters in the FistRun script in the container `vi /opt/Setup/Scripts/FirstRun.sh`
|
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`
|
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`
|
* 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`
|
* 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`
|
* 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://<ip>:8096
|
* To set-up the system follow the inital set-up wizard on http://<ip>:8096
|
||||||
# domoticz
|
## domoticz
|
||||||
* Avalible on http://<ip>:8080
|
* Avalible on http://<ip>:8080
|
||||||
# transfersh
|
## transfersh
|
||||||
* Avalible on http://<ip>:8080
|
* Avalible on http://<ip>:8080
|
||||||
# omadaV3
|
## omadaV3
|
||||||
* To set-up the system follow the inital set-up wizard on http://<ip>:8088
|
* To set-up the system follow the inital set-up wizard on http://<ip>:8088
|
||||||
# docker
|
## docker
|
||||||
* Run the FistRun scipt in the container `ash /opt/Setup/Scripts/FirstRun.sh`
|
* Run the FistRun scipt in the container `ash /opt/Setup/Scripts/FirstRun.sh`
|
||||||
This container can be set up in two ways
|
This container can be set up in two ways
|
||||||
1. As controller with portainer
|
1. As controller with portainer
|
||||||
2. As remote with docker tcp on port 2375
|
2. As remote with docker tcp on port 2375
|
||||||
3. BONUS if FistRun scipt the CT has clean docker
|
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/<CT-ID>.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 <iqn for this server,Example:(iqn.2021-09.lan.test:host)>
|
||||||
|
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/<server-iqn>/tpg1/acls/
|
||||||
|
create <client-iqn>
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Add Drive
|
||||||
|
#### In Proxmox
|
||||||
|
* Create LVM Volume (Avalible @ /dev/<poolName>/<VolumeName>)
|
||||||
|
```
|
||||||
|
lvcreate --name <name> --size <VolumeSize>G <PoolName>
|
||||||
|
```
|
||||||
|
* Create ZFS Volume (Avalible @ /dev/<poolName>/<VolumeName>)
|
||||||
|
```
|
||||||
|
zfs create -o volblocksize=32k -V <VolumeSize>G <poolName>/<VolumeName>
|
||||||
|
zfs set sync=disabled <poolName>/<VolumeName>
|
||||||
|
```
|
||||||
|
* Get id by using ls -l /dev/<devicename>
|
||||||
|
* Add the folling to /etc/pve/lxc/<CT-ID>.conf
|
||||||
|
```
|
||||||
|
lxc.cgroup2.devices.allow: b <id>:<Subid> rwm
|
||||||
|
lxc.mount.entry: /dev/<devicename> dev/<device> 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 <name> /dev/<device>
|
||||||
|
cd /iscsi/<server-iqn>/tpg1/luns
|
||||||
|
create <device>
|
||||||
|
exit
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user