HQueue_Install_In_Ubuntu

hqueue安装说明:

 

 


1、环境:


--1.1os: ubuntu-20.04-desktop-amd64.iso
houdini: houdini-18.0.416-linux_x86_64_gcc6.3.tar.gz


--1.2nfs-server端(os=ubuntu20.04,此服务器既是nfs服务端也是hq-server服务端):
---- hostname=laohuserver
---- ip:192.168.0.101


--1.3nfs-client端(os=ubuntu20.04,此客户端既是nfs客户端,也是hq-client的客户端)
---- hostname=houziclient
---- ip:192.168.0.102


--1.4 全程使用 sudo

 

 


2、准备工作(服务端和客户端都要安装):


--2.1 laohuserver文件夹部分:
---- 共享文件夹
/opt/hqueue/shared (这里的文件夹由hqueue server创建)
laohu@laohu:~$ sudo chmod -R 777 /opt/hqueue/shared


--2.2 houziclient文件夹部分
---- 挂载文件夹
houzi@houziclient:~$ sudo mkdir -p /mnt/hq
houzi@houziclient:~$ sudo chmod -R 777 /mnt/hq


--2.3 安装和配置python2.7(houdini18.0.416安装过程中使用python2.7)
houzi@houziclient:~$  sudo apt install python2.7 python2.7-dev
houzi@houziclient:~$  whereis python2.7
/usr/bin/python2.7
houzi@houziclient:~$ sudo ln /usr/bin/python2.7 /usr/bin/python


--2.4 nfs
----2.4.1 nfs的作用:
-------- 将“nfs-server端”的共享文件夹,挂载到“nfs-client端”,从而实现“共享服务器端的文件夹”。
-------- 实例:nfs-server端共享文件夹:/opt/hqueue/shared,挂载到“nfs-client”的/mnt/hq目录下,实现“nfs-client端”共享“nfs-server端”的“/opt/hqueue/shared”文件夹。
-------- 在nfs-client端挂载nfs-server的/opt/huqueue/shared文件夹:sudo mount -t nfs 192.168.0.101:/opt/hqueue/shared /mnt/hq

----2.4.2 服务端安装和配置:laohuserver
laohu@laohuserver:~$ sudo apt install nfs-kernel-server # 安装服务端
laohu@laohuserver:~$ sudo /etc/init.d/nfs-kernel-server restart #重启服务端
laohu@laohuserver:~$ sudo systemctl enable nfs-kernel-server #开机启动nfs-kernel-server

----2.4.3 客户端安装和配置:houziclient
houzi@houziclient:~$  sudo apt install nfs-common

 

 


3、防火墙配置(服务端和客户端都要配置)


-3.1 预备知识
-- 安装防火墙
sudo apt install ufw
-- 开启防火墙
sudo ufw enable
-- 关闭防火墙:
sudo ufw disable
-- 查看防火墙状态
sudo ufw status
-- 超级安全模式(拒绝外部网络访问本机,本机访问外部正常)
sudo ufw default deny


-3.2 配置 nfs-kernel-server 服务端的防火墙(laohuserver)
sudo ufw allow 5000 #开放5000端口,hqueue-server端口
sudo ufw allow 80 #网络端口
sudo ufw allow 22 #ssh端口
sudo ufw allow from 192.168.0.0/24 #允许访问服务器的ip段,这个很重要,要不然nfs挂载不上啊

 

 


4、安装 hqueue ‘server’ and ‘client’


