Jump to content
Updated Privacy Statement
  • 0

Has anyone automated this process for setting up a Linux Desktop?


Tom Swift

Question

https://docs.citrix.com/en-us/linux-virtual-delivery-agent/current-release/installation-overview/ubuntu.html

 

There seem to be an awful lot of configuration steps to get the VDA installed on a Linux server.

We're using Ubuntu 16.04

It would seem that if you had a couple variables that you needed to set:

domain-controller-fqdn

list-ddc-fqdns

**Where someone just has a pre-populated script and you just need to edit a few spots in it to add information specific to your environment?

 

 

apt-get install chrony

sudo systemctl restart chrony

sudo apt-get install -y default-jdk

sudo apt-get install -y postgresql

sudo apt-get install -y libpostgresql-jdbc-java

sudo apt-get install -y libxm4

sudo apt-get install -y libsasl2-2

sudo apt-get install -y libsasl2-modules-gssapi-mit

sudo apt-get install -y libldap-2.4-2

sudo apt-get install -y krb5-user

sudo apt-get install -y cups

 

sudo apt-get install winbind samba libnss-winbind libpam-winbind krb5-config krb5-locales krb5-user

sudo systemctl enable winbind

 

#Create /etc/krb5.conf as a root user

#START of krb5.conf

[libdefaults]

default_realm = REALM

dns_lookup_kdc = false

 

[realms]

REALM =

{

admin_server = domain-controller-fqdn

kdc = domain-controller-fqdn

}

 

[domain_realm]

domain-dns-name = REALM

.domain-dns-name = REALM

#END of krb5.conf

 

#Portion missing here for shortened example

 

sudo /opt/Citrix/VDA/sbin/ctxsetup.sh

 

sudo CTX_XDL_SUPPORT_DDC_AS_CNAME=Y|N \ CTX_XDL_DDC_LIST=list-ddc-fqdns \ CTX_XDL_VDA_PORT=port-number \ CTX_XDL_REGISTER_SERVICE=Y|N \ CTX_XDL_ADD_FIREWALL_RULES=Y|N \ CTX_XDL_AD_INTEGRATION=1|2|3|4 \ CTX_XDL_HDX_3D_PRO=Y|N \ CTX_XDL_VDI_MODE=Y|N \ CTX_XDL_SITE_NAME=dns-name \ CTX_XDL_LDAP_LIST=list-ldap-servers \ CTX_XDL_SEARCH_BASE=search-base-set \ CTX_XDL_FAS_LIST = list-fas-servers \ CTX_XDL_START_SERVICE=Y|N \ /opt/Citrix/VDA/sbin/ctxsetup.sh

 

 

Link to comment

7 answers to this question

Recommended Posts

It wasn't easy, but we got the Linux VDA installed on two Ubuntu 16.04 VM's.

 

#REM This is the version of the ISO media for Ubuntu we downloaded and installed

#REM For our lab we installed it on Hyper-V 2012 R2 and VMware Fusion 10.1.1

http://releases.ubuntu.com/16.04/ubuntu-16.04.5-server-amd64.iso

ifconfig - Get IP address of machine
REM Change from Autodetect to WiFi and reboot in VMware Fusion so we get an IP address in our normal subnet

 

#REM Connect in via hypervisor console and run next two commands
sudo apt-get update
sudo apt install -y openssh-server

 

REM SSH to Ubuntu server and run the following commands
sudo apt-get install -y chrony
sudo systemctl restart chrony
sudo apt-get install -y default-jdk postgresql libpostgresql-jdbc-java libxm4 libsasl2-2 libsasl2-modules-gssapi-mit libldap-2.4-2 krb5-user cups
sudo apt-get install -y winbind samba libnss-winbind libpam-winbind krb5-config krb5-locales krb5-user
sudo systemctl enable winbind

sudo apt-get install -f x11vnc libgoogle-perftools4 python-requests websockify

sudo apt-get install -y ubuntu-desktop

wget http://edge.centrify.com/products/centrify-suite/2016-update-1/installers/centrify-suite-2016.1-deb7-x86_64.tgz?_ga=1.178323680.558673738.1478847956
mv centrify-suite-2016.1-deb7-x86_64.tgz?_ga=1.178323680.558673738.1478847956 cent.tgz
gunzip -d cent.tgz
tar -xf cent.tar

