Set up a new CDN
CDN - headnode prep
- Install AMC.qcow2 and CentOS-6-cdnnode-0.4.qcow2 to /opt/cord_profile/images/
- nova flavor-create --is-public true m1.cdnnode auto 8192 120 4
- run the deploy-cdn playbook: cd /opt/cord/orchestration/xos_services/hypercache/setup ansible-playbook -i /opt/cord/build/platform-install/inventory/head-localhost --extra-vars @/opt/cord/build/genconfig/config.yml deploy-cdn-playbook.yml
- ensure private keys are in /opt/cord/orchestration/xos_services/hypercache/setup/private
- Install ACT * sudo easy_install -Z auraclienttools-0.4.2_parguera-py2.7.egg
CDN - cmi setup
- Wait for images (AMC, CentOS-6-cdnnode-0.4) to be loaded into glance (check glance image-list for status)
- XOS UI: Add cmi and CentOS images to MyDeployment
- Instantiate CMI instance in mysite_cdn_control * flavor: m1.cdnnode * image: AMC
- edit group_vars/all * update cmi_compute_node, cmi_mgmt_ip * do not update cmi_private_key -- the public part is baked into the image
- run the following playbook: ansible-playbook -i /opt/cord/build/platform-install/inventory/head-localhost --extra-vars @/opt/cord/build/genconfig/config.yml generate-inventory-playbook.yml
- run setup-cmi.sh * this will SSH into the CMI and run setup, then modify some settings. * it may take a long time, 10-20 minutes or more
- log into CMI (ssh-cmi.sh) and setup socat to attach the CMI to eth1 * socat TCP-LISTEN:443,bind=172.27.0.9,reuseaddr,fork TCP4:10.6.1.196:443
- setup port forwarding from prod VM to CMI: * ssh -L 0.0.0.0:3456:172.27.0.9:443 ubuntu@offbeat-pin * (note IP address of CMI Instance and use in place of 172.27.0.9)
CDN - cdnnode setup
- Instantiate cdnnode instance in mysite_cdn_nodes * flavor: m1.cdnnode * CentOS-6-cdnnode-0.4.img
- Log into compute node and Attach disk * on cloudlab w/ supersized compute node: * virsh attach-disk <instance_name> /dev/vdb vdb --cache none * (make sure this disk wasn't used anywhere else!)
- enroll the new node in the cdn * ansible-playbook -i "localhost," example-node-playbook.yaml * find the bootscript in /tmp
- log into cdnnode VM * make sure default gateway is good (check public connectivity) * make sure arp table is good * make sure CMI is reachable from cdnnode * run takeover script that was created by the CMI * (I suggest commenting out the final reboot -f, and make sure the rest of it worked right before rebooting) * Node will take a long time to install
- log into cdnnode * to SSH into cdnnode, go into CMI, vserver coplc, cd /etc/planetlab, and use debug_ssh_key.rsa w/ root user * check default gateway * fix arp entry for default gateway
CDN - request router setup
- Instantiate request router instance in mysite_cdn_nodes * flavor: m1.cdnnode * CentOS-6-cdnnode-0.4.img
- enroll the new rr in the cdn * ansible-playbook -i "localhost," example-rr-playbook.yaml * find the bootscript in /tmp
- log into the request router VM * run the bootscript * (I suggest commenting out the final reboot -f, and make sure the rest of it worked right before rebooting) * Node will take a long time to install
CDN - setup content
- Run the following playbook: * ansible-playbook -i "localhost," example-content-playbook.yaml
CDN - important notes
We manually edited synchronizers/vcpe/templates/dnsasq_safe_servers.j2 inside the vcpe synchronizer VM:
# temporary for ONS demo
address=/z.cdn.turner.com/207.141.192.134
address=/cnn-vh.akamaihd.net/207.141.192.134
Test Commands
Restart CDN after power-down
To do... test
notes
socat TCP-LISTEN:443,bind=172.27.0.9,reuseaddr,fork TCP4:10.6.1.196:443
ssh -L 0.0.0.0:3456:172.27.0.9:443 ubuntu@offbeat-pin