|
GettingStartedWithGLASS
Getting started with GLASS
The best way to get started with GLASS is to (the following instructions have not been tested with Squeak, but it is expected that the instructions will work equally well for Squeak):
GemStone/S Server installationIf you have experience installing GemStone/S, and are comfortable with setting up Apache or FastCGI and other system and network administration tasks, the native install is a good option:
Otherwise, you should consider installing VMWare and then downloading the VMWare GLASS appliance. With the appliance GemStone, the server gems and Apache are automatically started and shutdown, so there's very little muss and fuss involved:
Once you have your GemStone server (or appliance) installed, you should follow the instructions for installing GemTools. Custom Extent Creation (GemStone 2.4.4.1)GemStone/S ships with a pre-built extent $GEMSTONE/bin/extent0.seaside.dbf. In GemStone 2.4.4.1 and later, the extent is preloaded with only the base GLASS classes loaded (Seaside is not preloaded). To create a custom extent, simply load the Metacello configurations for the projects that you want loaded into your extent. Custom Extent Creation (GemStone 2.3.x)GemStone/S ships with a pre-built extent $GEMSTONE/bin/extent0.seaside.dbf. If you want to bootstrap your own extent, then follow these instructions:
stopGemstone cp $GEMSTONE/bin/extent0.dbf $GEMSTONE/seaside/data
chmod +w $GEMSTONE/seaside/data/extent0.dbfstartGemStone topaz -l -T50000 If you don't already have a GemTools Launcher then follow the installation instructions in the GemTools Installation section. If you already have a GemTools Launcher then you should follow the updating instructions in the GemTools Installation section. Install GemToolsTo install GemTools you must load the configurationOfGemTools into your image. As an alternative to building your own GemTools client image, you can download a one-click Pharo image with GemTools pre-installed and then skip to the Define GemTools Session section. InstallationIn Pharo, evaluate the following statements: Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfGemTools';
load.In Squeak image, evaluate the following statements: (Installer repository:
'http://www.squeaksource.com/MetacelloRepository')
install: 'ConfigurationOfGemTools'. UpdatingThen evaluate the following expression to load the lastest version of GemTools: (Smalltalk at: #ConfigurationOfGemTools) perform: #loadLatestVersion. This expression opens the GemTools Help Browser (Pharo only in 1.0-beta.6): (Smalltalk at: #GemToolsHelpBrowser) open. Install GCI library filesThe GCI library file is a C library that contains code for communicating with the GemStone server. The source directory, destination directory and name of the GCI library file depends upon which platform you are running and how you have installed GemStone. If you have done a native install and are running your GemTools image on the same OS as the stone, then you will copy the GCI library file from $GEMSTONE/lib32. If the OS where the stone is running differs from the OS where you are running GemTools OS, then you should download the GemTools one-click from the GLASS downloads page and copy the GCI library file from GemTools-1.0-beta.8-*x.app/Contents/Resources. If you are using an appliance and running GemTools on Linux, you may copy the GCI library from the appliance itself. For more information, see James' blog post: 'http://programminggems.wordpress.com/2010/02/02/name-and-location-of-gci-library/' To finish the GCI library installation please see the instruction page for the OS upon which you are running GemTools: * Note that the installation instructions for Linux is dependent upon which version of the vm that you are running. Define GemTools SessionIn order to log into the stone using the GemTools Launcher, you must create a session description that includes information such as the hostName for the stone, the name of the stone, GemStone username, password, etc. There are three different variants of session descriptions that should be used base upon the level of control you need:
If you have a GemTools launcher open, you can use the New session button to create a session description. The Edit session button to change individual field values. Open GemTools LauncherTo open the GemTools launcher evaluate the following expression: OGLauncher open. After double checking that your session descriptions are correct, this is a good time to save your pharo image. Start stone and netldiAfter installing the GemStone/S server you need to start a stone and a netldi. The netldi process is needed so that the GemTools client can communicate with the stone. If you are using a native install, then follow the starting gemstone instructions. If you are using an appliance, you only need to launch the appliance itself, since the stone and netldi processes are started automatically. Log into the GemStone serverSelect the desired session in the GemTools Launcher session list and press the Login button. Upon a successful login, the annotation pane will be filled with useful information about your session. The button bar will also be updated. Backup repositoryIt is always a good idea to make a backup of your repository before doing an update. You never know what might happen during the upgrade process so it is prudent to make a backup. To make a backup click on the 'Admin...' button and select the 'Repository>>Backup' menu item. You will be prompted for a backup file name. I usually use the version name as the name of my backup (i.e., '0.231.dbf'). You can control where the backup directory is located by setting the #backupDirectory: in your session description. By default, the backups are stored in $GEMSTONE/seaside/data/backups. If you do need to restore from a backup click on the 'Admin...' button and select the 'Repository>>Restore w/o tranlogs' menu item. You will be given a list of backup file names to choose from. See the Backup section for more information. Update GLASSIf you haven't already done so, you should make sure that you are using the latest version of the GemTools client as you always should upgrade your client when you upgrade the server:
See the GemTools Update GLASS section for more info on updating the server. If you are using Seaside2.8 and GemStone 2.3 (the appliance) then you should update to GemTools 1.0-beta.8.5 and GLASS 1.0-beta.8.7 for best results. Load optional projectsIf you are using GLASS 1.0-beta.8.4 see Seaside 2.8 for 1.0-beta.8.4 options. Once you've updated the base system, you may want to do a "full load" of the packages that were loaded by GLASS.230-dkh.231. The following expressions can be evaluated in a GemStone workspace: MCPlatformSupport commitOnAlmostOutOfMemoryDuring: [
[
ConfigurationOfMetacello project updateProject.
ConfigurationOfMetacello loadLatestVersion.
#( ConfigurationOfGsSOAP ConfigurationOfSeaside28
ConfigurationOfSeaside28Examples ConfigurationOfGsSeasideTesting28
ConfigurationOfMagritte ConfigurationOfGsScaffolding ConfigurationOfPier
ConfigurationOfPierAddOns) do: [:configName |
Smalltalk at: configName ifPresent: [:config | config project updateProject ]].
Gofer project load: 'GsSOAP' version: '0.233'.
Gofer project load: 'Seaside28' version: '2.8.5'.
Gofer project load: 'Seaside28Examples' version: '2.8'.
Gofer project load: 'GsSeasideTesting28' version: '1.0'.
Gofer project load: 'Magritte' version: '1.2.1.5'.
Gofer project load: 'GsScaffolding' version: '1.0'.
Gofer project load: 'Pier' version: '1.2.1.6'.
Gofer project load: 'GsSeasideTesting28' version: '1.0' group: #( 'PierTesting' ).
Gofer project load: 'PierAddOns' version: '1.0.5'.
]
on: Warning
do: [:ex | ex resume ]].If you want a subset of the "full load", then you can edit the above expression to load only the parts that you are interested in. See the Seaside 3.0 Load Options page. | |