Core Services Replacement
Replacing the old core services box
Asterisk has already been moved off and virtualized.
Now we move all the old scripts to the new box so we can relieve failing hardware and prepare to start separating and virtualizing the remaining services.
In line with UNIX filesystem standards, we will move all custom scripts and packages that are coded by UAS into /opt/uas instead of using /uas
the new box is a VXL thin client, a P4 with 2GB ram and 4GB onboard SSD storage.
First step has been to install latest debian - old core box was a very out of date and unsupported Ubuntu Server install (10.10).
First step - copy over occupancy sensor system. Latest scripts will be uploaded and published afterwards.
Next - install pre-requisites. apt-get install ImageMagick alsamixer mplayer
At this point, move speaker over to new box and test audio.
Audio playback is problematic - had to install PulseAudio because mplayer was having problems. Rebooted.
Next - testing the scripts.
Tested OCS - needs curl
apt-get install curl
OCS works and updates the site. cron job executing on schedule.
Audio fixed - old speaker was unpowered and new box didn't have enough power output to run it loud enough. Replaced with a decent set of sony speakers.
At this point, with OCS working, we went ahead and took down the old core services box from it's location. set it back up as a reference on a workbench.
Next step - install pywapi and tweepy so the IRC bot can work.
wget http://python-weather-api.googlecode.com/files/pywapi-0.3.5.tar.gz tar xvf pywapi-0.3.5.tar.gz cd pywapi-0.3.5
$ python setup.py build $ python setup.py install
next, tweepy
apt-get install git git clone https://github.com/tweepy/tweepy.git python setup.py install
can't find "setuptools" in the setup script. googling now..
apt-get install python-setuptools
python setup.py install
success!
now to test the IRC bot ....
./bot_rapper.sh
no module named serial
apt-get install python-serial
Bot works. make sure to edit all code, replace /uas/ with /uas/opt/
sign - chmod 777 /dev/ttyS0 and /dev/ttyUSB0 - works.
Added user to 'dialout' group - has full access. doesn't need to chmod.
checkin - barcode scanner - unallocated@serviceshardware:/opt/uas/checkin$ cat /etc/udev/rules.d/50-usb-barcode.conf SUBSYSTEM=="usb", ATTR{idVendor}=="05E0", ATTR{idProduct}=="1200", MODE="0777"
this lets the device be 0666 so users can use it as the hid devices are owned by root
missing pygame.mixer
apt-get install python-pygame
remember - make sure all paths are corrected