- 4.1 安装hqueue服务端(laohuserver):
--4.1.1 laohu@laohuserver:~/lidawei/softwares/houdini$ sudo tar -xzvf houdini-18.0.416-linux_x86_64_gcc6.3.tar.gz #解压houdini安装包
--4.1.2 laohu@laohuserver:~/lidawei/softwares/houdini$ cd houdini-18.0.416-linux_x86_64_gcc6.3/
--4.1.3 laohu@laohuserver:~/lidawei/softwares/houdini$ sudo ./houdini.install #选择安装项目(1、2、4、5、8)
---- 如何选择安装选项?每个安装选项前面都有数字或者字母,按“键盘”上对应的键位,可以在“选择”和“取消选择”状态之间切换,按“f键”完成选择。
--4.1.4 剩余项目均保持默认安装;
--4.1.5 配置License server
---- laohu@laohuserver:/opt/hfs18.0$ source houdini_setup
The Houdini 18.0.416 environment has been initialized.
----laohu@laohuserver:/opt/hfs18.0$ hkey --no-sandbox
---- Houdini License Administrator 18.0.416 --> file -->Change License Server --> license server host:填写授权服务器ip地址 --> accept
--4.1.6 重启 license server服务:laohu@laohuserver:~$ sudo /etc/init.d/sesinetd restart
--4.1.7 配置hq服务器:laohu@laohu:~$ sudo vim /opt/hqueue/hqserver.ini ,wq
--4.1.7 重启 hqueue server 服务: laohu@laohuserver:~$ sudo /opt/hqueue/scripts/hqserverd restart


- 4.2 安装hqueue客户端(houziserver):
--4.2.1 houzi@houziclient:~/lidawei/softwares/houdini$ sudo tar -xzvf houdini-18.0.416-linux_x86_64_gcc6.3.tar.gz #解压houdini安装包
--4.2.2 houzi@houziclient:~/lidawei/softwares/houdini$ cd houdini-18.0.416-linux_x86_64_gcc6.3/
--4.2.3 houzi@houziclient:~/lidawei/softwares/houdini$ sudo ./houdini.install #选择安装项目(5、9)
---- 如何选择安装选项?每个安装选项前面都有数字或者字母,按“键盘”上对应的键位,可以在“选择”和“取消选择”状态之间切换,按“f键”完成选择。
--4.2.4 Which user do you want to run the HQueue Client? [hquser] ==> houzi
--4.2.5 Create this directory (yes or no) [yes] ==> yes
--4.2.6 保持默认安装;
--4.2.7 What is your selection? (YES or NO) [NO] ==> NO
--4.2.8 默认安装,直到结束;

--4.2.9 配置License server
---- laohu@laohuserver:/opt/hfs18.0$ source houdini_setup
The Houdini 18.0.416 environment has been initialized.
----laohu@laohuserver:/opt/hfs18.0$ hkey --no-sandbox
---- Houdini License Administrator 18.0.416 --> file -->Change License Server --> license server host:填写授权服务器ip地址 --> accept
--4.2.10 重启 license server服务:houzi@houziclient:~$ sudo /etc/init.d/sesinetd restart

--4.2.11 配置hqclient:
---- houzi@houziclient:~/hqclient$ sudo vim hqnode.ini
[main]
server = 192.168.0.101
port = 5000
sharedNetwork.mount = /mnt/hq
[job_environment]
---- wq
-- 4.2.12 重启hqueue client服务:
---- houzi@houziclient:~/hqclient$ sudo ./hqclientd restart

 

 

 

5、挂载共享文件夹(将服务器192.168.0.101:/opt/hqueue/shared的文件夹挂载到客户端houziclient的/mnt/hq上):


-- 一次性挂载:
---- sudo mount -t nfs 192.168.0.101:/opt/hqueue/shared /mnt/hq


-- 开机自动挂载:
将“sudo mount -t nfs 192.168.0.101:/opt/hqueue/shared /mnt/hq”写到/etc/rc.local文件中。
---- houzi@houziclient:~$ sudo vim /etc/rc.local
sudo mount -t nfs 192.168.0.101:/opt/hqueue/shared /mnt/hq
---- houzi@houziclient:~$ wq

 

 

 

6、配置shared:


-- 目录结构:
/opt/hqueue/shared/Projects # 用于存放需要渲染的工程文件,由“工作站”提供;
/opt/hqueue/shared/houdini_distros # 用于存放渲染工具,HFS。


-- 创建文件夹:
sudo mkdir -p /opt/hqueue/shared/houdini_distros
sudo chmod -R 777 /opt/hqueue/shared/houdini_distros


sudo mkdir -p /opt/hqueue/shared/Projects
sudo chmod -R 777 /opt/hqueue/shared/Projects


