[Glass] Working/testing setup with GsDevKit_home

Dale Henrichs dale.henrichs at gemtalksystems.com
Fri Jun 21 11:54:19 PDT 2019


On 6/21/19 8:28 AM, sergio ruiz via Glass wrote:
> I am using the information from Dale's post [1] to set up my dev 
> environment, but I think I need a bit more handholding. The 
> application is a simple blog, so the data set isn't very complicated. 
> I'd like to set up Pharo 7/8 as the development environment and 
> GemStone as my staging/production setup.
Sounds good ...
>
> It appears that I can develop as usual in Pharo. Dale mentioned 
> sharing the git clone with Pharo and GemStone staging, I just need to 
> figure out how to set this up. Also, I am unclear on how to set up my 
> main project in Iceberg (Monticello? Metacello) to get this running on 
> the staging system.

I haven't had an opportunity to play with Iceberg that much. While I 
_think_ that it is possible to attach Iceberg to a disk clone, I am not 
sure how to do it. Also, the last time I tried to use Iceberg with a 
filetree repository I had difficulties[1]. However the good news is that 
I found that I was able to use the Monticello Browser in Pharo to load 
my project ...

The successful formula involves cloning your git project to a know 
location --- doing the clone in $GS_HOME/shared/repos is a good place, 
but you can put it anywhere on disk. After the clone has been created 
you can use the following expression in both Pharo and GemStone to load 
your project:

    Metacello new
    	baseline: 'YourProjectName';
    	repository: 'filetree://$GS_HOME/shared/repos/YourProjectName';
    	load: #( 'your load list')

In Pharo you will just rerun this expression in a workspace whenever you 
have made changes from to the repo from GemStone/tODE.

In tODE, you will do your initial load using the above expression in a 
workspace (`ws` tODE command). Thereafter you should use the project 
list (`project list` tODE command) and the 'load' menu item to refresh 
the project in GemStone ...

By default, tODE is in auto commit mode, so you don't have to do 
explicit commits to save your work to the db.

If you've written to your project from Pharo, do a `Window > refresh 
window` in the project list or just re-evaluate `project list` in the 
tode shell window. Modified (and uncommited) projects sow up with a 
leading ` +` in the project list ... if you've done a commit from Pharo 
(or from the bash shell), the project will show up red in the project list:

Using the `load` menu item in the project list or `project load 
YourProjectName` in the tODE shell will load your project from disk in 
either case...

[1] https://github.com/pharo-vcs/iceberg/issues/1239

>
> Since it's a blog, it would probably be easiest to test on the staging 
> site with current real data. Would I create one tODE client and a 
>  tODE server on my local machine, and a tODE server on my remote 
> production server, then test on my local GemStone and deploy using my 
> local tODE and attaching to the production server?
You can use a single tODE client as a remote client for your remote 
server[2]. Take a look at the instructions here[3] for setting up and 
using ssh tunneling to securely connect to your remote server. You also 
have the option of using X-forwarding[4] to access your remote server, 
but I think that the ssh tunnel and a local tODE client is your best option.
[2] 
https://github.com/GsDevKit/GsDevKit_home/blob/master/docs/installation/README.md#client-on-a-local-workstation-server-on-a-remote-host
[3] 
https://github.com/GsDevKit/GsDevKit_home/blob/ebc8e7b1c1f2a5b4e9cf11f924164152a342367f/docs/installation/installDevKitClient.md#establish-connection-to-server
[4] 
https://github.com/GsDevKit/GsDevKit_home/blob/master/docs/installation/README.md#everything-on-a-remote-server-accessed-via-x-forwarding 

> Would I just pull  the full data from the remote GemStone server and 
> use it on the local GemStone server?

I think that using backup files or snapshot files (extent copies) to 
refresh your staging site is the best way to go. And I think we 
discussed this in a thread on the pharo list ...

Dale

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gemtalksystems.com/mailman/private/glass/attachments/20190621/1318ca28/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hjcaigfikocijipk.png
Type: image/png
Size: 48724 bytes
Desc: not available
URL: <https://lists.gemtalksystems.com/mailman/private/glass/attachments/20190621/1318ca28/attachment-0001.png>


More information about the Glass mailing list