#EDIT DNS
sudo nano /etc/resolv.conf
#REM Use 192.168.20.50 (for our example because DHCP assigned IP and DNS points to different domain controller only in our lab, not necessary otherwise)
sudo ./install-express.sh
X - Express Edition, Y - Install Express Edition, Y - Active Directory (AD - Check), Domain Name = mycorp.com, Y - Join Domain
Enter the Active Directory domain to join [mycorp.com]: 
Enter the Active Directory authorized user [administrator]: administrator
Enter the password for the Active Directory user: 
Enter the computer name [ubuntu]: 
Enter the container DN [Computers]: 
Enter the name of the domain controller [auto detect]: dc.mycorp.com
Reboot the computer after installation? (Q|Y|N) [Y]:
If this information is correct and you want to proceed, type "Y".
To change any information, type "N" and enter new information.
Do you want to continue (Y) or re-enter information? (Q|Y|N) [Y]:


#REM Stashed this file on our own server after downloading from MyCitrix website
wget http://download.mycorp.com/LinuxVDA-1808.ubuntu16.04_deb.zip
mv LinuxVDA-1808.ubuntu16.04_deb.zip LinuxVDA-1808.ubuntu16.04.deb
sudo dpkg -i LinuxVDA-1808.ubuntu16.04.deb

 

#REM after LinuxVDA is successfully installed the following is displayed

Run one of the following commands to install your XDL before use: 

 1. Execute "/opt/Citrix/VDA/sbin/ctxinstall.sh" to set up the running environment from the beginning, and then complete the installation. 

 2. Execute "/opt/Citrix/VDA/sbin/ctxsetup.sh" to complete the installation. 

 

sudo /opt/Citrix/VDA/sbin/ctxinstall.sh

REM Below are settings we used in our lab

Here are your inputs: 

    Linux VDA Host Name:  ubuntu 

    NTP Server: 0.pool.ntp.org 

    Domain : mycorp 

    Realm : 192.168.20.50

   #REM Realm only worked if we entered an IP address

   #REM We read other posts that said to use domain only as USERDOMAIN and to use USERDNSDOMAIN for Realm but that didn't work for us

    FQDN of domain controller: dc.mycorp.com 

    AD integration method: centrify 

    Domain user: mycorp.com 

 

sudo /opt/Citrix/VDA/sbin/ctxsetup.sh

#REM Below are setting we used in our lab

Here are your inputs: 

    Enable DNS CNAME records: n 

    The FQDN of Delivery Controller: xdctrl.mycorp.com 

    The TCP/IP port that ctxvda service uses to communicate with Delivery Controller: 80 

    Register Linux VDA services to start on boot: y 

    Automatically open the required firewall ports (ports 80 and 1494 by default): y 

    Enable HDX 3D Pro: n 

    Enable VDA desktops (single session) mode: y 

    Specify a local DNS site name: 192.168.20.50 

    The FQDN:port of LDAP server.: 389 

    Provide an LDAP search base: dc=mycorp,dc=com 

    List of FAS servers: <none> 

    Start Linux VDA services once configuration is complete: y 

 

 

Testing:

telnet to ubuntu virtual machine on port 1494 and we get ICA ICA ICA repeating over and over again

Unfortunately the machines do not register in the machine catalog

 

A lot of work went in to getting all the packages installed that were required for LinuxVDA-1808.ubuntu16.04.deb.

Hopefully the above steps will make this a lot easier for someone else.

 

Some trouble shooting tips on what to look for on the Linux VDA's as to why they're not registering would be very helpful if someone knows about it.

We intend on ultimately using Machine Creation Services to spin up multiple copies of this but we're wondering how the Adding Names to Active Directory or even the HOSTNAME of the machine itself would work.

 

Regards,

Tom

 

 

Link to comment

I automated the preparation and setup process for Red Hat and Oracle Linux 7 to the point where it starts with a base installation from the .iso and ends up fully-customized and ready to use (without using the CItrix express installer).   I'm hoping that the powers that be will also want for me to automate it for Ubuntu, which doesn't look very different at all (from a Citrix installation perspective, of course).  Much of it is just putting the commands (especially the installation (apt/dpkg/yum) commands) into a script, but for editing the configuration files, you'll probably want to use sed and other commands for text substitution.  It's really not that complicated; UNIX (and therefore Linux) was designed as a text- and file-based operating system, so its design tends to make things like this rather easy; it's mostly (or really, all) just changing text in files and using simple commands (or piping mostly-simple commands together).

