run cmi setup scripts, better idempotency
diff --git a/xos/configurations/cord-pod/cdn/cmi-settings.sh b/xos/configurations/cord-pod/cdn/cmi-settings.sh
index cf05a27..283d7e6 100644
--- a/xos/configurations/cord-pod/cdn/cmi-settings.sh
+++ b/xos/configurations/cord-pod/cdn/cmi-settings.sh
@@ -2,6 +2,6 @@
 # It will be used by setup-cmi.sh and ssh-cmi.sh
 
 COMPUTE_NODE=cp-2.smbaker-xos-vtn.xos-pg0.clemson.cloudlab.us
-MGMT_IP=172.27.0.17
-NODE_KEY=/root/setup/id_rsa.sh
+MGMT_IP=172.27.0.22
+NODE_KEY=/root/setup/id_rsa
 VM_KEY=cmi_id_rsa
diff --git a/xos/configurations/cord-pod/cdn/cmi.yaml b/xos/configurations/cord-pod/cdn/cmi.yaml
index 206f89b..8ef4500 100644
--- a/xos/configurations/cord-pod/cdn/cmi.yaml
+++ b/xos/configurations/cord-pod/cdn/cmi.yaml
@@ -12,20 +12,20 @@
     cdn_name: CoBlitz
     gateway_ip: 10.124.0.1
     gateway_mac: 00:8c:fa:5b:09:d8
-    node_hostname: xos-cloudlab-cmi-vtn.opencloud.us
+    node_hostname: xos-cloudlab-node1-vtn.opencloud.us
   tasks:
-#  - name: fix the networking
-#    shell: "{{ item }}"
-#    with_items:
-#      - ip route del default || true
-#      - ip route add default via {{ gateway_ip }}
-#      - arp -s {{ gateway_ip }} {{ gateway_mac }}
+  - name: fix the networking
+    shell: "{{ item }}"
+    with_items:
+      - ip route del default || true
+      - ip route add default via {{ gateway_ip }}
+      - arp -s {{ gateway_ip }} {{ gateway_mac }}
 
-#  - name: copy over setup answers
-#    template: src=templates/setup_answers.txt dest=/root/setup_answers.txt
+  - name: copy over setup answers
+    template: src=templates/setup_answers.txt dest=/root/setup_answers.txt
 
-#  - name: run the setup script
-#    shell: /a/sbin/setup.sh < /root/setup_answers.txt
+  - name: run the setup script
+    shell: /a/sbin/setup.sh < /root/setup_answers.txt
 
   - name: fix onevapi CDNPrefix bug
     shell: sed -i 's/hostname/str/g' /vservers/coplc/usr/share/cob_api/COB/PublicObjects/CDNPrefix.py
@@ -36,5 +36,34 @@
   - name: copy over cmi setup template
     template: src=templates/setup_cmi_onevsh.sh dest=/vservers/coplc/root/setup_cmi_onevsh.sh
 
+  - name: run cmi setup script
+    command: vserver coplc exec onevsh /root/setup_cmi_onevsh.sh
+
   - name: copy over cmi node setup template
-    template: src=templates/setup_cmi_node.sh dest=/vservers/coplc/root/setup_cdmi_node.sh
+    template: src=templates/setup_cmi_node.sh dest=/vservers/coplc/root/setup_cmi_node.sh
+
+  - name: run node setup script
+    command: vserver coplc exec plcsh /root/setup_cmi_node.sh
+    args:
+        creates: /vservers/coplc/root/takeover-{{ node_hostname }}
+
+  - name: retrieve node takeover script
+    fetch: src=/vservers/coplc/root/takeover-{{ node_hostname }} dest=takeovers/takeover-{{ node_hostname }}
+
+  - name: copy over cmi logical interface template
+    template: src=templates/setup_cmi_logicalinterfaces.sh dest=/vservers/coplc/root/setup_cmi_logicalinterfaces.sh
+
+  - name: run logical interface script
+    command: vserver coplc exec onevsh /root/setup_cmi_logicalinterfaces.sh
+
+  - name: update all keys script
+    copy: src=private/allkeys.template dest=/vservers/coplc/etc/onevantage/services/HPC/templates/usr/local/CoBlitz/var/allkeys.template
+
+  - name: install keygen
+    copy: src=private/keygen dest=/vservers/coplc/etc/onevantage/services/HPC/templates/usr/local/CoBlitz/var/keygen
+
+  - name: download socat
+    get_url: url=http://pkgs.repoforge.org/socat/socat-1.7.2.1-1.el6.rf.x86_64.rpm dest=/root/socat-1.7.2.1-1.el6.rf.x86_64.rpm
+ 
+  - name: install socat
+    yum: name=/root/socat-1.7.2.1-1.el6.rf.x86_64.rpm state=present
diff --git a/xos/configurations/cord-pod/cdn/templates/setup_cmi_node.sh b/xos/configurations/cord-pod/cdn/templates/setup_cmi_node.sh
index 4c1abed..93435a3 100644
--- a/xos/configurations/cord-pod/cdn/templates/setup_cmi_node.sh
+++ b/xos/configurations/cord-pod/cdn/templates/setup_cmi_node.sh
@@ -10,3 +10,11 @@
 ip_id = AddIpAddress(i_id, ipinfo)
 routeinfo = {'interface_id': i_id, 'next_hop': "127.0.0.127", 'subnet': '0.0.0.0', 'metric': 1}
 r_id = AddRoute(n_id, routeinfo)
+hpc_slice_id = GetSlices({"name": "co_coblitz"})[0]["slice_id"]
+AddSliceToNodes(hpc_slice_id, [n_id])
+dnsdemux_slice_id = GetSlices({"name": "co_dnsdemux"})[0]["slice_id"]
+dnsredir_slice_id = GetSlices({"name": "co_dnsredir_coblitz"})[0]["slice_id"]
+AddSliceToNodes(dnsdemux_slice_id, [n_id])
+AddSliceToNodes(dnsredir_slice_id, [n_id])
+takeoverscript=GetBootMedium(n_id, "node-cloudinit", '')
+file("/root/takeover-{{ node_hostname }}","w").write(takeoverscript)