Jump to content

Welcome, Guest!

webpi

Members
  • Content Count

    94
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by webpi

  1. I've spent more time working on my Banana Pi powered MySQL cluster. I've written a tool called DB Cluster Utils to manage the cluster from the command line. I have a separate Banana Pi which I use as a control node to administer the cluster. I can use the DB Cluster Utils (db_cluster_utils.py) command to demote a master server, promote a new slave, add new servers to the cluster and a few other things. You can read about it here: http://banoffeepiserver.com/mysql/python-database-cluster-management-utility/. The code is on github at https://github.com/Pyplate/db-cluster-utils. Eventually I'm going to use the database cluster in banoffeepiserver.com. At the moment that site is powered by a cluster of web servers that each have a copy of an SQLite database. Moving to a MySQL database will allow me to offload database processing from the web servers, so the site should be able to handle more traffic.
  2. It sounds like you need to free up some space on the SD card. Are there any files that you could delete from your home directory? Uninstalling Wolfram will free up a lot of space: sudo apt-get purge wolfram-engine Also, try unmounting the two drives, and check that /media/master_nas and /media/backup_nas are empty. I've seen situations where I thought a drive was mounted, so I copied a bunch of files to the mount directory, and accidentally filled the root partition.
  3. Have you expanded the root partition to fill the card? You can do this with the raspi-config command: sudo raspi-config Select the first option and exit from raspi-config.
  4. Do you have an extension cord with surge protection? That can help with power supply issues. Sometimes noise in the mains supply can disrupt a Pi. I think this is less of a problem with the Pi B+ because of its improved power handling.
  5. That looks pretty cool. Good luck with your Kickstarter campaign.
  6. I've built two more Banana Pi clusters - one is a replicating MySQL database cluster, and the other is running the GlusterFS distributed file system. The MySQL Banana Pi cluster is made from 4 Banana Pis running Raspbian: The Banana Pi storage cluster also has four hard disks attached to it: GlusterFS allows four separate servers to be used as a single storage volume. I've set up GlusterFS to replicate data so that no data will be lost if a hard disk dies. Eventually I'm going to modify the server cluster to work with the database and storage clusters. Watch this space.
  7. I'm guessing you would need to write device drivers to control the buttons via GPIO, unless someone has already done that. If you connect via USB, there are drivers for a few different controllers. You just need to run a set up script to select the controller. Taking the GPIO approach could be an interesting learning opportunity if you want to learn about writing drivers, but if you connect with USB you'll probably get your device up and running faster.
  8. I've taken some new photographs of my server clusters now that I've got them set up the way I want: The Banana Pi servers are in the rack on the left. The other two racks have Raspberry Pi servers in them. The PC at the bottom of the stack is the load balancer which distributes requests to the clusters. At the top, there's a large ethernet switch that links the servers and the back end of the load balancer. I have another server that's running a small forum which needs to be able to send emails to users when a thread is updated. The server can't connect to the internet directly because it's behind the load balancer. I added the small switch and router at the top of the stack to forward traffic from the server subnet to the local network. This allows the forum to send emails to users. There's another router that's not in these pictures that connects my local network to the internet. Check it out at http://banoffeepiserver.com/banana-pi-server-cluster/
  9. You can probably connect a USB game controller to the pi using a USB hub. Just plug the controller in. I believe some RPi gaming software comes with drivers for controllers. According to this articles on life Hacker, RetroPie can be configred to work with different controllers: http://lifehacker.com/how-to-turn-your-raspberry-pi-into-a-retro-game-console-498561192
  10. I built a Raspberry Pi cluster a while ago, and it's been running really well. I got my hands on 4 Banana Pis a month ago, and I thought I'd build another cluster. This time around I've used Nginx instead of Apache. I'm using a CMS I wrote myself called Pyplate. The latest version is much more efficient than the version I used in my RPi cluster. The Banana Pi is a lot more powerful than a Raspberry Pi because it has a dual core SoC running at 1GHz, and it's great for web servers because it's got gigabit ethernet. The Banana Pi also has a SATA port, but I'm just using SD cards for simplicity. Check out my site at Banoffee Pi Server.
  11. I've made a lot of changes to Pyplate, my Python CMS. I've released a new version with these changes: Nginx is now supported the UI for managing backups now allows restoring/deleting/downloading backups fine grain cache control comments and sharing templates numerous bug fixes I've now included 2 free themes. You can see screenshots at http://www.pyplate.com/, and read the installation instructions here: http://www.pyplate.com/install-pyplate
  12. I used C for 20 years and recently switched to Python. I really prefer Python because you don't have to worry about as many details like allocating memory. I find that I can get things done much more quickly in Python than in C. I considered learning Perl, but I don't think it's commonly used these days.
  13. I've been working on a web site framework called Pyplate for over a year now. It's finally ready for beta testing. You can download it here: http://www.pyplate.com/install-pyplate Pyplate has been tested on Raspbian with Apache. Other web servers will be supported in the near future. My CMS is much smaller and simpler than Wordpress, so it's ideal for running on a Pi. I use it to power my Raspberry Pi cluster. Pyplate also works on PCs and other devices - anything that can run Linux and Apache. It uses SQLite, and has built in page caching. Check it out, and let me know how you get on with it.
  14. Did you connect the dongle directly to the Pi, or did you plug it in to a powered hub? Wifi dongles draw a surprising amount of current, so it needs to be plugged in to a powered usb hub connected to your Pi. If possible, make sure your Pi is close to a wifi access point. The output from ifconfig shows that the wifi adapter doesn't have an IP address, so DHCP is failing. It looks like your wifi dongle gets enough power to detect your wifi network, but not enough power to communicate over it, and that's why DHCP isn't working.
  15. It's important for my site to be as fast as possible, so I didn't want to add the overhead of serving content from NFS. The script that I use to sync servers is pretty simple, and I've set up a button in the admin area of my site that I can click to sync the servers when I update the site.
  16. Yes, if you connect the disk to the Pi, it will be much faster.
  17. There are a bunch of tutorials on my site. See the link in my signature.
  18. Open a terminal window and type sudo leafpad /etc/network/interfaces That will open the file were the IP settings are stored.
  19. Take the card out of the Pi and put it in a Linux PC. If you don't have a Linux PC, download a Ubuntu live image, make a boot cd and use it to boot a PC or laptop. Then you should be able to mount the card and edit your interfaces file.
  20. The fact that you can see w1_busmaster1 is a good sign - the modules appear to be loaded correctly. Is the sensor connected at the moment? If not, hook it up and run ls again. The folder starting with '28' is only visible when the sensor's connected. If it is connected, check your wiring for a bad connection.
  21. In a terminal window, try typing this to make sure that the directory exists: ls -l /sys/bus/w1/devices/
  22. I'm not sure how base_dir is meant to be set in your code, but when it does get set, it should be equal to "/sys/bus/w1/devices/". You can check if base_dir is holding this string by adding print base_dir on the line before glob.glob. (If you're using a debugger, there may be some other way of checking the value of variables, but I just debug by printing variables to see what's in them.) If you run your script again and base_dir has the incorrect value, you could try setting it like this: base_dir="/sys/bus/w1/devices/" Again, this would go on the line before glob.glob.
  23. So glob.glob isn't returning a valid result. What's the value of base_dir? I'm not sure what environment you're using, so the simplest way to find out the value of base_dir is to add a line to print it out like you did with the device_folder variable. Before the call to glob.glob base_dir needs to be set to this path: /sys/bus/w1/devices/ Edit: BTW, did you enable the w1 kernel modules? Did you check that the folder /sys/bus/w1/devices/ actually exists and contains a folder starting with '28'?
  24. Add a line before the one above: print device_folder This will show whether glob.glob from the previous line returned a valid result. If it doesn't, then you should look at the arguments passed to glob.glob. What's the value of base_dir? It should be something like this: /sys/bus/w1/devices/ Check that there is a '/' at the end of the string.

About Us

Bringing you the latest Raspberry Pi news, tutorials and user forum.

The Fruity Computer

×
×
  • Create New...