Link to comment

Since MCS did not work in our multi-domain enviroment we just finished building a two step installation process.

 

First Step:
We have a customized Ubuntu 16.04 Iso which does the base installation (Keyboard, Network, User etc) by using Kikstart and seed files. In addition it copies a folder to the disc which contains the required packages and an install scrip.

 

Second Step

I manually run the install script from the previous script. It just prompts for the hostname and does the rest (install prereq. packages and VDA easy install) by itself.

 

This is the installation scrip. If you want i could share more information about this.

#!/bin/bash
xsinstallpack="xe-guest-utilities_7.1.0-41_amd64.deb"
vdapack="LinuxVDA-1808.ubuntu16.04.deb"

ddclist="ddc1.domain ddc2.domain"

#set Proxy
echo 'Acquire::http::Proxy "http://proxy.domain:xxxx";' >> /etc/apt/apt.conf.d/00aptitude

#Set hostname"
read -p "enter Hostname of VDA: " localhostname
#
fqdn="$localhostname.domain.com"

#disable update of xorg
apt-mark hold xserv*
apt-mark hold xorg*

#disable distupgrade
mv /etc/update-manager/release-upgrades /etc/update-manager/release-upgrades.bak
cp release-upgrades /etc/update-manager/

#install XenServer tools
echo "will install XenServer Tools"
/usr/bin/dpkg -i $xsinstallpack

#start setting enviroment variables to configure silent install
echo "will export enviroment variables"
export CTX_EASYINSTALL_HOSTNAME=$localhostname
export CTX_EASYINSTALL_DNS="xxx.xxx.xxx.xxx"
export CTX_EASYINSTALL_NTPS="xxx.xxx.xxx.xxx"
export CTX_EASYINSTALL_DOMAIN="DOMAIN"
export CTX_EASYINSTALL_REALM="REALM"
export CTX_EASYINSTALL_FQDN="FQDN"
export CTX_EASYINSTALL_ADINTEGRATIONWAY=winbind
export CTX_XDL_SUPPORT_DDC_AS_CNAME=Y
export CTX_XDL_DDC_LIST=$ddclist
export CTX_XDL_VDA_PORT=80
export CTX_XDL_REGISTER_SERVICE=Y
export CTX_XDL_ADD_FIREWALL_RULES=Y
export CTX_XDL_HDX_3D_PRO=N
export CTX_XDL_VDI_MODE=Y
export CTX_XDL_SITE_NAME='<none>'
export CTX_XDL_LDAP_LIST='<none>'
export CTX_XDL_SEARCH_BASE='<none>'
export CTX_XDL_FAS_LIST='<none>'
export CTX_XDL_START_SERVICE=Y


#install linux VDA
echo "will install VDA"
/usr/bin/dpkg -i $vdapack
apt-get install -fy


#Initialize VDA
echo "will start initialize of VDA"
/opt/Citrix/VDA/sbin/ctxinstall.sh

#copy krb5.conf
mv /etc/krb5.conf /etc/krb5.conf.bak
cp ./krb5.conf /etc/



 

Link to comment
On 2/19/2019 at 3:06 PM, Noel McLoughlin said:

 

My solution is now open source: https://github.com/overstock/salt-desktop and will setup LinuxVDA in less than ten commands.

 

$ sudo devsetup -u domainadm -s corpsys/cleanup; sudo devsetup -u domainadm -s corpsys/joindomain

custom choice [ stacks/corpsys/joindomain ] selected
Logging to [ /tmp/saltdesktop/stacks/corpsys/joindomain/log.201804110644 ]
Orchestrating things, please be patient ...
Summary for local
--------------
Succeeded: 127 (changed=98)
Failed:      0
Warnings:    1
--------------


domainadm@myhost4:~$ sudo net ads join EXAMPLE.COM -U nmcloughlin
Enter nmcloughlin password:
Using short domain name -- EXAMPLE
Joined MYHOST4 to dns domain example.com
DNS Update for myhost4.example.com failed: ERROR_DNS_GSS_ERROR
DNS update failed: NT_STATUS_UNSUCCESSFUL

domainadm@myhost4:~$ sudo kinit -k MYHOST4\$@EXAMPLE.COM
domainadm@myhost4:~$ sudo systemctl restart winbind

domainadm@myhost4:~$ sudo devsetup -u domainadm -s corpsys/linuxvda

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...