This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Creates a SmartOS VM in VirtualBox (assuming you alread have VirtualBox installed) | |
# | |
# This script will: | |
# * Download the latest live ISO image of SmartOS | |
# * Create a VirtualBox VM, or update an existing VM with the latest ISO | |
# * Configure the VM with a zones disk, and boot it! | |
# | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The basic idea is that we take the existing data via ActiveRecord | |
# and create new documents in MongoDB using MongoMapper. | |
# This method is necessary as we want to keep all the associations of existing dataset | |
# and by the way, clean up empty columns | |
# We rely on models still being ActiveRecord::Base, I bet you can figure out how the look like. | |
# And have the newer MongoDB ones here in a module, painful as we have to set the collection_name | |
# Don't put a +timestamps!+ into your MongoMapper models yet because this would change the updated_at if existing | |
# As you see in the MongoDB models, a few loose their indepence, e.g. Source as I | |
# plan to add other sources besides flickr, or Page and Album which only make sense in | |
# their parent Website |