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 {
|
||||
agent { label 'LXCBuilder' }
|
||||
|
||||
@@ -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
|
||||
|
||||
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 |
|
||||
| ddns | Alpine | DDNS client configured for OVH/OVH-Cloud |
|
||||
| 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://<ip>:8096
|
||||
# domoticz
|
||||
## domoticz
|
||||
* Avalible on http://<ip>:8080
|
||||
# transfersh
|
||||
## transfersh
|
||||
* Avalible on http://<ip>:8080
|
||||
# omadaV3
|
||||
## omadaV3
|
||||
* 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`
|
||||
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
|
||||
## 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