分享交流
合作共赢!

CAM的安装部署【DXC】

一、Mid CAM的安装部署

1.准备CAM的基础信息

disk:/dev/vdb
hostname:camdxc
FQDN:camdxc[.camdxc.com]
domain:camdxc
customer ID:zjie
search camdxc.com

/opt/dxc/cammf/config/prompt_store.yml信息如下(忽略)

prompt: "Enter FQDN from where this CAM will sync it's media from [{{ distsrv_name }}]"
prompt_store_file: /opt/dxc/cammf/config/prompt_store.yml
master_proxy_cam: "False"
disk_path: "/dev/sdb"
distsrv_name: "csccamgmstnwk01p.amer.csc.com"
distsrv_ip: "20.148.167.202"
mastercam_name: "camdxc.camdxc.com" = FQDN
mastercam_ip: "172.16.0.3"
raffia_domain: "camdxc"
cust_id: "dxc"

2.准备工作:

1.Change the hostname: camdxc;

add 127.0.0.1 camdxc.camdxc.com to /etc/hosts

2.Create file /slm/cd-devices and import files

mkdir -vp /slm/cd-services/sandbox/ /slm/cd-services/slmaudit/ /slm/cd-services/slmscheduler/ /slm/cd-services/cammf/ /slm/cd-services/gitlab/ /slm/cd-services/slmnginx/ /slm/cd-services/slmpuppet/ /slm/cd-services/raffia/ /slm/cd-services/slmsamba/ /slm/cd-services/sshproxy/ /slm/cd-services/zsync/

3.chmod 775 -R /slm

4.docker load imaegs

5.docker run all containers(raffia\raffia-engine\)

6.设置search,并运行resolvconf -u使其生效

root@camdxc:/data# vim /etc/resolvconf/resolv.conf.d/base 
root@camdxc:/data# resolvconf -u

3.安装部署步骤:

1)setp1:

$ sudo docker exec -it cammf bash -c “/etc/ansible/roles/cam_post_automation/create_cam_access.sh”

#!/bin/bash
#
# create ssh connection from cammf to cam host
#
#
ssh-keygen -t rsa -f /home/cammf/.ssh/id_rsa -q -P ""
sudo bash -c 'cat /home/cammf/.ssh/id_rsa.pub >> /cam/home/camadm/.ssh/authorized_keys && chmod 600 /cam/home/camadm/.ssh/authorized_keys'
sudo chown 1001:1001 /cam/home/camadm/.ssh/authorized_keys
ssh-keyscan -H 172.17.0.1 >> ~/.ssh/known_hosts

mytest:

docker exec slmpuppet bash -c “cd /var/lib/puppet/ssl;puppet cert sign camdxc”
docker exec -it cammf bash -c “ansible -i /etc/ansible/inv-60-cam cam -m setup -a ‘filter=”*fqdn*”‘”

或进入docke内部执行:ansible -i /etc/ansible/inv-60-cam cam -m setup -a ‘filter=”*fqdn*”‘

ansible -i /etc/ansible/inv-60-cam cam -m setup -a ‘filter=”*ansible_dns*”‘

2)setp2:

Mid CAM Configuration
$ sudo docker exec -it cammf bash -c “ansible-playbook -i /etc/ansible/inv-60-cam /etc/ansible/roles/cam_post_automation/cam_post_deployment_stage1.yml”

3)setp3:

$ sudo docker exec -it cammf bash -c “ansible-playbook -i /etc/ansible/inv-60-cam /etc/ansible/roles/cam_post_automation/cam_post_deployment_stage2.yml”

4)setp4:

$ docker exec -it raffia bash
$ cd /opt/dxc/raffia/
myself:
bin/raffia.js createDomain –domain cam.dxc.com –description camdxc
$ bin/raffia.js createUser –user admin –password <your-password> –superuser yes –domain default
$ bin/raffia.js createUser –user admin –password P@ssword –superuser yes –domain camdxc

5)setp5:

$ sudo docker exec -it cammf bash -c “ansible-playbook -i /etc/ansible/inv-60-cam /etc/ansible/roles/cam_post_automation/sshproxy_conf_on_mid_cam.yml”

PASS=’P@ssw0rd ’ && echo -e “KaTeX parse error: Expected ‘EOF’, got ‘\n’ at position 5: PASS\̲n̲PASS” | docker exec -i raffia
sudo docker exec -ti -u root 7509371edd48 bash

二、Second Raffia Engine的安装部署

Deploy Second Raffia Engine
setp1:
for D in config domains mongodb_lib mongodb_log var .ssh triage
do
mkdir -p /srv/raffia-engine-2/$D
chown -R 1000:1000 /srv/raffia-engine-2/$D
done
setp2:
docker run -d –restart=always \
–name raffia-engine-2 \
–log-opt max-size=1m \
–log-opt max-file=10 \
–init \
–volume /etc/localtime:/etc/localtime:ro \
–volume /etc/timezone:/etc/timezone:ro \
–volume /srv/raffia-engine-2/mongodb_lib:/var/lib/mongodb \
–volume /srv/raffia-engine-2/mongodb_log:/var/log/mongodb \
–volume /srv/raffia-engine-2/config:/opt/dxc/raffia-engine/config \
–volume /srv/raffia-engine-2/var:/var/opt/dxc/raffia-engine \
–volume /srv/raffia-engine-2/.ssh:/home/raffia/.ssh \
–volume /srv/raffia-engine-2/triage:/tmp/triage \
–volume /slm:/slm:ro \
raffia-engine:1.17.3

setp3:
docker exec -it raffia-engine-2 bash
cd /opt/dxc/raffia-engine/
./bin/register.sh

Engine Name: raffia-engine-2 (arbitrary value to identify the engine, must be unique)
Location: where Mid-CAM resides
Upstream CAM: must remain as 172.17.0.1
Upstream Port: must remain as 443

TASK [cam_post_automation : Mid CAM to Master CAM (Media Sync Test) results] *********************************************************************************************************
fatal: [172.17.0.1]: FAILED! => {“changed”: false, “msg”: “Warning : HTTPS (8443) connection to Master CAM is failed. Kindly check your firewall rules and ensure you have access to Master CAM on 8443 port.”}
to retry, use: –limit @/etc/ansible/roles/cam_post_automation/cam_post_deployment_stage2.retry

PLAY RECAP ***************************************************************************************************************************************************************************
172.17.0.1 : ok=103 changed=69 unreachable=0 failed=1

 

赞(5) 打赏
未经允许不得转载:琼杰笔记 » CAM的安装部署【DXC】

评论 抢沙发

评论前必须登录!

 

分享交流,合作共赢!

联系我们加入QQ群

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