--复制文件夹hfs.18.0.416并改名为hfs.linux-x86_x64
sudo cp -r /opt/hfs18.0.416 /opt/hqueue/shared/houdini_distros/hfs.linux-x86_x64 //把hfs18.0.416拷贝到/opt/hqueue/shared/houdini_distros/中

 

 


7、重启电脑

-- 重启服务器(laohuserver):
---- sudo reboot

-- 重启客户端(houziclient):
---- sudo reboot

 

 


8、重启服务

-- 8.1 服务器:
---- 重启nfs服务:laohu@laohuserver:~$ sudo /etc/init.d/nfs-kernel-server restart
---- 重启 license server服务:laohu@laohuserver:~$ sudo /etc/init.d/sesinetd restart
---- 重启 hqueue server 服务: laohu@laohuserver:~$ sudo /opt/hqueue/scripts/hqserverd restart


-- 8.2 客户端:
---- 重启 license server服务:houzi@houziclient:~$ sudo /etc/init.d/sesinetd restart
---- 重启hq client服务:houzi@houziclient:~/hqclient$ sudo ./hqclientd restart

 

 


9、使用HQueue渲染流程:

--9.1 创建工程,在/out内创建节点:mantra 和 hqueue render,并将“mantra1”的输出端连接到“hqueue render”的输入端;

--9.2 设置"hqueue render":
---- hqueue server : 192.168.0.101:5000

--9.3 保存工程文件名字为:houdini-180416_hq_test.hip;

--9.4 将工程文件复制到共享文件夹:
---- sudo mkdir -p /mnt/hq/Projects/hqueue_test
---- sudo cp houdini-180416_hq_test.hip /mnt/hq/Projects/hqueue_test/
---- sudo chown root:root houdini-180416_hq_test.hip
---- sudo chmod -R 777 houdini-180416_hq_test.hip

--9.5 在“/mnt/hq/Projects/hqueue_test”路径下,打开houdini-180416_hq_test.hip文件;

--9.6 在/out/hqueue上点击 submit;

--9.7 在/mnt/hq/Projects/hqueue_test/render内查看渲染结果;

 

 

 

10、超级注意事项:

--10.1 路径:/mnt/hq/Projects/hqueue_test/ 下的 hq_test.hip 文件,我用下面的属性成功的:
"-rwxrwxrwx 1 root root 567090 5月 9 22:38 houdini-180416_hq_test.hip"

--10.2 修改属主和属组
---- sudo chown root:root houdini-180416_hq_test.hip
---- sudo chmod -R 777 houdini-180416_hq_test.hip

--10.3 打开“共享文件夹”的“houdini-180416_hq_test.hip”文件,最好不要保存
---- 在“共享文件夹”内的“houdini-180416_hq_test.hip”文件,只能“打开”和“提交渲染”,如果保存“houdini-180416_hq_test.hip”,那么必须重复修改“10.2”操作。

 

 


11、关于nfs共享文件夹shared的说明:

-- shared(hqueue->shared)文件夹:shared文件夹在hqueue server上设置的共享文件夹,所有的client(执行渲染工作的节点)都能自由读写hqueue server的shared文件夹内容。
-- shared->houdini_distros:houdini_distros文件夹内放置的是用于渲染的工具(hfs.linux-x86_x64 );linux client执行渲染时,就调用这里的工具进行渲染。

-- nfs的作用是将hqueue_server的shared文件夹挂载到所有的client的/mnt/hq上,可以自动挂载,也可以手工挂载。
---- 安装nfs服务器和客户端;
---- 手工挂载shared文件夹到client上(ubuntu),client的/mnt/hq文件夹需要手动建立:sudo mount -t nfs hqueue_server_ip:/opt/hqueue/shared /hqueue_client_ip:/mnt/hq ;
---- 共享文件夹shared 权限问题:sudo chown -R 777 shared ;

 

本文由lnlidawei(https://www.cnblogs.com/lnlidawei)原创或整理,转载请注明出处。
原文地址:https://www.cnblogs.com/lnlidawei/p/12815661.html