792 | | Once swapped in, we log into a base node and kick off the chef processes to create and start the Win7 node. |
| 794 | Once swapped in, we give the swap-in-specific details to the configuration database (groups, users, mounts, etc). This only needs to be done once per experiment swapin. We do this so the containers know the experiment/swapin specific information. We cannot do this before swapin as the information does not exist then! |
| 795 | |
| 796 | {{{ |
| 797 | #!sh |
| 798 | users: > ssh base1 |
| 799 | base1: > /share/config_server/bin/initialize_configuration_database.py -p deter -e neo-win7 -l debug # note same port and chef server. |
| 800 | }}} |
| 801 | |
| 802 | You should see log messages in your {{{config_server}}} window, user ids, mounts, group information for the experiment will scroll by. |
| 803 | |
| 804 | Successful output will contain one {{{[WARN]}}} message. We get this warning because the script did not find a {{{proj/deter/exp/neo-win7/containers}}} directory. This directory is created by the old containers system. Because we're not using that system in this example, this warning is OK. Here is the successful output: |
| 805 | |
| 806 | {{{ |
| 807 | #!sh |
| 808 | OK ] : Initializing configuration database from experiment deter/neo-win7 data. |
| 809 | [OK ] : Posting mounts data... |
| 810 | 01-27 10:18:51 __main__ DEBUG posting url: /exp/deter/neo-win7/insert/mounts |
| 811 | [OK ] : Connecting to server |
| 812 | [OK ] : Good response from server. |
| 813 | [OK ] : Success loading mount information. |
| 814 | [OK ] : Posting accounts data... |
| 815 | 01-27 10:18:51 __main__ DEBUG posting url: /exp/deter/neo-win7/insert/accounts |
| 816 | [OK ] : Connecting to server |
| 817 | [OK ] : Good response from server. |
| 818 | [OK ] : Success loading account information. |
| 819 | [OK ] : Posting physical node names data... |
| 820 | 01-27 10:18:51 __main__ DEBUG posting url: /exp/deter/neo-win7/insert/pnode_names |
| 821 | [OK ] : Connecting to server |
| 822 | [OK ] : Good response from server. |
| 823 | [OK ] : Success loading physical node names. |
| 824 | [WARN ] : No containers information found at /proj/deter/exp/neo-win7/containers. Not loading containers information. |
| 825 | [OK ] : All is well. Configuration database now contains information about experiment deter/neo-win7. |
| 826 | }}} |
| 827 | |
| 828 | Now we confirm that chef is ready to run, by confirming that the cookbooks are loaded into the running chef instance. (This does not need to be done if you know chef is configured properly. This is here for completeness.) |
| 829 | |
| 830 | {{{ |
| 831 | #!sh |
| 832 | users: > ssh chef |
| 833 | chef: > sudo su - chef-user |
| 834 | chef: > cd ~/chef-repo |
| 835 | chef: > knife cookbook list |
| 836 | }}} |
| 837 | |
| 838 | This will show about 5 to 7 cookbooks loaded. If not, load them. (Note you can reload them if you want to be sure all is well.) |
| 839 | |
| 840 | {{{ |
| 841 | #!sh |
| 842 | users: > ssh chef |
| 843 | chef: > sudo su - chef-user |
| 844 | chef: > cd ~/chef-repo |
| 845 | chef: > knife cookbook upload --all |
| 846 | }}} |
| 847 | |
| 848 | |
| 849 | Now everything is set to start chef on the base node. On each base node, run the {{{bootstrap_node.sh}}} script to bootstrap the base node into the chef system. Once bootstrapped, we can run {{{chef-client}}} to configure the base node. |
| 850 | |
| 851 | {{{ |
| 852 | #!sh |
| 853 | users: > ssh base1 |
| 854 | base1: > /share/config_server/bin/bootstrap_node.sh -s chef -p 5323 -r pnode |
| 855 | }}} |
| 856 | |
| 857 | When running, you should see logging in the {{{config_server}}} window. |
| 858 | |
| 859 | Now start chef-client on the base node. |
| 860 | |
| 861 | {{{ |
| 862 | #!sh |
| 863 | users: > ssh base1 |
| 864 | base1: > sudo chef-client |
| 865 | }}} |
| 866 | |
| 867 | |
| 868 | There will be a bunch of output. You can see various chef cookbooks loaded and executed. The output will pause for a long time on {{{execute[vagrant up --parallel] action run}}}. This statement is the virtual machines booting on the base node. This will take a *long* time, 10 minutes or more. This step is starting the win7 virtual nodes *and* having the win7 nodes also chef-bootstrap and chef-configure themselves. Unfortunately there is no easily observable log output for these events. Once {{{chef-client}}} completes, the Win7 nodes should be up and accessible in the experiment. |
| 869 | |