9 | | Note: the recipes here use a mysql library to talk directly to the testbed database. On the current DETER testbed though, the database is setup to only allow local access from boss. The TMCD/TMCC library is used to bridge the gap between test nodes and the database on boss. The recipes can be rewritten to use the TMCD interface but this was an exercise in trying to cut out Emulab code, a decision was made to talk directly to the database using standard database APIs. In short, the cookbook (and recipes) here cannot be run on DETER unless the database on boss is reconfigured to allow external access. Instructions are given for that below though. If you want to run the recipes, spin up an Emulab in Emulab experiment or access a local, non-public DETER/Emulab instance and modify the database configuration. |
| 9 | Note: the recipes here use a mysql library to talk directly to the testbed database. On the current DETER testbed though, the database is setup to only allow local access from boss. The TMCD/TMCC library is used to bridge the gap between test nodes and the database on boss on DETER. The recipes can be rewritten to use the TMCD interface but this was an exercise in trying to cut out Emulab code, a decision was made to talk directly to the database using standard database APIs. In short, the cookbook (and recipes) here cannot be run on DETER unless the database on boss is reconfigured to allow external access. Instructions are given for that below though. If you want to run the recipes, spin up an Emulab in Emulab experiment or access a local, non-public DETER/Emulab instance and modify the database configuration. |
17 | | > ssh server |
18 | | > # if you don't want to hammer NFS, copy deb to /tmp first. |
19 | | > sudo dpkg -i /share/chef/chef-server_11.0.12-1.ubuntu.12.04_amd64.deb |
20 | | > sudo chef-server-ctl reconfigure |
21 | | > sudo chef-server-ctl test |
| 17 | users$ ssh server |
| 18 | server$ # if you don't want to hammer NFS, copy deb to /tmp first. |
| 19 | server$ sudo dpkg -i /share/chef/chef-server_11.0.12-1.ubuntu.12.04_amd64.deb |
| 20 | server$ sudo chef-server-ctl reconfigure |
| 21 | server$ sudo chef-server-ctl test |
46 | | Now configure the workstation user and set up keys. Note that there *is* a web interface for this and that is the standard interface to use for this. Since it assumes you're running the browser locally though, you need to setup an ssh tunnel and a web proxy like Foxy-Proxy to access it. For this script though (and because we prefer it as it's scriptable) we stick to the command line. To do this though, we need to copy private keys. The procedure for using the web API copies public keys from a web page. |
47 | | |
48 | | {{{ |
49 | | > mkdir .chef |
50 | | > # copy keys! |
51 | | > ssh server sudo cat /etc/chef-server/admin.pem > .chef/admin.pem |
52 | | > ssh server sudo cat /etc/chef-server/chef-validator.pem > .chef/chef-validator.pem |
53 | | > # use knife to configure the account/workstation |
54 | | > knife configure --initial |
| 46 | Now configure the workstation user and set up keys. Note that there *is* a web interface for this and that is the standard interface to use for this. Since it assumes you're running the browser locally though, you need to setup an ssh tunnel and a web proxy like Foxy-Proxy to access it. For this script though (and because we prefer it as it's scriptable) we stick to the command line. To do this, we need to copy private keys. (The procedure for using the web API copies public keys from a web page so is the preferred method.) |
| 47 | |
| 48 | {{{ |
| 49 | workstation$ cd /local/chef-repo |
| 50 | workstation$ mkdir .chef |
| 51 | workstation$ # copy keys! |
| 52 | workstation$ ssh server sudo cat /etc/chef-server/admin.pem > .chef/admin.pem |
| 53 | workstation$ ssh server sudo cat /etc/chef-server/chef-validator.pem > .chef/chef-validator.pem |
| 54 | workstation$ # use knife to configure the account/workstation |
| 55 | workstation$ knife configure --initial |