Installing Dashboard


While I'm using Puppet environment 'testing', and the Dashboard environment is 'production', the interface doesn't show any classes. I don't know whether this is because the Puppet environment and the Dashboard environment should correspond, or because classes just aren't imported.

I don't even know whether Puppet and Dashboard environments have anything to do with each other at all.

  1. root@vhost1:~# apt-get install -y mysql-server

  2. root@vhost1:~# apt-get install -y puppet-dashboard

  3. root@vhost1:~# mysql -p
    Enter password: 
    mysql> CREATE DATABASE dashboard CHARACTER SET utf8;
    Query OK, 1 row affected (0.00 sec)

    mysql> CREATE USER 'dashboard'@'localhost' IDENTIFIED BY 'my_password';
    Query OK, 0 rows affected (0.00 sec)

    mysql> GRANT ALL PRIVILEGES ON dashboard.* TO 'dashboard'@'localhost';
    Query OK, 0 rows affected (0.00 sec)

    mysql> set global max_allowed_packet = 33554432;
    Query OK, 0 rows affected (0.00 sec)

    mysql> \q

  4. In /etc/mysql/my.cnf set:

    # Allowing 32MB allows an occasional 17MB row with plenty of spare room
    max_allowed_packet = 32M

  5. root@vhost1:~# cd /usr/share/puppet-dashboard/
    root@vhost1:~# rake RAILS_ENV=production db:migrate

  6. /etc/puppet-dashboard/database.yml:

    # -----
      database: dashboard
      username: dashboard
      password: my_password
      encoding: utf8
      adapter: mysql




    There is also /etc/default/puppet-dashboard-workers. Although it is the service puppet-dashboard-workers that we use, we configure it through /etc/default/puppet-dashboard.

  7. root@vhost1:~# service puppet-dashboard-workers start

  8. apprentice@home:~$ ssh apprentice@xenserver -L 3000:

    Now http://localhost:3000 on 'home' should show the Dashboard. (It does.)

  9. In /etc/puppet/puppet.conf under [master], add:

    reports = store, http
    reporturl = http://vhost1.xennet:3000/reports/upload

    then restart puppet on the master

    root@vhost1:~# apachectl restart

  10. root@vhost2:~# echo 'report = true' >> /etc/puppet/puppet.conf

  11. Run puppet agent -t on a client, then refresh the web interface at localhost:3000. Data should have streamed in.