fog / clonedeploy notes:

fog =
clonedeploy =

* use normal LXC debian template - container with 8 GB RAM, 1 GB swap, 4 CPU, 20 GB HDD
* for fog vm, on server:
# this is the "right" way to do it, but there are more problems because apparmor blocks systemd starting things with PrivateTmp... I'm giving up and making it unconfined for now.
#cp /etc/apparmor.d/lxc/lxc-default-with-mounting /etc/apparmor.d/lxc/lxc-default-with-nfsd
#sed -i -e 's/^profile lxc-container-default-with-mounting/profile lxc-container-default-with-nfsd/g' -e 's/^  mount fstype=ext\*,$/  mount fstype=rpc_pipefs,/g' -e 's/^  mount fstype=xfs,$/  mount fstype=nfsd,/g' -e '/^  mount fstype=btrfs,$/d' /etc/apparmor.d/lxc/lxc-default-with-nfsd
#systemctl restart apparmor
#echo 'lxc.aa_profile: lxc-container-default-with-nfsd' >> /etc/pve/lxc/VMID.conf

echo 'lxc.aa_profile: unconfined' >> /etc/pve/lxc/VMID.conf
mkdir /root/fog-images
pct set VMID -mp0 mp=/images,/root/fog-images

* for clonedeploy vm, on server:
mkdir /root/cd-images
pct set VMID -mp0 mp=/cd_dp,/root/cd-images

within both containers:
* aptitude update && aptitude full-upgrade && aptitude forget-new
* adduser tdobes
* adduser tdobes adm && adduser tdobes systemd-journal

on fog container (see
wget --no-check-certificate
tar -xzf 1.3.0-RC-8.tar.gz
cd fogproject-1.3.0-RC-8/bin
choose distro: 2
normal or storage: n
DHCP to handle DNS: n
use FOG for DHCP: n
install languages: n
mine cryptocurrency: n
continue: y
is mysql password blank: y
when prompted, visit http://SERVER/fog/management in a web browser and click button to update schema
when browser indicates success, go back to terminal and press ENTER
eventually setup will complete, then you can log in at:
(username: fog, password: password)

# TODO: make this use mariadb instead of oracle mysql

...tried to connect client to server, but ran into trouble with certs... maybe client needs to use hostname instead of IP?

* on clonedeploy (see
aptitude install unzip # needed for patch
apt-key adv --keyserver hkp:// --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list
echo "deb wheezy-apache24-compat main" >> /etc/apt/sources.list.d/mono-xamarin.list
echo "deb wheezy-libjpeg62-compat main" >> /etc/apt/sources.list.d/mono-xamarin.list
aptitude update && aptitude forget-new
aptitude install mono-devel libapache2-mod-mono apache2 udpcast liblz4-tool
aptitude install mariadb-server
aptitude install samba
aptitude install tftpd-hpa

tar -xzf clonedeploy-1.1.0.tar.gz
cd clonedeploy/web
unzip -o ../../
cd ../..

cd clonedeploy
wget -O clonedeploy.conf
# all that's different in this file is AddType text/plain .asmx
cp clonedeploy.conf /etc/apache2/sites-available/
cp -r web /var/www/html/clonedeploy
cp -r tftpboot /
ln -s ../../images /tftpboot/proxy/bios/images
ln -s ../../images /tftpboot/proxy/efi32/images
ln -s ../../images /tftpboot/proxy/efi64/images
ln -s ../../kernels /tftpboot/proxy/bios/kernels
ln -s ../../kernels /tftpboot/proxy/efi32/kernels
ln -s ../../kernels /tftpboot/proxy/efi64/kernels
mkdir -p /cd_dp/images
mkdir /cd_dp/resources
mkdir /var/www/.mono
chown -R www-data:www-data /tftpboot /cd_dp /var/www/html/clonedeploy /var/www/.mono
a2ensite clonedeploy
systemctl restart apache2
echo 'create database clonedeploy;' | mysql -uroot -p
mysql -uroot -p clonedeploy -v < cd.sql
# argh -- it insists on connecting to mysql as root -- how dumb is that?!?
#echo grant all on 'clonedeploy.*' to clonedeploy@localhost identified by "'dEPLOYcLONE815'" | mysql -uroot -p
#sed -i -e 's/Uid=root;Pwd=xx_marker1_xx;/Uid=clonedeploy;Pwd=dEPLOYcLONE815;/g' /var/www/html/clonedeploy/web.config
sed -i -e 's/Pwd=xx_marker1_xx;/Pwd=MYSQLROOTPASSWORD;/g' /var/www/html/clonedeploy/web.config
sed -i -e 's/xx_marker2_xx/894cnMRSQ735/g' /var/www/html/clonedeploy/web.config

addgroup cdsharewriters
useradd cd_share_ro
useradd cd_share_rw -G cdsharewriters
adduser www-data cdsharewriters
smbpasswd -a cd_share_ro # enter password EmsReadCloneCd
smbpasswd -a cd_share_rw # enter password EmsCloneCdOverwrite
echo "[cd_share]
path = /cd_dp
valid users = @cdsharewriters, cd_share_ro
create mask = 02775
directory mask = 02775
guest ok = no
writable = yes
browsable = yes
read list = @cdsharewriters, cd_share_ro
write list = @cdsharewriters
force create mode = 02775
force directory mode = 02775
force group = +cdsharewriters" >> /etc/samba/smb.conf
chown -R www-data:cdsharewriters /cd_dp
chmod -R 2775 /cd_dp
systemctl restart smbd

sed -i -e 's|^TFTP_DIRECTORY="/srv/tftp"$|TFTP_DIRECTORY="/tftpboot"|g' /etc/default/tftpd-hpa
systemctl restart tftpd-hpa

go to in a browser
(username: clonedeploy ... password: password)

enter a better admin password (twice), the server IP, and the previously specified samba passwords, then click "Finalize Setup"
computer/fog_and_clonedeploy.txt · Last modified: 2016/08/15 02:33 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS