Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 99 log_echo "+++ +++ +++ CREATING VO USER CERTS ON ROOT NODE +++ +++ +++"
- 100 vouser="susanna";
- 101 vopwd="lateralus";
- 102 vouser_name="susanna";
- 103 vouser_lname="martinelli";
- 104 voname="exampleVO";
- 105 void="2c0e8cb2-4453-46fe-85b7-74874e76e7c2";
- 106 voorg="cnr";
- 107 vomail="a.b@cnr.it";
- 108 keypass="afoopassphrase";
- 109 exec_node ${headnode} volife_run.sh -create-user ${vouser} ${vopwd} ${vouser_name} ${vouser_lname} ${voorg} ${vomail};
- 110 exec_node ${headnode} volife_run.sh -approve-user ${vouser};
- 111 exec_node ${headnode} volife_run.sh -add-user ${voname} ${vouser};
- 112 echo "[*] trying to obtain the certs with get-xos-cert";
- 113 exec_node ${headnode} get-xos-cert ${headnode}:6730 ${voname} group1 -u ${vouser} -p ${vopwd} -P ${keypass} -K /etc/xos/truststore/private/cda.key;
- 114
- 115 echo;
- 116 log_echo "+++ +++ +++ RETRIEVING AND COPYING VO USER CERTS TO ALL NODES +++ +++ +++"
- 117 scp ${SSH_OPTS} root@${headnode}:/root/.xos/truststore/certs/user.crt .;
- 118
- 119 for node in ${nodes_list}; do
- 120 echo "[*] Copying vo user certificates to ${node}... ";
- 121 exec_node ${node} mkdir -p /root/.xos/truststore/{certs,private};
- 122 scp ${SSH_OPTS} user.crt root@${node}:/root/.xos/truststore/certs/;
- 123 done
- 124
- 125 #restarting all running services on all machines
- 126 echo;
- 127 log_echo "+++ +++ +++ RESTARTING XOSD +++ +++ +++"
- 128 for node in ${nodes_list}; do
- 129 ok_echo "xosd on ${node}";
- 130 exec_node ${node} service -f xosd restart;
- 131 done
- 132
- 133 echo;
- 134 log_echo "+++ +++ +++ CHEKING POLICIES FOR VO +++ +++ +++"
- 135 #for i in 1 2; do
- 136 policy_check=1;
- 137 while [[ ${policy_check} -eq 1 ]]; do
- 138 echo "[*] Running xos-policy-admin-set...";
- 139 exec_node ${headnode} xos-policy-admin-set -uidmax 60500 -uidmin 60000 -gidmax 60500 -gidmin 60000;
- 140 echo "[*] Running xos-policy-admin-am...";
- 141 exec_node ${headnode} xos-policy-admin-am -vo ${void} --force;
- 142 echo "[*] Running xos-policy-admin-gm...";
- 143 exec_node ${headnode} xos-policy-admin-gm -vo ${void} --force;
- 144 echo "[*] Running xos-policy-admin-chk...";
- 145 exec_node ${headnode} xos-policy-admin-chk -pem /root/.xos/truststore/certs/user.crt;
- 146 policy_check=$?;
- 147 done
- 148
- 149 #adding resources of all nodes to the VO
- 150 echo;
- 151 log_echo "+++ +++ +++ ADDING RESOURCES TO THE VO +++ +++ +++"
- 152 echo "[*] Adding the RCA to the VO...";
- 153 exec_node ${headnode} rca_vo a ${void};
- 154 #for node in ${nodes_list}; do
- 155 # echo "[*] Adding resources of ${node}...";
- 156 # exec_node ${headnode} rca_resource_vo a ${void} ${node}:60000;
- 157 #done;
- 158 #for node in ${nodes_list}; do
- 159 # echo "[*] Confirming resources of ${node}...";
- 160 # exec_node ${node} rca_resource_vo c ${void};
- 161 # exec_node ${node} mv /etc/xos/truststore/certs/incoming/attrcert${void}* /etc/xos/truststore/certs/;
- 162 # exec_node ${node} c_rehash /etc/xos/truststore/certs;
- 163 #done;
- 164 for node in ${nodes_list}; do
- 165 echo "[*] Adding resources of ${node}...";
- 166 exec_node ${node} mkdir -p /etc/xos/truststore/certs/incoming;
- 167 exec_node ${node} chmod 0777 /etc/xos/truststore/certs/incoming;
- 168 exec_node ${node} rca_request;
- 169 exec_node ${node} rca_resource_vo a ${void};
- 170 exec_node ${node} mv /etc/xos/truststore/certs/incoming/attrcert${void}* /etc/xos/truststore/certs/;
- 171 exec_node ${node} c_rehash /etc/xos/truststore/certs;
- 172 done;
Add Comment
Please, Sign In to add comment