Delpoy Fully Configured Control Server
This page is the manual for how to deploy a full SME control server (install the control binaries, linux packages, setup company, vnc session, guacamole and etc.)
Prerequisition: Minimal Centos 6.8 is installed.
1. ssh root@<your control new host>
2. run following commands in your control new host.
rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm yum -y install puppet hostname (remember this client server hostname) vim /etc/puppet/puppet.conf
3. add following lines into the puppet.conf
in [main]
#puppet server westcoast dns name
server = li823-33.members.linode.com
#your client server dns name
certname = <YOUR CLIENT SERVER HOSTNAME>
environment = production
in [agent], add
onetime = true
:wq to save and exit the puppet.conf
4. ssh root@westcoast.creativecomputing.com.au
5. in the westcoast server run:
docker ps | grep /bin/bash
it will give you following output:
9dd5c4586e0f ffd6477b4b95 "/bin/bash" 5 days ago Up 5 days fervent_carson
6. run: docker attach 9dd5c4586e0f
hit "Enter" twice. Then you are in the docker puppet server container.
7. In the docker puppet server container you run: vim /etc/puppet/environments/production/manifests/client.pp
8. in the client.pp file, change the node name to your new control server's hostname. e.g. (node 'li1178-134.members.linode.com'), :wq to save and exit the client.pp file.
9. go back to your control new host server. run "puppet agent --debug --test"
Now the puppet agent will automatically deploy the basic control server (CCDIR, /u/, packages such as VPN, CUPs, Guacamole and VNC:5 ready)
After the puppet script done. You can use vnc client to connect to vnc:5 to test if it is properly running. Password is 123456
10. You need to manually transfer the latest binaries from SAM to your new control server. So you need to ssh login to SAM as root and run:
rsync -avzk /u/ccstandard/ root@<your new control server ip>:/u/ccr.15/
11. You also need to mannually transfer the latest .qss from SAM to your new control server. In SAM:
scp /u/ccr.15/adm/menu.* /u/ccr.15/adm/*.qss root@<your new control server IP>:/u/ccr.15/adm/
12. You now can VNC:5 to your control server and logout and log back in. You can use condisp -c -b to see you are in "standard" company and "ware" location. And remember to kill all the screensaver programs and gnome-session-properties to disable the screensaver.
13. In your vnc:5, open a terminal, and "ls", then you could see 3 scripts.Then "vim /u/cc/binx11/auto_postal" in line 83, put a "-q" after the $prog. ($prog -q << :: >> /dev/null).
14. As a "ccc" user in "/u/ccr.15/usr/ccc" directory, run "./createcomp.sh aaa" to create an "aaa" company from the standard company. Then use "condisp -c -b" to verify it.
15. su to root user and cd to "/u/ccr.15/usr/ccc" directory. Then run "./createsession tony" to create a Linux user "tony" and the script will assign a VNC port for tony.
the script will give you result like "Please run: <./createguac.py tony 6> to create guacamole user session."
16. Then you could run "./createguac.py tony 6" to create the guacamole session. The script will return the URL and login details.
17. After you login to the guacamole using tony user, you need to open a terminal and conset to your company (e.g. conset -c aaa), run "gnome-session-properties" to tick off the screen-saver and run "killall gnome-screensaver" as a root then logout and log back in.
18. You might need to use empaad, smaad and braad to create control users and branches.
