Changes between Version 10 and Version 11 of ChefonDETER


Ignore:
Timestamp:
Jul 15, 2014 11:00:03 AM (10 years ago)
Author:
Geoff Lawler
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChefonDETER

    v10 v11  
    11
    2 = Installing Chef on DETER =
     2= Installing and Running Chef on DETER =
    33
    44
     
    66
    77The workflow for a running system is recipes, roles, and chef code is written on a workstation and added to a chef repository. The person on the workstation then pushes updates to the chef server. The client then contacts the chef server for updates, gets the updates, and applies them locally. {{{Knife}}}, on a workstation, can also install Chef-client (and other packages) directly on a client. If this is done the flow becomes: 1) workstation pushes update to the server, 2) the workstation installs Chef on a client and gives it an initial role or list of recipes, 3) the newly installed {{{chef-client}}} then contacts the chef server and downloads the recipes and executes them, configuring the client node.
     8
     9Note: 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. 
    810
    911Swap in an experiment with at least three Ubuntu 12.04 nodes, one {{{server}}}, one {{{workstation}}}, and one {{{client}}}.
     
    193195}}}
    194196
    195 = Running Chef on DETER =
    196 
    197 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 steps below cannot be run on DETER unless the database on boss is reconfigured to allow external access. Instructions are given for that below though.
    198 
    199  * Getting recipes
    200  * Pushing recipes
    201  * Running recipes
    202 
    203 
     197=== Database Configuration Modification ===
     198
     199In order to use the {{{deter_node}}} cookbook, the database on boss must be accessible to the test nodes. Also the mysql2 gem must be installed on the test node as the recipes use that to talk to the database. Instructions for both are given below.
     200
     201The database on boss is mysql2. It is spawned on boot via the {{{/usr/local/etc/rc.d/2.mysql-server.sh}}} script. In that script one of the arugments to mysql2 is {{{--skip-networking}}}. If that is removed the database can be accessed remotely. You can either modify that script and call it with {{{stop}}} then {{{start}}} to restart the mysql2 instance or just {{{killall mysqld}}} then start it by hand with the following arguments: {{{--pid-file=/var/db/mysql/mysqld.pid --skip-grant-tables --user=mysql --log=/usr/testbed/log/mysql/base --log-bin=/usr/testbed/log/mysql/update --log-slow-queries=/usr/testbed/log/mysql/slowqueries --max_connections=500}}}.
     202