A semi-regular reminder of how to install and load Pier into Pharo, older notes:
Steps:
mkdir Pharo && cd Pharo curl -L https://get.pharo.org/64/ | bash
This should download some files, and finish with: Creating starter scripts pharo and pharo-ui
. Smalltalks generally have a changes and image files that work in pairs, create a copy of the default:
./pharo Pharo.image save pier
Start the image with:
./pharo-ui pier.image
By clicking on an empty space, a menu opens up, it should look like:
Transcript open. Metacello new baseline:'PierAddons'; repository: 'github://Pier-CMS/Pier3:master/repository'; onConflictUseLoaded; load.
The program should look like:
command-o-i
, or from the world menu under Tools -> Iceberg
. Select Pier3 and right-click to get the packages option. Search for Google at the bottom and select and load it. WebBrowser openOn: 'http://localhost:8080/pier'.
Note that the debug tools (New Session
, Configure
, etc) at the bottom of the page.
WAAdmin defaultDispatcher defaultName: 'pier'. "Set Pier as the default for http://localhost:8080/"
New Session
and Configure
), run this:WAAdmin applicationDefaults removeParent: WADevelopmentConfiguration instance.
Next open the config screen and replace the cache on this screen:
WebBrowser openOn: 'http://localhost:8080/config/pier'.
Yes
to 'This will clear all existing sessions in the current cache. Are you sure you want to continue?' WAAdmin defaultDispatcher unregister: (WAAdmin defaultDispatcher handlerAt: 'tools'). WAAdmin defaultDispatcher unregister: (WAAdmin defaultDispatcher handlerAt: 'examples'). WAAdmin defaultDispatcher unregister: (WAAdmin defaultDispatcher handlerAt: 'status'). WAAdmin defaultDispatcher unregister: (WAAdmin defaultDispatcher handlerAt: 'tests'). WAAdmin defaultDispatcher unregister: (WAAdmin defaultDispatcher handlerAt: 'javascript'). WAAdmin defaultDispatcher unregister: (WAAdmin defaultDispatcher handlerAt: 'bootstrap'). WAAdmin defaultDispatcher unregister: (WAAdmin defaultDispatcher handlerAt: 'welcome'). WAAdmin defaultDispatcher unregister: (WAAdmin defaultDispatcher handlerAt: 'piersetup'). WAAdmin defaultDispatcher unregister: (WAAdmin defaultDispatcher handlerAt: 'browse').
The resulting list on the config page should only be:
./ Dispatcher config Application files File Library magritte/ Dispatcher pier (*) Application seaside Legacy redirection
Open a browser on localhost and port 8080 - this should open to the pier page because it is the default:
WebBrowser openOn: 'http://localhost:8080'.
admin
as the user: http://localhost:8080/pier?_s...
so it is on the pier page. Choose the option 'Change Owner' and select 'Recursive' and all permissions (admin automatically has all permissions), and apply: apply
(select all for the permissions, and control click view so it is not selected). Browse Changes Changes (RSS) Diff Diff (RSS) File Halos Log Log (RSS) Search Text View Wiki Login View
Page for setting up Pier. !Persistence *persistence|embedded=true* !User Management *users|embedded=true*
Clicking 'Save' should bring up a page with dark red links for persistence and users:
persistence
by clicking on the link. Instead of adding a page, choose: PRComponent
and Add. In the next window choose PRPersistencySettings
for the Component Class and save: PRComponent
and then PUUsersWidget
when clicking on the link. Add
, provide a name like testblog
and select PBBlog
for the type. Select save on the following window describing the blog. Tracking Id
under the admin page, it generally has the format UA-number-1
. *../Google Analytics|embedded=true*
A picture:
PRComponent
for the type, PRGoogleAnalyticsWidget
(under Pier Widgets
) for the component class, then save. The Google Analytics
will look like a blank page, but if one clicks edit the following opens: Inherited Configuration -> Possible parents:
select WAAuthConfiguration
and click Add
.
Seaside Control Panel
: "a ZnZincServerAdaptor..." self
), change it to say:self port: 80
and press Control-d
, the port number in the upper pane should change to 80
.
In the Seaside Control Panel
stop and restart the ZnZincServer so it is listening on port 80.
Save and Quit
. tar -czf pier.tgz files pier.image pier.changes transactions.txt
Details:
pier.tgz
is the new archivefiles
containing the static content, particularly the CSS filespier.image
and pier.changes
contains the objects and source code, it's best to keep these togethertransactions.txt
is updated with each wiki update, this should be checked when the VM crashes
Launch Instance
Ubuntu
in the search field, choose the newest LTS that is free-tier-eligible, all of the defaults are generally acceptableSecurity Groups
IPv4 Public IP
ssh -i ~/.ssh/ec*.pem ubuntu@3.18....
ubuntu@ip-172-31-46-#:~$ mkdir Pharo
ubuntu@ip-172-31-46-#:~$ cd $_
ubuntu@ip-172-31-46-#:~/Pharo$ sudo apt-get install unzip
ubuntu@ip-172-31-46-#:~/Pharo$ curl -L https://get.pharo.org/64 | bash
scp -i ~/.ssh/ec*.pem pier.tgz ubuntu@3.18.109...:Pharo/
ubuntu@ip-172-31-46-#:~/Pharo$ tar -xzf pier.tgz
ubuntu@ip-172-31-46-#:~/Pharo$ sudo ./pharo-ui -nodisplay pier_on_ec2.image --no-quit
ubuntu
user on your computer). A quicker way to fix the problem is to create a new CSS file: Templates
link, select add at the bottom of the page (one needs to be logged in to see it). Create a PRFile this time: Browse
to choose an CSS file: style.css
can be found under files, or here.Also be sure to click upload, then save.
template
and the session text from the address bar to return to the root page. Click settings and change the Style Sheet:
from /template/style.css
to /template/new_css_name
, like /template/ec2Site.css
in the example above: Choose
button also lets one browse Pier. After saving, the site should appear correctly. System/Persistency
this is a snapshot button.