Here are the steps that I’ve used to move some Windows ServerÂ EC2 instances to a different AWS account. Â This method should work for any OS, but I’ve only tested with Server 2008 R2.
The simple version:
- In the source account, stop the instance
- Make a snapshot of the instance’s system volume
- Share the snapshot with the destination account number
- In the destination account, make a volume from the snapshot
- Create an instance with the same OS as the source instance
- Detach and delete the new instance’s system volume
- Attach the volume from step 4
- Start the instance
The detailed version:
My Macbook Pro (mid-2009) hard drive crashed a few weeks ago. Â Since I had a current Time Machine backup, I figured that it would be super-simple to install a new hard drive and do a restore. Â Well, it wasn’t as simple as I’d hoped.
I wanted to temporarily redirect people who browse to www.keynote.org to the page www.keynote.org/donate.Â Since this is a WordPress site, I should have been able to easily do this by logging into the dashboard and going to Settings – Reading and changing the static front page to the Donate page.Â For some reason, the Donate page wasn’t rendering properly, even though the page looked fine when it wasn’t set as the front page.
Rather than take the time to figure out what is going on in the WordPress processing, I added the following line to the .htaccess file after “RewriteBase /”:
RewriteRule ^$ http://www.keynote.org/donate [L]
This matches any browser requests that don’t have anything after the hostname and redirects them to /donate. It seems to be working well so far.
This is one of those frustrating stories for a tech, where you bang your head against a problem for a few hours, finally fix it, then try to break it again to document it and it doesn’t behave the way you expect.Â But it’s still working, so maybe it will still help someone else…
I was trying to upload a 4 MB photo to my WordPress 3.4.2 site hosted at 1&1, and the uploader told me that it was too big — that the maximum upload file size was set to 2 MB in php.ini.Â It doesn’t appear that 1&1 gives me access to the main php.ini, so I tried to add one to the root folder and/or the wp-admin folder of my WordPress installation.Â Neither seemed to work, but I eventually figured out that I needed the file in the wp-admin folder and I needed to log out and back into the WordPress dashboard.Â Here’s the simple php.ini that I added to the wp-admin folder:
upload_max_filesize = 10M
post_max_size = 10M
What was extra frustrating was what happened when I removed the php.ini to document this: instead of going back to 2 MB, the maximum upload size went to 8 MB.Â That’s bigger than I needed, and if it had started that way I wouldn’t have had to go through all of this.Â I can’t explain it!
Maker Shed has a new Microcontroller Comparison chart comparing six Arduino variants, the Raspberry Pi, and the BeagleBone.
I’m still amazed by the hobbyist wonderland that we live in these days — the number of choices, the capabilities, and the low costs are unbelievable.
For a nice introduction video to the Arduino series, see the descriptions at robotshop.com and the video at the bottom of the page.
It’s helpful to have a white (or brown) noise machine outside our director’s office, since his office is next to the lunch room and it helps to make his conversations more private.Â But all of the machines that I saw on the market are sleep-oriented, and expect that you want them to turn off after a certain amount of time.
We started with a laptop, powered speakers, and the SimplyNoise.com web site (we like the “Brown Noise” sound there).Â We could use the mute button on the laptop or the power button on the speakers to turn the sound on and off.Â But that’s a waste of a laptop if the machine is good for anything else, and problem-prone if the laptop isn’t good for anything else.
So I decided that this would be a good first project for the Raspberry Pi. I found that mplayer will loop an audio file forever if you use the “-loop 0” switch. It does go silent for a split second when it’s looping, so you’ll want an audio file at least 15 or 20 minutes long to minimize the number of times it sounds like it’s stuttering.
There are plenty of tutorials out there about getting started with the Pi.Â After that, it’s as simple as:
- Load up an mp3 or wav file with 15 or 20 minutes (or more) of noise.
- sudo apt-get install mplayer
- create /etc/init.d/whitenoise.sh (included below)
- add it to system startup with “sudo update-rc.d whitenoise.sh defaults”
This could also be used as a Music on Hold player for older phone systems.
### BEGIN INIT INFO
# Provides: whitenoise
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: whitenoise
# Description: plays whitenoise file.
### END INIT INFO
/usr/bin/mplayer -quiet -loop 0 /home/pi/whitenoise.mp3 < /dev/null &
Someone in our office was getting the error “the server is currently unavailable” when trying to change Out of Office settings, and also when trying to see other people’s free/busy information.
I have fixed this problem in the past by making sure that the dns zone for the primary email address has an SRV record that points to our client access servers (I think that’s the right term — I use the same hostname that we use for Outlook Web Access).Â Here’s an overview of what goes into the SRV record.Â If you have a user with the primary email address of firstname.lastname@example.org, but your email server is mail.example.com, the SRV record goes into the examplecompany.com zone and contains the following info:
The situation in this case had an extra complication:Â I did not have access to the dns server for examplecompany.com.Â In this case, I used a quick and dirty workaround and set up an instance of dnsmasq on a linux server.Â Dnsmasq is one of the few services where you can say “return a certain record for one host in examplecompany.com, but forward all other examplecompany.com requests to the real dns server for that domain”. I think you can also configure PowerDNS to do this. I put the following statement in the dnsmasq.conf and pointed the user’s laptop to the dnsmasq machine:
It’s a kludge that only works when he’s in the office, but hopefully Outlook doesn’t need to reconfigure very often.
After recording a live stream with Wowza, it was not as simple as I thought to make the recording available for on demand viewing in a way that works for browsers and iOS devices.Â I moved the recording to my S3 bucket and was trying to make it available via CloudFront.
After much trial and error, the solution had two parts:
1. Convert the file from flv to mp4.Â I used AVS Video Editor with custom file settings to get an H.264 file with “mp4 iso v.2”
2. Serve up the file with a jwplayer playlist that contains two sources: an rtmp source from a CloudFront streaming distribution for browsers, and an http source from a CloudFront download distribution for iOS devices.Â Here is some example code:
There are good instructions here about getting going with S3 on EC2.Â I just wanted to let people know that I found s3fs already installed on my Wowza EC2 instance, and in a different location than in that forum thread.
After creating the /etc/passwd-s3fs file, I mounted the bucket with the commands:
- sudo mkdir /mnt/bucket
- sudo /usr/local/bin/s3fs bucket-name /mnt/bucket
After streaming several live events with Livestream and Ustream, the advertisements that they embed have become increasingly intrusive.Â Ustream now inserts video ads into the middle of a webcast, which will result viewers missing parts of the show.
Someone suggested running Wowza Media Server on an Amazon EC2 instance.Â For occasional webcasts, combining the $5/day Wowza license with $0.26 per hour for EC2 and the free Adobe Flash Media Live Encoder (FMLE), and you have a very affordable and powerful system.Â And it’s not too hard to piece together.Â Here’s what you’ll need:
- An audio/video source, obviously.Â This can be as simple as a webcam.Â We already had an s-video switcher and a sound board at the venue, so we used the switcher to choose between a camera, DVD player, and computer (for graphics).Â We combined the s-video and aux outs from the sound board with a Canopus ADVC-110 analog to digital converter.Â That connected to the broadcasting laptop via firewire.
- To send the stream to the media server, you need some software.Â Adobe FMLE works well and is free, and it’s what we used.Â It doesn’t let you do titles or switch between video and graphics, but we did some of that with the s-video switcher.Â If you have $500, you can invest in Wirecast, which I’ve heard very good things about.Â I tried XSplit, but it didn’t like the Canopus device.
- Sign up for EC2 from Amazon Web Services (AWS) and spin up a Wowza instance.Â Amazon offers preconfigured Wowza servers that will do everything you need for simple webcasts.Â There are good instructions here.Â I did notice that I didn’t need to create the security group mentioned in the instructions — Amazon created one automatically for the Wowza server.
- Start streaming from FMLE or your other streaming software to the Wowza server.
- Embed the stream on your web site with a player like JW Player (free for noncommercial use). If you want viewers to be able to use iOS devices, make sure that you configure your stream according to the tips in this thread.Â Here is the code that we used on our web site to enable regular browsers in addition to iOS devices:
Loading the player ...
If you want the Wowza server to automatically record the stream, it’s not difficult to set up a new stream type called “live-record” on the server.Â Just point your streaming software to that, and you’ll have a file in the content directory of the server when you finish the webcast.Â Look here to get started.
I hope this helps someone get started with commercial-free live streaming!