*New 12.1 series Release:
2020-09-13: XigmaNAS 12.1.0.4.7743 - released

*New 11.4 series Release:
2020-09-12: XigmaNAS 11.4.0.4.7741 - released!


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

[HOWTO] Install TheBrig - one Jail manager for N4F

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
wenger
NewUser
NewUser
Posts: 4
Joined: 15 Jun 2019 22:18
Location: Novgorod Russia
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#721

Post by wenger »

alexey123 wrote:
07 Nov 2018 17:44
I repaired fstab editor page
https://github.com/fsbruva/thebrig/comm ... 2d7c134b7f
just update TheBrig

Many thanks for bug report
There is minor error remaining
"Warning: Invalid argument supplied for foreach() in /mnt/pool/theBrig/conf/ext/thebrig/extensions_thebrig_fstab.php on line 52"
XigmaNAS 12.0.0.4 embedded on N3150/8Gb/6Tb ZFS | OBI&TheBrig&Plex&CIFS/SMB&Syncthing&Transmission

wenger
NewUser
NewUser
Posts: 4
Joined: 15 Jun 2019 22:18
Location: Novgorod Russia
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#722

Post by wenger »

Trying to update jail from 11.2 to 12.0-RELEASE.
After ticking the jail and clicking the Fetch button, there is message appears

Code: Select all

src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 12.0-RELEASE from update4.freebsd.org... done.
Fetching metadata index... done.
Fetching 3 metadata files... failed.
and process is stopped.

Update. Unfortunately there was broke the jail creation and deletion with 12.0 system upgrade.
- creation: populates filesystem, makes a section in system config.xml, but not in thebrig.conf. conf/jails/fstab.XYZ also doesn't appear. In the On-line view jail presents but not starts with "jls: jail XYZ not found" logged error.
- deletion: seems to do nothing, even not make the farewell tarball. All the jail's files and config sections remains intact.

Update2. Managed to run semi-created by theBrig jail with manual adding appropriate sections in theBrig files 'thebrig.conf', 'devfs.rules' and creating new file 'jails/fstab.XYZ'. Works good.
Jail deletion still not work anyway.


Update 3. It was a false alarm. According to extensions_thebrig.php

Code: Select all

