How to mount a local directory or volume with lxd

1. expand the range of uid and gid available by editing /etc/subuid and /etc/subgid

brandon@somehost:~$ sudo cat /etc/subuid
lxd:1000:100000000
root:1000:100000000

brandon@somehost:~$ sudo cat /etc/subgid
lxd:1000:100000000
root:1000:100000000

2. restart lxd to apply those changes
brandon@somehost:~$ sudo /etc/init.d/lxd restart
[ ok ] Restarting lxd (via systemctl): lxd.service.

3. launch your container
brandon@somehost:~$ lxc create :ubuntu $your_container
where you replace the $your_container value with whatever you would like to call your lxd container

4. enable an isolated idmap for your container
brandon@somehost:~$ lxc config set $your_container security.idmap.isolated true

5. map the local user ids and group ids to the in container uid and gid
brandon@somehost:~$ lxc config set bootybox raw.idmap "both 1000-2000 3000-4000"
where the parameters being passed in this example mean both (uid, and gid) in the range of 1000-2000 on the local host will be mapped to the range of 3000-4000 inside of the lxd container.

ex: uid 1001 on the local host = uid 3001 inside of the container

6. add your media
brandon@somehost:~$ lxc config device add $your_container media disk source=/zpool1/media/ path=/media
media = the name you would like to give this attachment
source = the source on the local host of the directory you would like to share
path = the path inside the container you would like to mount the source (make sure this exists)

7. restart your container for the new mappings to kick in
brandon@somehost:~$ lxc restart bootybox

8. exec into your container and check that all is well
brandon@somehost:~$ lxc exec bootybox bash
root@mycontainer:~# ls -l /media/
total 76
drwxrwx--- 2 3000 3001 2 Jun 2 21:22 games
...

9. profit.

$49 Cubieboard is a raspberry pi competitor.

The $49 Cubieboard is a slightly more expensive, but better suited for duty as an HTPC option to the raspberry pi. It even has an IR receiver built in. Specifications below.

  • 1G ARM cortex-A8 processor, NEON, VFPv3, 512KB L2 cache
  • Mali400, OpenGL ES GPU
  • 1GB DDR3 @480MHz
  • HDMI 1080p Output
  • 100M Ethernet
  • 4GB Nand Flash
  • 2 USB Host, 1 MMC slot, 1 SATA, 1 ir
  • 96 extend pin including i2c, spi, lcd, sensors, ..
  • Running Android, Ubuntu and other Linux distributions
  • NO WIFI included

via liliputing

Installing and configuring freeswitch: part 1

These instructions detail compiling and installing freeswitch under centos 5.x. It should be noted that this was done successfully under a xen vm hosted at linode.

yum -y install subversion autoconf automake libtool gcc-c++ ncurses-devel make
mkdir /usr/src/freeswitch
cd /usr/src/freeswitch
svn co http://svn.freeswitch.org/svn/freeswitch/tags/1.0.2/
cd 1.0.2
./bootstrap.sh
./configure --prefix=/usr/local/freeswitch

make
make install
make sounds-install
make moh-install

cd build
cp freeswitch.init.redhat /etc/init.d/freeswitch
chmod 755 /etc/init.d/freeswitch

useradd -c 'Freeswitch User' -s /sbin/nologin fsuser
vim /etc/init.d/freeswitch

FS_USER=fsuser

dacrib.net migration

I migrated dacrib.net from a shared hosting instance provided by a friend at hostrocket, to a xen instance on linode.com today. So far so good.

Things left to do:
1. set up a cron for offsite backups to somewhere else w/ rotation
2. make sure the gallery installation is still working, including admin section
3. update gallery install
4. test video portions of gallery install
5. fix mod_rewrite so pretty permalinks work
6. set up an open source PBX
7. set up fail2ban