<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>WOlastic.com</title>
    <link rel="alternate" type="text/html" href="http://wolastic.com/" />
    <link rel="self" type="application/atom+xml" href="http://wolastic.com/atom.xml" />
    <id>tag:wolastic.com,2009-06-23://1</id>
    <updated>2009-07-09T05:43:12Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.261</generator>

<entry>
    <title>Announcing WOlastic 32-bit All-In-One Image Version 20090708</title>
    <link rel="alternate" type="text/html" href="http://wolastic.com/2009/07/announcing-wolastic-32-bit-all-in-one-image-version-20090708.html" />
    <id>tag:wolastic.com,2009://1.9</id>

    <published>2009-07-09T00:42:05Z</published>
    <updated>2009-07-09T05:43:12Z</updated>

    <summary><![CDATA[Hi All, I'm happy to announce that Version 20090708 of the WOlastic 32-bit All-In-One Image has been released. &nbsp;In a nutshell, patches were updated to the CentOS base Operating System and starting with this AMI and going forward, there is...]]></summary>
    <author>
        <name>Daniel Kao</name>
        <uri>http://wolastic.com</uri>
    </author>
    
        <category term="WOlastic" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="wolastic20090708" label="wolastic 20090708" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://wolastic.com/">
        <![CDATA[Hi All,<br /><br /> <p>I'm happy to announce that Version 20090708 of the WOlastic 32-bit All-In-One Image has been released. &nbsp;In a nutshell, patches were updated to the CentOS base Operating System and starting with this AMI and going forward, there is support for using Amazon EBS to keep your PostgreSQL and/or MySQL databases running on the same instance on a persistent volume.<br /> </p><p>us-east-1: ami-0be80962 (32-bit/All-In-One) <br /> eu-west-1: ami-75b79f01 (32-bit/All-In-One) <br /> </p><p>Guides are available: <br /> </p><p><a target="_blank" rel="nofollow" href="http://wolastic.com/2009/07/using-postgresql-andor-mysql-on-a-wolastic-instance.html">http://wolastic.com/2009/07/using-postgresql-andor-mysql-on-a-wolastic-instance.html</a><br /> <a target="_blank" rel="nofollow" href="http://wolastic.com/2009/07/using-amazon-ebs-for-db-persistance-on-a-wolastic-instance.html">http://wolastic.com/2009/07/using-amazon-ebs-for-db-persistance-on-a-wolastic-instance.html</a><br /> </p><p>CHANGELOG: <br /> </p><p>July 8, 2009 - CentOS53-i386-WebObjects-5.4.3-20090708 <br /> ====================================================== <br /> </p><p>Daniel Kao &lt;dkao@ubermind.com&gt; <br /> </p><p>* Patched/Update CentOS 5.3 to all updates available <br /> &nbsp; up until 2009-07-08 <br /> </p><p>* First WOlastic support for Amazon EBS volumes <br /> &nbsp; for persistent PostgreSQL &amp; MySQL databases <br /> </p><p>* Amazon EBS guide available at <a target="_blank" rel="nofollow" href="http://wolastic.com/">http://wolastic.com</a> <br /> </p><p>* Added ability for the "appserver" user to run <br /> &nbsp; "yum update" to perform patches/updates to the <br /> &nbsp; Operating System. <br /> </p>Also, follow us on Twitter! <br /> <a target="_blank" rel="nofollow" href="http://twitter.com/wolastic">http://twitter.com/wolastic</a>  ]]>
        
    </content>
</entry>

<entry>
    <title>Using Amazon EBS for DB Persistence on a WOlastic Instance</title>
    <link rel="alternate" type="text/html" href="http://wolastic.com/2009/07/using-amazon-ebs-for-db-persistence-on-a-wolastic-instance.html" />
    <id>tag:wolastic.com,2009://1.8</id>

    <published>2009-07-08T23:00:57Z</published>
    <updated>2009-07-09T03:34:38Z</updated>

    <summary><![CDATA[IntroductionNOTE: This guide requires the use of WOlastic 20090708 or later!One of the major "gripes" about Amazon EC2 instances is that by default, do not handle persistent data.&nbsp; In other words, if you ever decide to "power-off" an EC2 instance,...]]></summary>
    <author>
        <name>Daniel Kao</name>
        <uri>http://wolastic.com</uri>
    </author>
    
        <category term="WOlastic" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="amazonebspostgresqlmysqlwolasticdatapersistance" label="amazon ebs postgresql mysql wolastic data persistance" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://wolastic.com/">
        <![CDATA[<font style="font-size: 1.25em;"><b>Introduction</b></font><br /><br /><b>NOTE:</b> This guide requires the use of <b><font color="#ff0000">WOlastic 20090708</font></b> or later!<br /><br />One of the major "gripes" about Amazon EC2 instances is that by default, do not handle persistent data.&nbsp; In other words, if you ever decide to "power-off" an EC2 instance, all data stored on the instance storage, including any changes to the 10GB root partition from your AMI, is lost.&nbsp; (Note: However, rebooting an EC2 instance, no data loss occurs.)<br /><br />Amazon recently began offering as part of their Amazon AWS service, Amazon EBS.&nbsp; EBS, which stands for "Elastic Block Store", handles persistence for when "issues" arises with an EC2 instance.&nbsp; You can view EBS, basically, as a hard-drive that is an accessible, mountable and formattable block-device for your EC2 instance.&nbsp; Sizes begin as small as 1GB up to 1TB (1,000GB).<br /><br />Pricing structure is relatively simple with Amazon EBS.&nbsp; Pricing for storage is $0.10 USD per allocated GB per month.&nbsp; Meaning a 100GB EBS volume would cost $10 USD/month. However on top of that, Amazon has I/O charges on top of it at $0.10 USD per 1-million I/O.&nbsp; Amazon uses an example of a medium-sized database which does about 100 I/Os per second over the course of a month which equates to approximately an additional $16 USD/month.&nbsp; So your total bill for your 100GB EBS volume would be approximately $26 USD/month.<br /><br />For all of the complete features of Amazon EBS, please visit:<br /><br /><ul><li><a href="http://aws.amazon.com/ebs/">http://aws.amazon.com/ebs/</a></li></ul><br /><font style="font-size: 1.25em;"><b>Creating an Amazon EBS Volume</b></font><br /><br /><b>1.</b> The assumption of this guide is you've already launched and are familiar with the WOlastic instance environment.<br /><br /><b>2.</b> Log into your Amazon AWS account's Console at the following URL:<br /><br /><ul><li><a href="http://aws.amazon.com/console/">http://aws.amazon.com/console/</a></li></ul><br /><b>3.</b> Find the instance you wish to add the EBS volume to.&nbsp; Under the <b><i>Navigation</i></b> pane on the left, select "<i><b>Instances</b></i>" and find your running WOlastic instance.&nbsp; Select &amp; highlight the instance so it shows you the instance details on the bottom frame.&nbsp; You will see something similar to this:<br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="instance_zone.png" src="http://wolastic.com/instance_zone.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="272" height="130" /></span><br />In this example, our WOlastic instance is running on <i><b>us-east-1b</b></i>.<br /><br /><b>4.</b> Now, under the Navigation pane on the left, select "<i><b>Volumes</b></i>" under the "<i><b>Elastic Block Store</b></i>" header.<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="ebs_volumes.png" src="http://wolastic.com/ebs_volumes.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="206" height="166" /></span><b>5.</b> If you do not have any existing "<i><b>Volumes</b></i>", your only option will be "<i><b>Create Volume</b></i>", otherwise it will list your existing EBS volumes that are under your account.&nbsp; Click on "<i><b>Create Volume</b></i>".<br /><br /><b>6.</b> You will see a pop-out window asking for the following information:<br /><br /><ul><li><b>Size:</b></li><li><b>Availability Zone:</b></li><li><b>Snapshot:</b></li></ul><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="create_volume.png" src="http://wolastic.com/create_volume.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="384" height="304" /></span><b><br />7.</b> In our example, we will be creating a 10GB EBS volume.&nbsp; You can create any size between 1GB and 1,000GB (1TB).<br /><br /><b>8.</b> For "<i><b>Availability Zone</b></i>", select the zone in which your WOlastic instance is running on.&nbsp; In our example, it would be <i><b>us-east-1b</b></i>.<br /><br /><b>9.</b> "<i><b>Snapshot</b></i>" isn't relevant to this guide, but basically you can restore "snapshots" of volumes which are stored on Amazon S3 (i.e. backups, pre-loaded data, etc.)&nbsp; Since in our case we're just creating an EBS volume to store our PostgreSQL or MySQL database, we leave this blank.<br /><br /><b>10.</b> Click "<i><b>Create</b></i>" after you've filled out the relevant information.<br /><br /><b>11.</b> Amazon AWS will at this point will create your EBS volume.&nbsp; Under "<i><b>Status</b></i>", it should show "<i><b>creating</b></i>".&nbsp; You can manually click "<i><b>Refresh</b></i>" to see the status of the EBS volume creation process.&nbsp; Once the "<i><b>Status</b></i>" shows available, we're ready to mount this volume under your WOlastic instance.<br /><br /><br /><font style="font-size: 1.25em;"><b>Mounting/Attaching an Amazon EBS Volume to your WOlastic Instance</b></font><br /><br /><b>1.</b> At this point, we need to attach this volume to your WOlastic Instance.&nbsp; Select the EBS volume you just created in the AWS Management Console and click on "<i><b>Attach Volume</b></i>".&nbsp; A pop-up will occur asking you the following information:<br /><br /><ul><li><b>Volume:</b></li><li><b>Instances:</b></li><li><b>Device:</b></li></ul><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="attach_volume.png" src="http://wolastic.com/attach_volume.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="360" height="168" /></span><b><br />2.</b> "<i><b>Volume</b></i>" will automatically be filled in for you.&nbsp; "<i><b>Instances</b></i>" will be a pulldown of which instances are available to have the EBS volume attach to.&nbsp; If you have more than one instance running in an availability zone, please double-check you're attaching to the correct instance.&nbsp; If it's your only instance, then the pre-filled instance ID is the correct one.<br /><br /><b>3.</b> "<i><b>Device</b></i>" should default to <b>/dev/sdf</b>.&nbsp; Leave it be.&nbsp; Now click "<i><b>Attach</b></i>".<br /><br /><b>4.</b> At this point, the EBS volume will attach itself to the WOlastic instance.&nbsp; Hit "<i><b>Refresh</b></i>" a couple times and make sure under the "<i><b>Attachment Information</b></i>" column that the instance ID and associated mount point shows "<i><b>attached</b></i>".<br /><br /><b>5.</b> Log into your WOlastic instance via SSH, if you haven't already, as the "<i><b>appserver</b></i>" user.&nbsp; At the shell prompt, type "<b>dmesg</b>".&nbsp; The last line you see should be similar to this:<br /><b><br /></b><blockquote><pre><b>[9508565.493572]&nbsp; sdf: unknown partition table</b><br /></pre></blockquote><br /><b>6.</b> This correctly means your Amazon EBS volume is now attached to your WOlastic instance.<br /><br /><b>7.</b> Now, we must prepare the volume to store data so we must format a file-system.&nbsp; We will be using XFS.&nbsp; From the shell prompt, run the following command:<br /><br /><blockquote><pre><b>sudo mkfs.xfs /dev/sdf</b><br /></pre></blockquote><br /><b>8.</b> You might be prompted for a password.&nbsp; Enter the password for "<i><b>appserver</b></i>".&nbsp; If everything goes correctly, you should see something similar to this:<br /><br /><blockquote><pre><b>meta-data=/dev/sdf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isize=256&nbsp;&nbsp;&nbsp; agcount=16, agsize=163840 blks<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sectsz=512&nbsp;&nbsp; attr=0<br />data&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bsize=4096&nbsp;&nbsp; blocks=2621440, imaxpct=25<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sunit=0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; swidth=0 blks, unwritten=1<br />naming&nbsp;&nbsp; =version 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bsize=4096 &nbsp;<br />log&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =internal log&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bsize=4096&nbsp;&nbsp; blocks=2560, version=1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sectsz=512&nbsp;&nbsp; sunit=0 blks, lazy-count=0<br />realtime =none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extsz=4096&nbsp;&nbsp; blocks=0, rtextents=0<br /></b></pre></blockquote><br />9. Your EBS is now ready to be used!&nbsp; All of the PostgreSQL &amp; MySQL data are stored in /vol.&nbsp; We will now "move" the existing PostgreSQL &amp; MySQL data off the 10GB root-partition in /vol to the new XFS-formatted EBS volume.<br /><br /><br /><font style="font-size: 1.25em;"><b>Migrating PostgreSQL &amp; MySQL data to your EBS Volume</b></font><br /><br /><b>1.</b> Run the following command to mount the new EBS volume under /temp:<br /><br /><blockquote><pre><b>sudo mount /dev/sdf /temp</b><br /></pre></blockquote><br /><b>2.</b> You can run a "<b>df</b>" at the shell prompt to make sure it shows up mounted as /temp.<br /><br /><b>3.</b> If you have existing data that is important, <b>BACKUP your databases NOW!</b>&nbsp; There are many guides on how to backup PostgreSQL &amp; MySQL databases.&nbsp; Google it!<br /><br /><b>4.</b> Now, shutoff all running instances of PostgreSQL &amp; MySQL, if running.&nbsp; Run the following commands at the shell prompt:<br /><br /><blockquote><pre><b>sudo service postgresql stop</b><br /><b>sudo service mysqld stop</b><br /></pre></blockquote><br /><b>5.</b> If you see "<b>FAILED</b>", that means the service wasn't running in the first place.&nbsp; If it is running, you should see "<b>OK</b>".<br /><br /><b>6.</b> Now we will move the data.&nbsp; Run the following commands (you have backups if you need them, right?) from the shell prompt:<br /><br /><blockquote><pre><b>sudo</b> <b>mv /vol/pgsql /temp/pgsql</b><br /><b>sudo mv /vol/mysql /temp/mysql</b><br /></pre></blockquote><br /><b>7.</b> Verify that the data has moved by running an "<b>ls -l /temp</b>".&nbsp; <b>You should see both a mysql and pgsql directory.</b><br /><br /><b>8.</b> Now, we will umount the Amazon EBS volume from /temp and remount it as /vol by running the following commands:<br /><br /><blockquote><pre><b>sudo umount /temp</b><br /><b>sudo mount /dev/sdf /vol</b><br /></pre></blockquote><br /><b>9.</b> If you receive the following error message when you run the umount:<br /><b><br /></b><blockquote><pre><b>umount: /temp: device is busy</b><br /></pre></blockquote><br />It means you've changed active directory to /temp with your shell account.&nbsp; Run "<b>cd</b>" and then the commands again.<br /><br /><b>10.</b> If everything went smoothly, you should be able to run a "<b>df</b>" and verify that /dev/sdf is now mounted as /vol.<br /><br /><b>11.</b> At this point, you can restart PostgreSQL and MySQL:<br /><br /><blockquote><pre><b>sudo service postgresql start</b><br /><b>sudo service mysqld start</b><br /></pre></blockquote><br /><b>12.</b> One last thing we need to do is add the proper entries to /etc/fstab to the WOlastic instance if you ever need to "<b>restart</b>" the instance and have the volume properly mount.<br /><br /><b>13.</b> From the shell prompt, run the following command:<br /><br /><blockquote><pre><b>sudo cp /etc/fstab.vol /etc/fstab</b><br /></pre></blockquote><br /><b>14.</b> You're done!&nbsp; Now all of your PostgreSQL &amp; MySQL data are persistent on your WOlastic instance on Amazon EC2!&nbsp; You can create "snapshot" backups using Amazon S3 of your EBS volume.&nbsp; Just make sure PostgreSQL &amp; MySQL aren't running at the time of the backup.&nbsp; In the future, I will add some 3rd party contributed XFS &amp; Amazon EBS/AWS utilities which allows you to take "live" snapshots without shutting down PostgreSQL or MySQL by "freezing" the XFS filesystem for a snapshot.]]>
        
    </content>
</entry>

<entry>
    <title>Using PostgreSQL and/or MySQL on a WOlastic Instance</title>
    <link rel="alternate" type="text/html" href="http://wolastic.com/2009/07/using-postgresql-andor-mysql-on-a-wolastic-instance.html" />
    <id>tag:wolastic.com,2009://1.7</id>

    <published>2009-07-08T20:00:00Z</published>
    <updated>2009-07-08T19:52:14Z</updated>

    <summary><![CDATA[IntroductionSo you're ready to deploy a WebObjects application onto your WOlastic instance.&nbsp; You use either a PostgreSQL or MySQL database back-end for your application and you need to get it up and running.&nbsp; Simple enough!&nbsp; WOlastic comes with PostgreSQL and...]]></summary>
    <author>
        <name>Daniel Kao</name>
        <uri>http://wolastic.com</uri>
    </author>
    
        <category term="WOlastic" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="postgresqlmysqlwolastic" label="postgresql mysql wolastic" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://wolastic.com/">
        <![CDATA[<font style="font-size: 1.25em;"><b>Introduction</b></font><br /><br />So you're ready to deploy a WebObjects application onto your WOlastic instance.&nbsp; You use either a PostgreSQL or MySQL database back-end for your application and you need to get it up and running.&nbsp; Simple enough!&nbsp; WOlastic comes with PostgreSQL and MySQL pre-installed.<br /><br />By default, Amazon EC2 instances do not have persistent data storage.&nbsp; If you "power-off" your WOlastic EC2 instance or it "crashes", all changed data from the default AMI state is lost, including database information.&nbsp; If you need data persistence, which I'm sure most of you guys will want, there is a separate article on setting up your databases on an Amazon EBS volume.<br /><br /><font style="font-size: 1.25em;"><b>Getting Started</b></font><br /><br />If you haven't already started up a WOlastic instance, follow the <a href="http://wolastic.com/2009/06/getting-started-with-wolastic-all-in-one-images.html">directions here</a>.&nbsp; Once you've got your WOlastic instance running, log in as "appserver" via SSH and if you haven't already changed the default password, please do so now using "passwd".<br /><br />Once you're logged in, here are the steps to getting PostgreSQL and/or MySQL running.<br /><br /><font style="font-size: 1.25em;"><b>Using PostgreSQL</b></font><br /><br /><b>1.</b> PostgreSQL is pre-installed by default on all WOlastic images, but turned off on boot.<br /><br /><b>2.</b> Log in as "appserver" via SSH to your WOlastic instance if you haven't already.&nbsp; Also, change the default password if you haven't already also using the "passwd" utility.&nbsp; Once you're logged in, you should see a prompt similar to this:<br /><b><br /></b><blockquote><pre><b>02:38pm appserver@domU-12-31-38-00-90-64:/home/appserver%</b><br /></pre></blockquote><br /><b>3.</b> To start PostgreSQL, run the following command:<br /><br /><blockquote><pre><b>sudo service postgresql start</b><br /></pre></blockquote><br /><b>4.</b> It may prompt for a password.&nbsp; Enter the password for "appserver".&nbsp; After entering the password, you should see the following occur:<br /><br /><blockquote><pre><b>Starting postgresql service: [&nbsp; OK&nbsp; ]</b><br /></pre></blockquote><br /><b>5.</b> PostgreSQL is now running.<br /><br /><b>6.</b> If you want PostgreSQL to come up automatically during an WOlastic instance reboot, run the following command:<br /><b><br /></b><blockquote><pre><b>sudo chkconfig postgresql on</b><br /></pre></blockquote><br /><b>7.</b> Double-check that postgresql is now set to run if the instance is rebooted:<br /><b><br /></b><blockquote><pre><b>sudo chkconfig --list postgresql</b><br /></pre></blockquote><br />It should look similar to the following:<br /><b><br /></b><blockquote><pre><b>postgresql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:off&nbsp;&nbsp; 1:off&nbsp;&nbsp; 2:on&nbsp;&nbsp;&nbsp; 3:on&nbsp;&nbsp;&nbsp; 4:on&nbsp;&nbsp;&nbsp; 5:on&nbsp;&nbsp;&nbsp; 6:off</b><br /></pre></blockquote><br />"3:on" is the most important, but 2 through 5 should show "on".<br /><br />Subsequently, if you want to reverse your changes, you can run "<b>sudo chkconfig postgresql off</b>".<br /><br /><b>8.</b> To log into PostgreSQL, you can use the "psql" command as the "postgres" user like this:<br /><br /><blockquote><pre>:/home/appserver% <b>psql -U postgres</b><br />Welcome to psql 8.3.7, the PostgreSQL interactive terminal.<br /><br />Type:&nbsp; \copyright for distribution terms<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \h for help with SQL commands<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \? for help with psql commands<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \g or terminate with semicolon to execute query<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \q to quit<br /><br />postgres=#<br /></pre></blockquote><br /><b>9.</b> All PostgreSQL data and configuration files are located in /vol/pgsql/data.&nbsp; You cannot access the directory while you are logged in as the "appserver" user.&nbsp; You need to change to the "postgres" user by doing the following as the "appserver" user:<br /><b><br /></b><blockquote><pre><b>sudo su - postgres</b><br /></pre></blockquote><br /><b>10.</b> If prompted for a password, type in your "appserver" password.&nbsp; You can now "cd /vol/pgsql/data".&nbsp; pg_hba.conf has been changed from the default configuration with "trust" being assumed.<br /><br /><font style="font-size: 1.25em;"><b>Using MySQL</b></font><br /><br /><b>1.</b> MySQL is pre-installed by default on all WOlastic images, but turned off on boot.<br /><br /><b>2.</b> Log in as "appserver" via SSH to your WOlastic instance if you haven't already.&nbsp; Also, change the default password if you haven't already also using the "passwd" utility.&nbsp; Once you're logged in, you should see a prompt similar to this:<br /><br /><blockquote><pre><b>02:38pm appserver@domU-12-31-38-00-90-64:/home/appserver%</b><br /></pre></blockquote><br /><b>3.</b> To start MySQL, run the following command:<br /><b><br /></b><blockquote><pre><b>sudo service mysqld start</b><br /></pre></blockquote><br /><b>4.</b> It may prompt for a password.&nbsp; Enter the password for "appserver".&nbsp; After entering the password, you should see the following occur:<br /><b><br /></b><blockquote><pre><b>Starting MySQL:&nbsp; [&nbsp; OK&nbsp; ]</b><br /></pre></blockquote><b><br />5.</b> MySQL is now running.<br /><br /><b>6.</b> If you want MySQL to come up automatically during an WOlastic instance reboot, run the following command:<br /><br /><blockquote><pre><b>sudo chkconfig mysqld on</b><br /></pre></blockquote><br /><b>7.</b> Double-check that postgresql is now set to run if the instance is rebooted:<br /><br /><blockquote><pre><b>sudo chkconfig --list mysqld</b><br /></pre></blockquote><br />It should look similar to the following:<br /><b><br /></b><blockquote><pre><b>mysqld&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:off&nbsp;&nbsp; 1:off&nbsp;&nbsp; 2:on&nbsp;&nbsp;&nbsp; 3:on&nbsp;&nbsp;&nbsp; 4:on&nbsp;&nbsp;&nbsp; 5:on&nbsp;&nbsp;&nbsp; 6:off</b><br /></pre></blockquote><br />"3:on" is the most important, but 2 through 5 should show "on".<br /><br />Subsequently, if you want to reverse your changes, you can run "sudo chkconfig mysqld off"<br /><br /><b>8.</b> To log into MySQL, you can use the "mysql" command as the "root" user like this:<br /><br /><blockquote><pre>:/home/appserver% <b>mysql -u root</b><br />Welcome to the MySQL monitor.&nbsp; Commands end with ; or \g.<br />Your MySQL connection id is 5<br />Server version: 5.0.45 Source distribution<br /><br />Type 'help;' or '\h' for help. Type '\c' to clear the buffer.<br /><br />mysql&gt; <br /></pre></blockquote><br /><b>9.</b> All MySQL data files are located in /vol/mysql.&nbsp; All files and directories are owned by the mysql" user and group.&nbsp; If you want to make changes, you need to change to the "mysql" user by doing the following as the "appserver" user:<br /><br /><blockquote><pre><b>sudo su - mysql</b><br /></pre></blockquote><br /><b>10.</b> If prompted for a password, type in your "appserver" password.&nbsp; You can now change/manipulate files within the directory.<br /><br /><b>Questions?&nbsp; Feel free to ask away!</b><br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Getting Started with WOlastic All-In-One Images</title>
    <link rel="alternate" type="text/html" href="http://wolastic.com/2009/06/getting-started-with-wolastic-all-in-one-images.html" />
    <id>tag:wolastic.com,2009://1.6</id>

    <published>2009-06-03T00:00:00Z</published>
    <updated>2009-06-23T01:03:33Z</updated>

    <summary><![CDATA[Getting Started with WOlastic All-In-One ImagesUpdated: June 2nd, 2009Prerequisites:&nbsp;&nbsp;&nbsp; * Amazon AWS Account (Register)&nbsp;&nbsp;&nbsp; * SSH Client (Mac OS X Terminal is fine)&nbsp;&nbsp;&nbsp; * Elasticfox (Optional Firefox Plug-In)Suggested Readings:&nbsp;&nbsp;&nbsp; * Amazon Elastic Computing Cloud (EC2)&nbsp;&nbsp;&nbsp; * Introduction to WebObjects Deployment...]]></summary>
    <author>
        <name>Daniel Kao</name>
        <uri>http://wolastic.com</uri>
    </author>
    
        <category term="WOlastic" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="ec2wolasticallinonegettingstarted" label="ec2 wolastic all-in-one getting started" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://wolastic.com/">
        <![CDATA[<b>Getting Started with WOlastic All-In-One Images</b><br /><br />Updated: June 2nd, 2009<br /><br />Prerequisites:<br /><br />&nbsp;&nbsp;&nbsp; * Amazon AWS Account (Register)<br />&nbsp;&nbsp;&nbsp; * SSH Client (Mac OS X Terminal is fine)<br />&nbsp;&nbsp;&nbsp; * Elasticfox (Optional Firefox Plug-In)<br /><br />Suggested Readings:<br /><br />&nbsp;&nbsp;&nbsp; * Amazon Elastic Computing Cloud (EC2)<br />&nbsp;&nbsp;&nbsp; * Introduction to WebObjects Deployment Guide Using JavaMonitor (Apple.com)<br /><br /><font style="font-size: 1.25em;"><b>Getting Started</b></font><br /><br />1.&nbsp; Log into the Amazon AWS Console (https://console.aws.amazon.com/) and click on the "Amazon EC2" tab above.&nbsp; If you are not already logged in, it will ask for your Amazon AWS credentials.&nbsp; Please furnish them to continue.<br /><br />2.&nbsp; You will be brought to a screen with a "Navigation" pane on the left and the "Amazon EC2 Console Dashboard" on the right pane.&nbsp; There are usually four sub-sections in the right pane labeled, "Getting Started", "My Resources", "Service Health", and "Related Links".&nbsp; In the "Getting Started" section, click on "Launch Instances".&nbsp; Please note the information below the "Launch Instances" button if your instances will be launched either in "US-East" or "EU-West" regions.<br /><br />3.&nbsp; You will be presented the "Launch Instance Wizard" with three tabs along the top.&nbsp; Those are "Quick Start", "My AMIs" and "Community AMIs".&nbsp; Click on the "Community AMIs".<br /><br />4.&nbsp; At the present time, there are over 2,100+ community AMI's in the US-East region.&nbsp; Under the "Viewing:" section there are two pull-down menus and a search text box.&nbsp; Change the "All Images" pull-down to "Public Images" and enter "wolastic" as the search term.&nbsp; You should see something similar to this:<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="launchinstancered.png" src="http://wolastic.com/launchinstancered.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="540" height="359" /></span><div align="center"><font style="font-size: 0.8em;"><b>Launching a WOlastic AMI from the Amazon AWS Console</b></font><br /></div><br />4.&nbsp; Always verify the AMI ID that you're about to launch (highlighted in red in the above picture) with the AMI IDs from the WOlastic.com homepage.&nbsp; At the time of this writing, the latest version of WOlastic 32-bit All-In-One for US-East region is 20090601 which has an AMI ID of ami-f736d09e.&nbsp; Find the proper AMI ID and hit "Select" to the right of the "Manifest" &amp; "Platform" information.<br /><br />5.&nbsp; If you have already used AWS in the past, you may skip the next three sections.&nbsp; If this is the first time you've used AWS, you will be presented with the following screens:<br /><br />&nbsp;&nbsp;&nbsp; * You will now be presented with creating a new "Key Pair" for AWS.&nbsp; This is an SSH key pair that's used to allow you to login to your EC2 instances.&nbsp; You can either "Skip this" at this point, or create a new key pair but it is not necessary for the WOlastic images.&nbsp; If you wish to create a key pair, enter a name for it (i.e. firstinitial-lastname) and "Create &amp; Download your Key Pair".&nbsp; Save the created PEM file in a safe place then click "Continue".<br /><br />&nbsp;&nbsp;&nbsp; * Next screen you will be presented with if this is the first time using EC2 is the "Configure Firewall" screen.&nbsp; You can also either "Skip this" or continue.&nbsp; Ports at the very minimum that should be open are SSH (port 22) and HTTP (port 80).&nbsp; If you want access to JavaMonitor, you need to open port 56789.&nbsp; You can restrict by IP address and JavaMonitor does not have a set-password in WOlastic so if you want to open port 56789 to the world (0.0.0.0/0), make sure you set a JavaMonitor password as soon as the instance is brought up.<br /><br />&nbsp;&nbsp;&nbsp; * If you want to fill this section out, create a "wolastic" security group and enter the "Description" as "WOlastic All-In-One Instances".&nbsp; Then click "Continue".<br /><br />6.&nbsp; Finally, you'll be presented with the "Launch Instance Wizard".&nbsp; It should look similar to this:<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="launchinstance.png" src="http://wolastic.com/launchinstance.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="540" height="359" /></span><div align="center"><font style="font-size: 0.8em;"><b>Final steps to launching a WOlastic All-In-One Instance</b></font><br /></div><br />7.&nbsp; It will show the "AMI Name", "Number of Instances" you wish to create, "Instance Type (32-bit)", "Key Pair Name", and "Security Groups" the instance should belong too.&nbsp; Since we're working with a 32-bit WOlastic CentOS-based image, we're only allowed two different instance types.&nbsp; Those are m1.small and c1.medium.&nbsp; You can read more about EC2 Instance types at Amazon EC2's documentation.&nbsp; Both instance types have 1.7GB of memory (RAM) but the c1.medium has two virtual cores versus one virtual core of the m1.small.<br /><br />8.&nbsp; For the purpose of launching, again, check the AMI ID to make sure it's the one you want to launch.&nbsp; Enter the number of instances you would like to start, the "Instance Type" (e.g. m1.small), set the "Key Pair Name" to "No Key Pair" and choose which "Security Groups" the instance should be in (e.g. either "Default" or "wolastic" or combination of existing security groups if you have them).&nbsp; Then click "Launch".<br /><br />9.&nbsp; You should see a confirmation in green stating, "Your instances are now launching".&nbsp; Click "Close" to be brought back to the "Amazon EC2 Console Dashboard".&nbsp; On the left "Navigation" pane, click the "Instances" link.&nbsp; You will be shown a list of "My Instances" running under your account.&nbsp; You should see your "Instance" with a yellow "Status" of "Starting".&nbsp; You can manually refresh the status of your instance by clicking the "Refresh" button towards the upper-right hand corner.&nbsp; The status should change from "Starting" to "Pending" to finally a green "Running" status which should look similar to this:<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="myinstances.png" src="http://wolastic.com/myinstances.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="540" height="259" /></span><div align="center"><font style="font-size: 0.8em;"><b>Information on your WOlastic All-In-One Instance Running</b></font><br /></div><br />10.&nbsp; Also at this time, you will now see the public IP address given to your instance.&nbsp; You can now select the instance and a second pane will open below with information about your instance.&nbsp; You can copy the "Public DNS" entry to your clipboard and paste it into a browser.&nbsp; If you've allowed port 80 open with the associated "Security Group" for that instance, you should see the following screen:<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="apache2_testpage.png" src="http://wolastic.com/apache2_testpage.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="540" height="426" /></span><div align="center"><font style="font-size: 0.8em;"><b>Default CentOS Apache HTTP Splash Page</b></font><br /></div><br />11.&nbsp; If you don't have port 80 opened, select "Security Groups" on the left "Navigation" pane and select the security group which the instance is running under.&nbsp; Make sure "HTTP" is allowed; If not, add it, save it, and try again.<br /><br />The "AjaxExample" WebObjects Application is installed by default from Project WONDER.&nbsp; You should be able to access it with the following URL:<br /><br />&nbsp;&nbsp;&nbsp; * http://your-public-DNS-amazon-EC2-wolastic-instance/cgi-bin/WebObjects/AjaxExample<br /><br />You should see a screen similar to this:<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="ajaxexample.png" src="http://wolastic.com/ajaxexample.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="540" height="395" /></span><div align="center"><font style="font-size: 0.8em;"><b>AjaxExample WebObjects Application running on WOlastic All-In-One</b></font><br /></div><br />12.&nbsp; If you have opened up port 56789 for JavaMonitor, you would use the following URL to access JavaMonitor:<br /><br />&nbsp;&nbsp;&nbsp; * http://your-public-DNS-amazon-EC2-wolastic-instance:56789/<br /><br />You should see a JavaMonitor screen similar to this:<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="javamonitor.png" src="http://wolastic.com/javamonitor.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="540" height="395" /></span><font style="font-size: 0.8em;"><b>JavaMonitor Instance running on WOlastic All-In-One Image</b></font><br /><br /><font style="font-size: 1.25em;"><b>Accessing your Instance</b></font><br /><br />The default SSH credentials for the WOlastic All-In-One Images are:<br /><br />&nbsp;&nbsp;&nbsp; * Username: appserver<br />&nbsp;&nbsp;&nbsp; * Password: wolastic1<br /><br />Please SSH in and immediately change your SSH password!&nbsp; There are softlinks in the home directory for the "appserver" user to easily deploy WebObjects Applications and to access WebObjects logs.&nbsp; Use the "Application Configuration" of the included "AjaxExample" application in JavaMonitor as a skeleton of how to setup applications.<br /><br />More advanced topics will follow including starting up and using MySQL and/or PostgreSQL which are pre-loaded on the WOlastic All-In-One Images and for more advanced configurations.]]>
        
    </content>
</entry>

</feed>
