Well it's started for me - I've started to put my data into the cloud. I have been using the cloud for a while, but only to setup web site hosting using the Amazon cloud. It was more a cost and quick availability to do. But now I've started to move files onto it.
My first steps this week were the move of some of my personal files. Had a bit of a shock this week when one of my notebooks started to play up. Whilst I could boot it up it was very unstable and ultimately I had to restore a backup I had made. (I don't do backups often, but did one a few weeks ago). I have so many memory sticks and external drives (two 1GB and one 400MB) as well as an old Dell server with several disks on them, I couldn't reliably tell you where everything was. Except for my main notebook.
So whilst the notebook was still booting up I all my files onto a disk and then onto Google Drive. (I already use Dropbox for work stuff with the young developers I work with). Then I restored the PC to a two week old image, attached Google Drive and my files were back.
I am however missing some email. The only things I have that weren't on Google Drive were my email and the small number of websites I work on. I did have backups of them, and although I am currently missing one week of my personal email I think I will be able to recover that from those backups.
I'll need to find a location for my websites using the cloud. In the meantime I am seeing what TFSpreview (Team Foundation Server Preview) is like for source control for my websites is like. I know it means my code is being held on some other server.
Next step is to look at options for hosting my email. Currently it is just POP/SMTP and all downloaded to my PC.
But, what would have happened had my notebook crashed. It wouldn't have been the end of the world. I did have backups - maybe a few weeks old. A few weeks ago that backup would have been a few months old.
What are the main issues with the cloud? There are in my mind two main issues. The first are privacy and security. There are private documents there - financial stuff, letters etc, although probably nothing that private and the financial information could probably be ascertained via a credit check. Can I trust suppliers of sites like Dropbox, Google Drive or Microsoft Skydrive?
The second is cost. At the moment, Google Drive is free (up to 5GB) and TFSPreview is free (although it is in a trial mode a free version will be available later). I'm not sure if my options for email via always be free - I'll report when I know that later. At the moment I am not "clouding" stuff like photos, movies, old letters, old code (that I refer to every now and then). But there will come a time I think that I'll be happy to pay for that. After the little shock this week when your one and only location of your latest stuff was playing up it was good to come out of the week with my data secure and backed up.
Final thing I did this weekend was get the Windows 8 Release Preview up and running on my old notebook. Partial reason was that I backed up (to disk) what was on this notebook and re-built this notebook as it wasn't used often, had Vista on it and I wanted to have a play with Windows 8 (I actually quite like it)
There were a few things I also setup cloud based. Firstly, Google Drive downloaded all my latest files and after installing Visual Studio for software development I pulled down some of the websites I was working on from TFSPreview.
Next was the Windows 8 can my Microsoft Live login for the machine. This should mean settings being saved with Microsoft Live and then new machines should have those settings. I also use Google Chrome for most of my browsing and had registered with Google (for things like Google Analytics). At some point I must have registered with Chrome and then when I logged in via Chrome my bookmarks came back on this machine (so they are now in sync). My shock was that I can't remember registering my bookmarks via Chrome.
Final thought about the cloud is your "apps" or programs you have bought. Whilst in the future I might be a cloud app user (I have used Google Apps and online Word for editing documents) I am not there yet. Looking at Windows 8 I think it will be a success for those users who want to browse the web, look at mail, instant messaging and show news/sport. All this can be done via Apps - they might never need to use the desktop at all. The cloud will know they use these apps, remember that, remember the settings and have the data in the cloud.
Sunday, 24 June 2012
Monday, 18 June 2012
Playing with Mono on the Raspberry PI
Mono is a free and open source (FOSS) project to implement the (Microsoft) .NET framework including the C# compiler and Common Language Runtime. To install you need to get the Raspberry PI up to date with the command
I actually run the command twice as it gave some warnings and to run it again. Then to install Mono tun the command
which will download and install Mono. Once done (it will take a while) create a directory and create a file (you need to learn how to use an editor like vi or nano) called test.cs with the following contents.
Run the following command to compile the file
apt-get update apt-get upgrade
I actually run the command twice as it gave some warnings and to run it again. Then to install Mono tun the command
apt-get install mono-complete
which will download and install Mono. Once done (it will take a while) create a directory and create a file (you need to learn how to use an editor like vi or nano) called test.cs with the following contents.
using System; namespace hello { public class HelloWorld { public static void Main() { Console.WriteLine("Hello, World!"); } } }
Run the following command to compile the file
mono-csc test.cs
If it works then it creates a file called test.exe. You can run it directly using
./test.exe
Or more correctly you should use
mono test.exe
Sunday, 17 June 2012
Getting your Raspberry PI up and running
Following on from my first thoughts here are the steps I went through to get the Raspberry Pi up and running.
Firstly this isn't my own work - it is taken from a number of other websites to put this together. The Raspberry Pi web site is a good place to start for information. Here you will find a downloads page with three versions of Linux. I originally started with the Debian Squeeze version and then went to the Arch Linux and then went back to the Squeeze version. I intend getting the Arch Linux one up and running as it might give more control as I can build exactly what I need.
1. Download from the Raspberry Pi downloads page the debian6-19-04-2012.img file (or the latest that is available).
2. I use a PC so have used a utility called Win32DiskImager. Download this. It isn't installed on your PC but you need to unzip the file. Once unzipped run the Win32DiskImager.exe. Choose the location of the debian image file and write it to a SD card you have inserted into your PC (make sure you choose the write disk as the tool apparently does not worry about where it writes to).
3. Once written put it in the Raspberry Pi. Attach a keyboard, mouse and monitor. You will also need a CAT 5 cable to connect it to your router. Your router should then provide an IP address to your machine.
4. Connect the power cable. You will need a 5V Micro USB connector (used by some mobile phones). The power light should come on and the display should run through some boot things. If your display is blank I have read reports of some problems with some displays (some with HDMI to DVI) and also some reports of issues with resolution (black borders and the resolution reduced). If the former you need to do some searching on the internet for solutions or use another monitor initially. For the latter I wouldn't worry about it yet.
5. The device will boot up to do some initialisation - then reboot itself. You will be presented with a login screen. The username is pi and the password is raspberry.
6. There is a little bit of work to do in configuration. When you logon to a Linux machine you generally do not use the Superuser (which is user root) - we are logging on as the user pi which means we do not have superuser privileges. However, if we type the command sudo at the start of a command it will run as if we were a superuser. (Lets not worry about how this works at the moment).
7. The first thing I did was enable ssh. This is the Secure Shell which allows us to connect to the RPi from another computer (securely). To do this you need to execute the commands below and reboot
8. To login from your PC you should download a utility such as putty. This is a telnet and SSH client. You just need to download the executable and run it (it is not installed so will not be on your start menu). You need to get the IP address of your RPi. The following command
will put out some information about your connections.
Once you have the IP address (in this case 192.18.11.7) you can connect using Putty. Run the putty executable and enter the IP address. You should now be able to logon (and thus not need a keyboard, mouse and monitor attached to your RPi - although it might be useful to still have the monitor attached to see if any messages get displayed from time to time whilst you are installing)
9. I used a 4GB SD disk - but the image does not use all of it. It is necessary to do some configuration of it. You need to run a utility called fdisk. Firstly if you run the command
it will display a list of disks available. You will see on this list /dev/mmcblk0p1 or similar. Things begining with /dev are devices and /dev/mmcblk0 is your SD card. It is split into three parts - 1 is the "boot" partition, which is used to startup the device. 2 is the "root" disk and 3 is set as "swap". The Raspberry Pi uses this to put contents of memory when all the memory is used.
To reconfigure the disk run the command
Whilst running type the commands
You now need to reboot the RPi, with
Once rebooted you then need to run the command
Then reboot again and check the disk (with df -h) to see if it is correct. I will post later how to add back swap.
Firstly this isn't my own work - it is taken from a number of other websites to put this together. The Raspberry Pi web site is a good place to start for information. Here you will find a downloads page with three versions of Linux. I originally started with the Debian Squeeze version and then went to the Arch Linux and then went back to the Squeeze version. I intend getting the Arch Linux one up and running as it might give more control as I can build exactly what I need.
1. Download from the Raspberry Pi downloads page the debian6-19-04-2012.img file (or the latest that is available).
2. I use a PC so have used a utility called Win32DiskImager. Download this. It isn't installed on your PC but you need to unzip the file. Once unzipped run the Win32DiskImager.exe. Choose the location of the debian image file and write it to a SD card you have inserted into your PC (make sure you choose the write disk as the tool apparently does not worry about where it writes to).
3. Once written put it in the Raspberry Pi. Attach a keyboard, mouse and monitor. You will also need a CAT 5 cable to connect it to your router. Your router should then provide an IP address to your machine.
4. Connect the power cable. You will need a 5V Micro USB connector (used by some mobile phones). The power light should come on and the display should run through some boot things. If your display is blank I have read reports of some problems with some displays (some with HDMI to DVI) and also some reports of issues with resolution (black borders and the resolution reduced). If the former you need to do some searching on the internet for solutions or use another monitor initially. For the latter I wouldn't worry about it yet.
5. The device will boot up to do some initialisation - then reboot itself. You will be presented with a login screen. The username is pi and the password is raspberry.
6. There is a little bit of work to do in configuration. When you logon to a Linux machine you generally do not use the Superuser (which is user root) - we are logging on as the user pi which means we do not have superuser privileges. However, if we type the command sudo at the start of a command it will run as if we were a superuser. (Lets not worry about how this works at the moment).
7. The first thing I did was enable ssh. This is the Secure Shell which allows us to connect to the RPi from another computer (securely). To do this you need to execute the commands below and reboot
cd /boot sudo mv boot_enable_ssh.rc boot.rc
8. To login from your PC you should download a utility such as putty. This is a telnet and SSH client. You just need to download the executable and run it (it is not installed so will not be on your start menu). You need to get the IP address of your RPi. The following command
ip addr
will put out some information about your connections.
pi@pi:~$ ip addr 1: lo:mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo 2: eth0: mtu 1488 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether b8:27:eb:f6:67:12 brd ff:ff:ff:ff:ff:ff inet 192.168.11.7/16 brd 192.168.255.255 scope global eth0
Once you have the IP address (in this case 192.18.11.7) you can connect using Putty. Run the putty executable and enter the IP address. You should now be able to logon (and thus not need a keyboard, mouse and monitor attached to your RPi - although it might be useful to still have the monitor attached to see if any messages get displayed from time to time whilst you are installing)
9. I used a 4GB SD disk - but the image does not use all of it. It is necessary to do some configuration of it. You need to run a utility called fdisk. Firstly if you run the command
sudo df -h
it will display a list of disks available. You will see on this list /dev/mmcblk0p1 or similar. Things begining with /dev are devices and /dev/mmcblk0 is your SD card. It is split into three parts - 1 is the "boot" partition, which is used to startup the device. 2 is the "root" disk and 3 is set as "swap". The Raspberry Pi uses this to put contents of memory when all the memory is used.
To reconfigure the disk run the command
sudo fdisk -uc /dev/mmcblk0
Whilst running type the commands
- p - which will print the current list of partitions and sizes
- d - to delete a partition
- 3 - to specify the swap partition to be deleted
- d - to delete a partition
- 2 - to specify the root disk
- n - to create a new partition
- p - to create a primary partition
- 2 - to specify the root disk
- 157976 - the start of the partition. This may be different from you - see the output from print which displays the original partitions.
- Enter - press enter for the next question and it will use the rest of the disk
- w - to write the changes
You now need to reboot the RPi, with
sudo reboot
Once rebooted you then need to run the command
sudo resize2fs /dev/mmcblk0p2
Then reboot again and check the disk (with df -h) to see if it is correct. I will post later how to add back swap.
My first view of the Raspberry PI
A (large) number of years ago I used UNIX machines almost exclusively. I was involved in delivering a software product that was built on a large number of architectures (from some DOS and Windows implementations to VAX VMS to IBM MVS to all flavours of UNIX on IBM, Sun, Silicon Graphics and other hardware). But it had been a while since I used a UNIX box in anger (although in the last 10 years I have installed Linux so that my previous business could have a Bugzilla server with MySql).
The Raspberry PI was released a few months ago and I was fortunate to get on early and order one each from the two distributors (at release you could only order one at a time). So now I have two and it was time to play. I am still working out what to do with these!
They were £25 (although by the time you add delivery it seems to nearer £30) each and have an ARM chip inside, 256MB of memory but apparently a good video chip, with HDMI output, two USB ports, Network connector and power (plus an audio & video and some on-board connectors).
To get the Raspberry PI up and running you need to download from the Raspberry Pi website an implementation of Linux (I have used the Debian Squeeze one initially) and write it to a SD card (not supplied), do some configuration and there you go.
My first "project" with them was to get the Microsoft.NET framework working using the Mono project. I more or less got it up and running from scratch in about 90 minutes (all the time remembering more and more about the fun of typing commands and using the vi editor!). I also got ASP.NET running on the box and a WinForms program.
Not quite right I know but I accessed the machine over the network from my notebook (whilst watching the football). I don't really have a spare monitor to plug this into. So once booted up I enabled "ssh" which allow remote access.
First impressions are it is a working Linux box. But if I wanted to do some Linux stuff I could just have built a Virtual machine for my PC (using VMWare Player or one of the other bits of software). It was good to see something so small run websites using Apache.
It is being targeted to young people and schools. I'm not sure that it will completely work. They are going to provide it boxed (the ones I have are just the board) and with documentation. It really needs this for people to get up to speed, but also for those who want to do a particular task (e.g. install Mono, play video, create video). Fortunately I have an idea of what I am doing - it might have been a while (I still think of UNIX rather than Linux).
My first computer (a VIC 20) gave me the opportunity to code - but things were simpler. You learned from scratch from the manual. I think I only gained success by continual study of the manual, magazines and anything I could get my hands on. It was also new - creating something on the screen on a VIC 20 felt like achievement. Not sure the young today will fell the same way (although my 8 year old god daughter uses Scratch to create programs). I think what is needed is some Raspberry Pi "training courses" to keep within the limits of the RPi but keep these people interested.
There are some additional costs to take into account - you need a SD card for each box (how many of them are going to go missing in schools!), plus a monitor taking a HD input (HDMI or DVI), which means a cable for that. Then a keyword and mouse, which most schools will have (once they recycle old machines - can't see them taking them from working PC's). On top of this schools will need to have some CAT5 sockets (so you can plug them into the internet) - and this means either setting up each SD card with a different static IP address or putting in a DHCP server (your home router does this for you - they aren't really suitable in a school). Finally take into account that these machines are small and might go for a walk (but they are cheap). All of this though is something that some simple training of teachers will solve.
So first one up and running with Debian and Mono with Apache.
I think the second one I might work with a friend getting it attached to his Solar Panel Inverter to read the performance which is then uploaded automatically to a monitoring site. That sounds more like a job for an embedded device. The first one may well become a proxy/VPN server meaning not leaving computers switched on when I am away or a Bugzilla Server or a Source Control server (maybe not).
On an aside, I first thought when I heard about these that if I were still managing a network centre having a rack of these rather than a single 1U server running some network services (such as DNS) might be a cheap way of providing a lot of redundancy. So having some of these at home behind a VPN might be a thought.
The Raspberry PI was released a few months ago and I was fortunate to get on early and order one each from the two distributors (at release you could only order one at a time). So now I have two and it was time to play. I am still working out what to do with these!
They were £25 (although by the time you add delivery it seems to nearer £30) each and have an ARM chip inside, 256MB of memory but apparently a good video chip, with HDMI output, two USB ports, Network connector and power (plus an audio & video and some on-board connectors).
To get the Raspberry PI up and running you need to download from the Raspberry Pi website an implementation of Linux (I have used the Debian Squeeze one initially) and write it to a SD card (not supplied), do some configuration and there you go.
My first "project" with them was to get the Microsoft.NET framework working using the Mono project. I more or less got it up and running from scratch in about 90 minutes (all the time remembering more and more about the fun of typing commands and using the vi editor!). I also got ASP.NET running on the box and a WinForms program.
Not quite right I know but I accessed the machine over the network from my notebook (whilst watching the football). I don't really have a spare monitor to plug this into. So once booted up I enabled "ssh" which allow remote access.
First impressions are it is a working Linux box. But if I wanted to do some Linux stuff I could just have built a Virtual machine for my PC (using VMWare Player or one of the other bits of software). It was good to see something so small run websites using Apache.
It is being targeted to young people and schools. I'm not sure that it will completely work. They are going to provide it boxed (the ones I have are just the board) and with documentation. It really needs this for people to get up to speed, but also for those who want to do a particular task (e.g. install Mono, play video, create video). Fortunately I have an idea of what I am doing - it might have been a while (I still think of UNIX rather than Linux).
My first computer (a VIC 20) gave me the opportunity to code - but things were simpler. You learned from scratch from the manual. I think I only gained success by continual study of the manual, magazines and anything I could get my hands on. It was also new - creating something on the screen on a VIC 20 felt like achievement. Not sure the young today will fell the same way (although my 8 year old god daughter uses Scratch to create programs). I think what is needed is some Raspberry Pi "training courses" to keep within the limits of the RPi but keep these people interested.
There are some additional costs to take into account - you need a SD card for each box (how many of them are going to go missing in schools!), plus a monitor taking a HD input (HDMI or DVI), which means a cable for that. Then a keyword and mouse, which most schools will have (once they recycle old machines - can't see them taking them from working PC's). On top of this schools will need to have some CAT5 sockets (so you can plug them into the internet) - and this means either setting up each SD card with a different static IP address or putting in a DHCP server (your home router does this for you - they aren't really suitable in a school). Finally take into account that these machines are small and might go for a walk (but they are cheap). All of this though is something that some simple training of teachers will solve.
So first one up and running with Debian and Mono with Apache.
I think the second one I might work with a friend getting it attached to his Solar Panel Inverter to read the performance which is then uploaded automatically to a monitoring site. That sounds more like a job for an embedded device. The first one may well become a proxy/VPN server meaning not leaving computers switched on when I am away or a Bugzilla Server or a Source Control server (maybe not).
On an aside, I first thought when I heard about these that if I were still managing a network centre having a rack of these rather than a single 1U server running some network services (such as DNS) might be a cheap way of providing a lot of redundancy. So having some of these at home behind a VPN might be a thought.
Subscribe to:
Posts (Atom)