if ( !file_exists($d_sysrebootreqd_path) ){
        if(isset($config['thebrig']['content']) ) {
                //write_rcconflocal();
                write_defs_rules();
                write_jailconf ();
                ...
there is no any fstab nor jail config files are intentionally written if the reboot required. I have this flag set for weeks, especially about minor changes that are not relevant to jails. Somewhat strange behaviour to leave setup process in middle state.
XigmaNAS 12.0.0.4 embedded on N3150/8Gb/6Tb ZFS | OBI&TheBrig&Plex&CIFS/SMB&Syncthing&Transmission

alexnas
NewUser
NewUser
Posts: 1
Joined: 17 Sep 2019 22:56
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#723

Post by alexnas »

Hi!

Does someone have an idea how to deal with "Warning: array_search() expects parameter 2 to be array, null given in /mnt/Pool/Jails/conf/ext/thebrig/extensions_thebrig_tarballs.php on line 104" error while querying for tarballs?

1. Install NAS4Free 11.1.0.4.
2. Create ZFS pool.
3. Create dataset Jails.
4. Install TheBrig using either OBI or thebrig_install.sh.
5. Maintenance - Rudimentary Config - Save.
6. Maintenance - Tarball Management - Query!
7. A lot of "Warning: array_search() expects parameter 2 to be array, null given in /mnt/Pool/Jails/conf/ext/thebrig/extensions_thebrig_tarballs.php on line 104".

XigmaNAS 11.1.0.4 (NAS4Free)
The Brig alcatraz branch

Thanks for replies!

UPD1 I suggest the error is caused by missing tarballs for FreeBSD 11.1. Need some time to check it.
UPD2 Exactly. After upgrading to 12.0.0.4 everything works like a charm.

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#724

Post by JoseMR »

Hello I've developed a new Jail/Containers manager Extension for XigmaNAS as an alternative to TheBrig, the Bastille Container Manager Extension.

While the Bastille Extension is oriented to be as user friendly "Point-Click-and-Create" it is not limited to, advanced users can also manually edit the configurations files withing the GUI for ZFS and/or complex networking setups.

Note: Minimum Platforms version supported is 11.2 x64.

Screenshot:
Bastille_Container_Manager.png
More information Here.

Regards
You do not have the required permissions to view the files attached to this post.
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#725

Post by alexey123 »

I make small correction for TheBrig and add bhyve support
Image

Also user can rename jail's epair interface as user want. I renamed interface to msk0
Image

Users can run bhyve virtual machines under jail.

Thebrig load kernel modules vmm.ko and nmdm.ko and create device filesystem rules itself

just need add some commands inside jail

Code: Select all

ifconfig bridge0 create
ifconfig bridge0 addm msk0 where msk0 my renamed jail network interface
ifconfig tapX create
ifconfig bridge addm tapX
sh /usr/share/examples/bhyve/vmrun.sh -c 2 -m 2G -t tap0 -d freebsd12.img freebsd12

User can prepare script and run it as afterstart_for_jail startup script.

Image


It run under FreeBSD12 based Xigmanas
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

cookiemonster
Advanced User
Advanced User
Posts: 321
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#726

Post by cookiemonster »

great to see thebrig still under development!
By the way, any chance of seeing about the defect where it assigns the jails ip addresses to the httpd config? Happy to log a bug in sourceforge or where appropriate if it helps.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#727

Post by alexey123 »

Thanks

Which bug at httpd ? Just yesterday I build jail for aquarium monitor, and apache24 work without problem on vnet enabled jail
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
darioml
Starter
Starter
Posts: 33
Joined: 08 Feb 2016 20:09
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#728

Post by darioml »

I'm also glad that TheBrig goes on :)

@alexey123, I had a "small" accident where I lost the dataset where TheBrig was installed. But the jails are intact, as well as the general XigmaNAS config.xml, where their configuration is stored.

How would be the procedure to properly recover the jails and not loose anything? Should I installed TheBrig by OBI or manually? Will it recognize the former configuration automatically? Should I do anything different?

Thank you!

Enviado desde mi CLT-L29 mediante Tapatalk


User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#729

Post by alexey123 »

As for me, faster create new jails

You can use OBI or manual instalation, no difference. OBI use original TheBrig install script, just add path from webgui.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

cookiemonster
Advanced User
Advanced User
Posts: 321
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#730

Post by cookiemonster »

alexey123 wrote:
15 Jan 2020 07:20
Which bug at httpd ? Just yesterday I build jail for aquarium monitor, and apache24 work without problem on vnet enabled jail
Hello and sorry I didn't reply earlier Alexey. This behaviour has been reported before on the forum. Unfortunately I think the move to new domain has left some links broken. I've done a few searches and the one that brings some results is this one: viewtopic.php?f=15&t=13650&p=88950&hilit=thebrig#p88950 which on post 44 gives a now-broken link : viewtopic.php?t=14224&f=57#p88272. Are you able to resurrect the link by the way?
The person that helps the most with this is JoseMR. If you do a search by that user (thanks JoseMR) with keyword "thebrig" will get you a few references.
Essentially if one is using thebrig and has XN set to DHCP, there are cases when the jail ip addresses get inserted into the NAS httpd config file. I think I've been able to tickle the "defect" when: set xn with dhcp; go to thebrig and modify an existing jail. Alter the network settings, for instance change the nic.
Of course it's an edge case, for instance the user is rebuilding on different hardware.
I haven't tried it with just changing ip address. It might not be enough to trigger it.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

User avatar
alexey123
Moderator
Moderator
Posts: 1560
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#731

Post by alexey123 »

I begin investigation bug.
In first, when I use static IP on main Xigmanas, I not see this bug few years, when I use vnet jail or regular jails.
I begin run under virtualbox Xigmanas with dhcp.
few times I execute reboot, and 2 jails first regular and second vnet enabled, was start normally, webgui was start normally also.
May be dhcp server give IP adress for Xigmanas some as jail's IP ? You just define jail IP out of dhcp range
What services run on your jails ?

BUT
I find very strangle at start-up sequence
Command

Code: Select all

xigmanasvb: ~# service -rv
result:

Code: Select all

/etc/rc.d/system_init
/etc/rc.d/SYSTEMINIT
/etc/rc.d/rcconf
/etc/rc.d/execcmd_preinit
/etc/rc.d/timezone
/etc/rc.d/userdb
/etc/rc.d/CONFIG
/etc/rc.d/geom
/etc/rc.d/geli
/etc/rc.d/swap
/etc/rc.d/fsck
/etc/rc.d/root
/etc/rc.d/sysctl
/etc/rc.d/fusefs
/etc/rc.d/mountcritlocal
/etc/rc.d/var
/etc/rc.d/cleanvar
/etc/rc.d/FILESYSTEMS
========= Early/Late Divider =========
/etc/rc.d/adjkerntz
/etc/rc.d/hostname
/etc/rc.d/ip6addrctl
/etc/rc.d/netoptions
/etc/rc.d/random
/etc/rc.d/vmsetup
/etc/rc.d/ipfilter
/etc/rc.d/hostid
/etc/rc.d/netif
/etc/rc.d/devd
/etc/rc.d/hosts
/etc/rc.d/ipfw
/etc/rc.d/ldap
/etc/rc.d/netfix
/etc/rc.d/nsswitch
/etc/rc.d/pam
/usr/local/etc/rc.d/vboxnet
/etc/rc.d/resolv
/etc/rc.d/pfsync
/etc/rc.d/pflog
/etc/rc.d/pf
/etc/rc.d/routing
/etc/rc.d/NETWORKING
/etc/rc.d/ctld
/etc/rc.d/netwait
/etc/rc.d/iscsi_initiator
/etc/rc.d/mountcritremote
/etc/rc.d/dmesg
/etc/rc.d/clog
/etc/rc.d/syslogd
/etc/rc.d/hastd
/etc/rc.d/iscsid
/etc/rc.d/ntpdate
/etc/rc.d/rpcbind
/etc/rc.d/nfsuserd
/etc/rc.d/mountd
/etc/rc.d/nfsd
/etc/rc.d/statd
/etc/rc.d/lockd
/etc/rc.d/msmtp
/etc/rc.d/devfs
/etc/rc.d/SERVERS
/etc/rc.d/DAEMON
/etc/rc.d/ataidle
/etc/rc.d/iscsi_target
/etc/rc.d/local
/etc/rc.d/motd
/etc/rc.d/nut
/etc/rc.d/nut_upslog
/etc/rc.d/nut_upsmon
/etc/rc.d/powerd
/etc/rc.d/proftpd
/etc/rc.d/proxy
/etc/rc.d/raki
/etc/rc.d/samba
/etc/rc.d/smartd
/etc/rc.d/vmguestd
/etc/rc.d/LOGIN
/usr/local/etc/rc.d/vboxwebsrv
/usr/local/etc/rc.d/vboxwatchdog
/usr/local/etc/rc.d/vboxheadless
/usr/local/etc/rc.d/mysql-server
/etc/rc.d/zfs
/etc/rc.d/zfsd
/etc/rc.d/zfsbe
/etc/rc.d/websrv_htpasswd
/etc/rc.d/websrv
/etc/rc.d/vbox
/etc/rc.d/unison
/etc/rc.d/transmission
/etc/rc.d/execcmd_postinit
/etc/rc.d/thebrig
/etc/rc.d/tftpd
/etc/rc.d/syscons
/etc/rc.d/syncthing
/etc/rc.d/swaplate
/etc/rc.d/sshd
/etc/rc.d/rsync_client
/etc/rc.d/rsync_local
/etc/rc.d/cron
/etc/rc.d/jail
/etc/rc.d/securelevel
/etc/rc.d/rsyncd
/etc/rc.d/ppp
/etc/rc.d/nfscbd
/etc/rc.d/netatalk
/etc/rc.d/mysqldb
/etc/rc.d/mt-daapd
/etc/rc.d/moused
/etc/rc.d/minidlna
/etc/rc.d/microcode_update
/etc/rc.d/mdnsresponder
/etc/rc.d/htpasswd
/etc/rc.d/lighttpd
/etc/rc.d/LCDd
/etc/rc.d/lcdproc
/etc/rc.d/inadyn
/etc/rc.d/hostapd
/etc/rc.d/fuppes
/etc/rc.d/fmperm
/etc/rc.d/devmatch
/etc/rc.d/bsnmpd
/etc/rc.d/bgfsck
/etc/rc.d/beep
/etc/rc.d/autosnapshot
I explain.
When we rewrite TheBrig to alctraz branch /etc/rc.d/execcmd_postinit was execute after all system services and before bgfsck.
So, all system services was started and sockets opened when Thebrig must start
I check on FreeBSD 12 machine - some issue,

May be need ask Xigmanas developers about startup sequence, why we cannot start some services between /etc/rc.d/SERVERS and
/etc/rc.d/DAEMON
?

In all cases
For reorder start of thebrig after start webgui, you can simple edit conf/bin/jail.sh file, at section start
# PROVIDE: thebrig
# REQUIRE: execcmd_postinit lighttpd
# BEFORE: securelevel
# KEYWORD: shutdown
# XQUERY: -i "count(//thebrig/thebrig_enable) > 0" -o "0" -b
# RCVAR: thebrig
I marked green addition

This way not clear, but can be as crunch
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

nef
Starter
Starter
Posts: 25
Joined: 13 Dec 2015 18:40
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#732

Post by nef »

I'm very happy that The Brig is receiving updates. Many thanks for that!
System specs: XigmaNAS embedded on USB / MB: AsRock Rack C236 WSI / CPU: E3-1235L v5 @ 2.0GHz / RAM: 32GB Kingston DDR4 2133mhz ECC / Case: U-NAS NSC-800 / Storage: 8x Western Digital Red (WD30EFRX) raidz2 / 120GB L2ARC MP500 / Mellanox ConnectX-3

cookiemonster
Advanced User
Advanced User
Posts: 321
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

#733

Post by cookiemonster »

Thank you for looking into it Alexey. I will bear in mind until I get to test. By the way my jail's have static IPS set in thebrig in the same range of the DHCP server but I see no conflicts in the DHCP server logs. The sigma host is set as static now.
Great to see you investigating!
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

Post Reply

Return to “Jails”