| 163 | One-time prep to run on each server: |
| 164 | |
| 165 | {{{ |
| 166 | sudo yum -y install pyOpenSSL patch |
| 167 | rm -rf ~/gigaweb |
| 168 | mkdir -p ~/gigaweb/docroot |
| 169 | cd ~/gigaweb |
| 170 | wget http://code.activestate.com/recipes/442473-simple-http-server-supporting-ssl-secure-communica/download/1/ -O httpsd.py |
| 171 | wget http://groups.geni.net/geni/attachment/wiki/PlasticSlices/Experiments/httpsd.py.patch?format=raw -O httpsd.py.patch |
| 172 | patch httpsd.py httpsd.py.patch |
| 173 | rm httpsd.py.patch |
| 174 | |
| 175 | openssl genrsa -passout pass:localhost -des3 -rand /dev/urandom -out localhost.localdomain.key 1024 |
| 176 | openssl req -subj /CN=localhost.localdomain -passin pass:localhost -new -key localhost.localdomain.key -out localhost.localdomain.csr |
| 177 | openssl x509 -passin pass:localhost -req -days 3650 -in localhost.localdomain.csr -signkey localhost.localdomain.key -out localhost.localdomain.crt |
| 178 | openssl rsa -passin pass:localhost -in localhost.localdomain.key -out decrypted.localhost.localdomain.key |
| 179 | mv decrypted.localhost.localdomain.key localhost.localdomain.key |
| 180 | cat localhost.localdomain.key localhost.localdomain.crt > localhost.localdomain.pem |
| 181 | rm localhost.localdomain.key localhost.localdomain.crt localhost.localdomain.csr |
| 182 | }}} |
| 183 | |
| 184 | Commands to run on each server: |
| 185 | |
| 186 | {{{ |
| 187 | server=<ipaddr> |
| 188 | cd ~/gigaweb/docroot |
| 189 | python ../httpsd.py $server 4107 |
| 190 | }}} |
| 191 | |
| 192 | Commands to run on each client: |
| 193 | |
| 194 | {{{ |
| 195 | server=<ipaddr> |
| 196 | rm -rf ~/gigaweb |
| 197 | mkdir ~/gigaweb |
| 198 | cd ~/gigaweb |
| 199 | for i in {1..118} ; do wget --no-check-certificate https://$server:4107/substrate.doc -O substrate.doc.$i ; done |
| 200 | }}} |
| 201 | |
| 202 | Check results on each client: |
| 203 | |
| 204 | {{{ |
| 205 | du -sb . |
| 206 | md5sum * | grep -v d4fcf71833327fbfef98be09deef8bfb || echo "All checksums match." |
| 207 | }}} |
| 208 | |
| 209 | Clean up on each client: |
| 210 | |
| 211 | {{{ |
| 212 | cd |
| 213 | rm -rf ~/gigaweb |
| 214 | }}} |
| 215 | |
| 223 | One-time prep to run on each server: |
| 224 | |
| 225 | {{{ |
| 226 | sudo yum -y install pyOpenSSL patch |
| 227 | rm -rf ~/gigaweb |
| 228 | mkdir -p ~/gigaweb/docroot |
| 229 | cd ~/gigaweb |
| 230 | wget http://code.activestate.com/recipes/442473-simple-http-server-supporting-ssl-secure-communica/download/1/ -O httpsd.py |
| 231 | wget http://groups.geni.net/geni/attachment/wiki/PlasticSlices/Experiments/httpsd.py.patch?format=raw -O httpsd.py.patch |
| 232 | patch httpsd.py httpsd.py.patch |
| 233 | rm httpsd.py.patch |
| 234 | |
| 235 | openssl genrsa -passout pass:localhost -des3 -rand /dev/urandom -out localhost.localdomain.key 1024 |
| 236 | openssl req -subj /CN=localhost.localdomain -passin pass:localhost -new -key localhost.localdomain.key -out localhost.localdomain.csr |
| 237 | openssl x509 -passin pass:localhost -req -days 3650 -in localhost.localdomain.csr -signkey localhost.localdomain.key -out localhost.localdomain.crt |
| 238 | openssl rsa -passin pass:localhost -in localhost.localdomain.key -out decrypted.localhost.localdomain.key |
| 239 | mv decrypted.localhost.localdomain.key localhost.localdomain.key |
| 240 | cat localhost.localdomain.key localhost.localdomain.crt > localhost.localdomain.pem |
| 241 | rm localhost.localdomain.key localhost.localdomain.crt localhost.localdomain.csr |
| 242 | }}} |
| 243 | |
| 244 | Commands to run on each server: |
| 245 | |
| 246 | {{{ |
| 247 | server=<ipaddr> |
| 248 | cd ~/gigaweb/docroot |
| 249 | python ../httpsd.py $server 4108 |
| 250 | }}} |
| 251 | |
| 252 | Commands to run on each client: |
| 253 | |
| 254 | {{{ |
| 255 | server=<ipaddr> |
| 256 | rm -rf ~/gigaweb |
| 257 | mkdir ~/gigaweb |
| 258 | cd ~/gigaweb |
| 259 | for i in {1..118} ; do wget --no-check-certificate https://$server:4108/substrate.doc -O substrate.doc.$i ; done |
| 260 | }}} |
| 261 | |
| 262 | Check results on each client: |
| 263 | |
| 264 | {{{ |
| 265 | du -sb . |
| 266 | md5sum * | grep -v d4fcf71833327fbfef98be09deef8bfb || echo "All checksums match." |
| 267 | }}} |
| 268 | |
| 269 | Clean up on each client: |
| 270 | |
| 271 | {{{ |
| 272 | cd |
| 273 | rm -rf ~/gigaweb |
| 274 | }}} |
| 275 | |